Hi, Johan, When quicks SDHCI_QUIRK_BROKEN_CARD_DETECTION is set, the driver will poll the card status with the command CMD13 periodically, then many interrupts will be generated, which affect the performance. Yes, some cases to detect GPIO can't be trusted, so I only just implement this callback in eSDHC-of driver. that is to say, just when the platform support it, this callback can be implement, if not, continue to send the command CMD13. > Hi Jerry, > > 2012/10/30 <r66093@xxxxxxxxxxxxx>: > > From: Jerry Huang <Chang-Ming.Huang@xxxxxxxxxxxxx> > > > > In order to check whether the card has been removed, the function > > mmc_send_status() will send command CMD13 to card and ask the card to > > send its status register to sdhc driver, which will generate many > > interrupts repeatedly and make the system performance bad. > > > > Therefore, add callback function get_cd() to check whether the card > > has been removed when the driver has this callback function. > > > > If the card is present, 1 will return, if the card is absent, 0 will > return. > > If the controller will not support this feature, -ENOSYS will return. > > In what cases is the performance affected by this? I believe this > function is called only on some errors and on detect? > > Also, we've seen cases where the card detect GPIO cannot be trusted to > tell wether the card is present or not, for instance in the corner case > when an SD-card is removed very slowly... > > Kind regards, Johan -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html