All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/esdhc: enable the card insert/remove interrupt
@ 2012-10-23  7:01 r66093
  2012-10-23  8:26   ` Anton Vorontsov
  0 siblings, 1 reply; 15+ messages in thread
From: r66093 @ 2012-10-23  7:01 UTC (permalink / raw)
  To: linux-mmc; +Cc: Jerry Huang, Anton Vorontsov, Chris Ball

From: Jerry Huang <Chang-Ming.Huang@freescale.com>

The current eSDHC driver use the poll mode to detect
if the SD/MMC card is inserted or removed, which will generate
many interrupts and impact the performance. 
Therefore, change the default card detect to interrupt mode,
if the board can't support this mode, we still use the poll mode.

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
CC: Anton Vorontsov <cbouatmailru@gmail.com>
CC: Chris Ball <cjb@laptop.org>
---
 drivers/mmc/host/sdhci-of-esdhc.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index ffc1226..5dc362f 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -196,6 +196,11 @@ static void esdhc_of_detect_limitation(struct platform_device *pdev,
 	if (vvn == VENDOR_V_22)
 		pdata->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23;
 
+	/* P4080DS and MPC837XMDS board don't support interrupt mode */
+	if (of_machine_is_compatible("fsl,mpc837xmds") ||
+	    of_machine_is_compatible("fsl,P4080DS"))
+		pdata->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+
 	iounmap(ioaddr);
 end:
 	return;
@@ -223,7 +228,7 @@ static struct sdhci_pltfm_data sdhci_esdhc_pdata = {
 	 * card detection could be handled via GPIO
 	 * eSDHC cannot support End Attribute in NOP ADMA descriptor
 	 */
-	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
+	.quirks = ESDHC_DEFAULT_QUIRKS
 		| SDHCI_QUIRK_NO_CARD_NO_RESET
 		| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
 	.ops = &sdhci_esdhc_ops,
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-10-29  1:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-23  7:01 [PATCH] powerpc/esdhc: enable the card insert/remove interrupt r66093
2012-10-23  8:26 ` Anton Vorontsov
2012-10-23  8:26   ` Anton Vorontsov
2012-10-23  8:39   ` Huang Changming-R66093
2012-10-23  8:39     ` Huang Changming-R66093
2012-10-25 10:05     ` Huang Changming-R66093
2012-10-25 10:05       ` Huang Changming-R66093
2012-10-25 10:30       ` Anton Vorontsov
2012-10-25 10:30         ` Anton Vorontsov
2012-10-26  2:42         ` Huang Changming-R66093
2012-10-26  2:42           ` Huang Changming-R66093
2012-10-27  1:12           ` Anton Vorontsov
2012-10-27  1:12             ` Anton Vorontsov
2012-10-29  1:40             ` Huang Changming-R66093
2012-10-29  1:40               ` Huang Changming-R66093

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.