Skip to contentSkip to conversation

mmc: dw_mmc: Clear the DDR mode for non-DDR

PATCH In review Seungwon Jeon 3 participants 3 messages Jan 2, 2012 – Jan 5, 2012

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

PATCH 1/1 mmc: dw_mmc: Clear the DDR mode for non-DDR

UHS_REG should be cleared for non-DDR mode. But currently there is no way to clear DDR mode, if it is already set once. This patch adds clearing DDR mode for non-DDD mode.

---
 drivers/mmc/host/dw_mmc.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
drivers/mmc/host/dw_mmc.c +7 -4
index c583b94..94e2238 100644
@@ -707,12 +707,15 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 		break;
 	}
 
+	regs = mci_readl(slot->host, UHS_REG);
+
 	/* DDR mode set */
-	if (ios->timing == MMC_TIMING_UHS_DDR50) {
-		regs = mci_readl(slot->host, UHS_REG);
+	if (ios->timing == MMC_TIMING_UHS_DDR50)
 		regs |= (0x1 << slot->id) << 16;
-		mci_writel(slot->host, UHS_REG, regs);
-	}
+	else
+		regs &= ~(0x1 << slot->id) << 16;
+
+	mci_writel(slot->host, UHS_REG, regs);
 
 	if (ios->clock) {
 		/*
Signature · 1 line
1.7.0.4
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Seungwon Jeon

UHS_REG should be cleared for non-DDR mode. But currently there is no way to clear DDR mode, if it is already set once. This patch adds clearing DDR mode for non-DDD mode.

---
 drivers/mmc/host/dw_mmc.c |   11 +++++++----

 1 files changed, 7 insertions(+), 4 deletions(-)

Looks ok to me, although I don't have any DDR capable hardware to test.

#2 lore raw

Hi,

Quoted 5 lines · Will Newton
Quoted 4 lines · Seungwon Jeon

UHS_REG should be cleared for non-DDR mode. But currently there is no way to clear DDR mode, if it is already set once. This patch adds clearing DDR mode for non-DDD mode.

Quoted 8 lines
Quoted 4 lines

---
 drivers/mmc/host/dw_mmc.c |   11 +++++++----

 1 files changed, 7 insertions(+), 4 deletions(-)

Looks ok to me, although I don't have any DDR capable hardware to test.

Thanks, pushed to mmc-next for 3.3.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child