summaryrefslogtreecommitdiff
path: root/drivers/mmc/sunxi_mmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/sunxi_mmc.c')
-rw-r--r--drivers/mmc/sunxi_mmc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index 7b33094d84..4a7dbed043 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -255,7 +255,12 @@ static int sunxi_mmc_core_init(struct mmc *mmc)
/* Reset controller */
writel(SUNXI_MMC_GCTRL_RESET, &mmchost->reg->gctrl);
+ do { /* spin */ } while (readl(&mmchost->reg->gctrl) & SUNXI_MMC_GCTRL_RESET);
+
+ /* Toggle RST output */
+ writel(0, &mmchost->reg->hwrst);
udelay(1000);
+ writel(1, &mmchost->reg->hwrst);
return 0;
}