summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2016-04-07 23:49:56 +0200
committerKlaus Goger <klaus.goger@theobroma-systems.com>2016-09-18 13:45:14 +0200
commit3107262b564318ef55bb5e308fe18a9edff08c80 (patch)
treeb87cd1069583fdf063fe17da40768ace8f82bc98 /drivers
parent7406394fa0c53875235c19cb42b8942d8b491e05 (diff)
sunxi: issue a MMC hardware reset on core_init
Diffstat (limited to 'drivers')
-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;
}