aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Jacques Hiblot <jjhiblot@ti.com>2018-01-30 16:01:44 +0100
committerJaehoon Chung <jh80.chung@samsung.com>2018-02-19 16:58:55 +0900
commit42182c9b9ca946b68f564936ffc181b75ce3da9f (patch)
tree51339fe6afe6a19171628558019c926d97ae9dd7
parent3149c13ac324dae0b8993a4f6c964a261aa691a9 (diff)
downloadu-boot-42182c9b9ca946b68f564936ffc181b75ce3da9f.zip
u-boot-42182c9b9ca946b68f564936ffc181b75ce3da9f.tar.gz
u-boot-42182c9b9ca946b68f564936ffc181b75ce3da9f.tar.bz2
mmc: omap_hsmmc: implement send_init_stream callback
This callback is used to send the 74 clock cycles after power up. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
-rw-r--r--drivers/mmc/omap_hsmmc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index b10d55e..71608d1 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -46,6 +46,7 @@
#include <asm/arch/mux.h>
#endif
#include <dm.h>
+#include <power/regulator.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -564,6 +565,14 @@ tuning_error:
return ret;
}
#endif
+
+static void omap_hsmmc_send_init_stream(struct udevice *dev)
+{
+ struct omap_hsmmc_data *priv = dev_get_priv(dev);
+ struct hsmmc *mmc_base = priv->base_addr;
+
+ mmc_init_stream(mmc_base);
+}
#endif
static void mmc_enable_irq(struct mmc *mmc, struct mmc_cmd *cmd)
@@ -652,7 +661,10 @@ static int omap_hsmmc_init_setup(struct mmc *mmc)
writel(readl(&mmc_base->hctl) | SDBP_PWRON, &mmc_base->hctl);
mmc_enable_irq(mmc, NULL);
+
+#if !CONFIG_IS_ENABLED(DM_MMC)
mmc_init_stream(mmc_base);
+#endif
return 0;
}
@@ -1279,6 +1291,7 @@ static const struct dm_mmc_ops omap_hsmmc_ops = {
#ifdef MMC_SUPPORTS_TUNING
.execute_tuning = omap_hsmmc_execute_tuning,
#endif
+ .send_init_stream = omap_hsmmc_send_init_stream,
};
#else
static const struct mmc_ops omap_hsmmc_ops = {