Skip to contentSkip to conversation

SDHCI: add no hi-speed bit quirk support

PATCH Kukjin Kim 1 participant 1 message Jun 7, 2010 MMC, SD and SDIO

lore
Share & tools
lore

Kukjin Kim

author
#0 lore raw
Quoted 2 lines · Kyungmin Park

Some SDHCI controllr like s5pc110 doesn't have HISPD bit at HOSTCTL

register.

Quoted 1 line

typo

drivers/mmc/host/sdhci.c static void sdhci_set_ios(struct mmc_host *mmc,

Quoted 7 lines
Signed-off-by Kyungmin Park <kyungmin.park <at> samsung.com>

---

drivers/mmc/host/sdhci.c +0 -0
index c6d1bd8..cba08ce 100644
@@ -1164,7 +1164,8 @@ static void sdhci_set_ios(struct mmc_host *mmc,

struct mmc_ios *ios)

drivers/mmc/host/sdhci.c static void sdhci_set_ios(struct mmc_host *mmc, · line 1168

Quoted 6 lines
drivers/mmc/host/sdhci.c +2 -1
 	else
 		ctrl &= ~SDHCI_CTRL_4BITBUS;
 
-	if (ios->timing == MMC_TIMING_SD_HS)
+	if (ios->timing == MMC_TIMING_SD_HS &&
+	    !(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT))

host->quirks |= SDHCI_QURIK_NO_HISPD_BIT missed in drivers/mmc/host/sdhci-s3c.c

Quoted 8 lines
drivers/mmc/host/sdhci.c +0 -0
 		ctrl |= SDHCI_CTRL_HISPD;
 	else
 		ctrl &= ~SDHCI_CTRL_HISPD;
drivers/mmc/host/sdhci.h +0 -0
index c846813..a78152d 100644

drivers/mmc/host/sdhci.h struct sdhci_host { · line 247

Quoted 8 lines
drivers/mmc/host/sdhci.h +2 -0
@@ -240,6 +240,8 @@ struct sdhci_host {
 #define SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN		(1<<25)
 /* Controller cannot support End Attribute in NOP ADMA descriptor */
 #define SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC		(1<<26)
+/* Controller doesn't have HISPD bit field in HI-SPEED SD card */
+#define SDHCI_QUIRK_NO_HISPD_BIT			(1<<27)
 
 	int			irq;		/* Device IRQ */
 	void __iomem *		ioaddr;		/* Mapped address */

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.