summaryrefslogtreecommitdiff
path: root/drivers/mmc/dw_mmc.c
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-06-02 06:43:48 (GMT)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-06-02 06:43:48 (GMT)
commitcc49da249cf2f380d2fed5571fad65ce6494fc95 (patch)
tree00bf437b6a370c0640d5fafd93780406d3531ebb /drivers/mmc/dw_mmc.c
parent9637a1bb896efe392a58dd2772e2c3fcb646409d (diff)
parent567802bbd6bf1c809d37fef9244fc8a692244e73 (diff)
downloadu-boot-cc49da249cf2f380d2fed5571fad65ce6494fc95.tar.xz
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
Diffstat (limited to 'drivers/mmc/dw_mmc.c')
-rw-r--r--drivers/mmc/dw_mmc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index eb4e2be..5bf36a0 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -284,8 +284,8 @@ static int dwmci_setup_bus(struct dwmci_host *host, u32 freq)
static void dwmci_set_ios(struct mmc *mmc)
{
- struct dwmci_host *host = mmc->priv;
- u32 ctype;
+ struct dwmci_host *host = (struct dwmci_host *)mmc->priv;
+ 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 |= DWMCI_DDR_MODE;
+ else
+ regs &= DWMCI_DDR_MODE;
+
+ dwmci_writel(host, DWMCI_UHS_REG, regs);
+
if (host->clksel)
host->clksel(host);
}