|
@@ -662,6 +662,7 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
|
|
static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
|
|
{
|
|
|
struct dw_mci_slot *slot = mmc_priv(mmc);
|
|
|
+ u32 regs;
|
|
|
|
|
|
/* set default 1 bit mode */
|
|
|
slot->ctype = SDMMC_CTYPE_1BIT;
|
|
@@ -678,6 +679,13 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
+ /* DDR mode set */
|
|
|
+ if (ios->ddr) {
|
|
|
+ regs = mci_readl(slot->host, UHS_REG);
|
|
|
+ regs |= (0x1 << slot->id) << 16;
|
|
|
+ mci_writel(slot->host, UHS_REG, regs);
|
|
|
+ }
|
|
|
+
|
|
|
if (ios->clock) {
|
|
|
/*
|
|
|
* Use mirror of ios->clock to prevent race with mmc
|