diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2014-05-16 13:59:55 +0900 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2014-05-16 14:54:26 +0900 |
commit | 045bdcd0b2ff02effef09d945cee685b88ec521d (patch) | |
tree | bbca9ea38671b91e4a217d1cba7ad69d3f7604dc /drivers/mmc | |
parent | d22e3d46a918bde2e6d3bc3f5782548d5ed75358 (diff) | |
download | u-boot-imx-045bdcd0b2ff02effef09d945cee685b88ec521d.zip u-boot-imx-045bdcd0b2ff02effef09d945cee685b88ec521d.tar.gz u-boot-imx-045bdcd0b2ff02effef09d945cee685b88ec521d.tar.bz2 |
mmc: dw_mmc: support the DDR mode
Support the DDR mode at dw-mmc controller
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/dw_mmc.c | 12 |
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); } |