Skip to content

Commit

Permalink
mmc: dw_mmc: Clear the DDR mode for non-DDR
Browse files Browse the repository at this point in the history
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-DDR mode.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Seungwon Jeon authored and Chris Ball committed Jan 12, 2012
1 parent dd8df17 commit 3f51429
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/mmc/host/dw_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
/*
Expand Down

0 comments on commit 3f51429

Please sign in to comment.