Skip to contentSkip to conversation

SDHCI: add no hi-speed bit quirk support

PATCH New Kyungmin Park 1 participant 1 message Aug 17, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 SDHCI: add no hi-speed bit quirk support

From: Kyungmin Park <[email protected]>

Some SDHCI controller like s5pc110 doesn't have HISPD bit at HOSTCTL register. Also fix the sdhci-s3c build since SDHCI_QUIRK_NO_HISPD_BIT defined at there.

---

drivers/mmc/host/sdhci.c +2 -1
index 7855121..87ab234 100644
@@ -1180,7 +1180,8 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	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))
 		ctrl |= SDHCI_CTRL_HISPD;
 	else
 		ctrl &= ~SDHCI_CTRL_HISPD;
drivers/mmc/host/sdhci.h +2 -0
index 036cfae..d316bc7 100644
@@ -245,6 +245,8 @@ struct sdhci_host {
 #define SDHCI_QUIRK_MISSING_CAPS			(1<<27)
 /* Controller uses Auto CMD12 command to stop the transfer */
 #define SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12		(1<<28)
+/* Controller doesn't have HISPD bit field in HI-SPEED SD card */
+#define SDHCI_QUIRK_NO_HISPD_BIT			(1<<29)
 
 	int			irq;		/* Device IRQ */
 	void __iomem *		ioaddr;		/* Mapped address */