Skip to contentSkip to conversation

mmc: dw_mmc: support the DDR mode

PATCH Superseded Jaehoon Chung 1 participant 1 message Mar 27, 2014 MMC, SD and SDIO

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 7/9 mmc: dw_mmc: support the DDR mode

Support the DDR mode at dw-mmc controller.

---
 drivers/mmc/dw_mmc.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/mmc/dw_mmc.c +9 -1
index d45c15c..5e9b10f 100644
@@ -285,7 +285,7 @@ static int dwmci_setup_bus(struct dwmci_host *host, u32 freq)
 static void dwmci_set_ios(struct mmc *mmc)
 {
 	struct dwmci_host *host = (struct dwmci_host *)mmc->priv;
-	u32 ctype;
+	u32 ctype, regs;
 
 	debug("Buswidth = %d, clock: %d\n",mmc->bus_width, mmc->clock);
 
@@ -304,6 +304,14 @@ static void dwmci_set_ios(struct mmc *mmc)
 
 	dwmci_writel(host, DWMCI_CTYPE, ctype);
 
+	regs = dwmci_readl(host, DWMCI_UHS_REG);
+	if (mmc->card_caps & MMC_MODE_DDR_52MHz)
+		regs |= (0x1 << 16);
+	else
+		regs &= ~(0x1 << 16);
+
+	dwmci_writel(host, DWMCI_UHS_REG, regs);
+
 	if (host->clksel)
 		host->clksel(host);
 }
Signature · 1 line
1.7.9.5