summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/tmio-common.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@gmail.com>2018-06-13 08:02:55 +0200
committerMarek Vasut <marex@denx.de>2018-11-02 15:57:14 +0100
commit8171f99e7db072383e20125e54c59f4a40272892 (patch)
tree307e330542a80ad49b066c428256333d3b3da03a /drivers/mmc/tmio-common.c
parent33633ebb1c9a25a439dadea9818bfcdac46cdfff (diff)
downloadu-boot-8171f99e7db072383e20125e54c59f4a40272892.tar.gz
u-boot-8171f99e7db072383e20125e54c59f4a40272892.tar.xz
u-boot-8171f99e7db072383e20125e54c59f4a40272892.zip
mmc: tmio: Configure clock before any other IOS
Configure the clock settings before reconfiguring any other IO settings. This is required when the clock must be stopped before changing eg. the pin configuration or any of the other properties of the bus. Running the clock configuration first allows the MMC core to do just that. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'drivers/mmc/tmio-common.c')
-rw-r--r--drivers/mmc/tmio-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c
index 785b654671..2a73829d99 100644
--- a/drivers/mmc/tmio-common.c
+++ b/drivers/mmc/tmio-common.c
@@ -642,11 +642,11 @@ int tmio_sd_set_ios(struct udevice *dev)
dev_dbg(dev, "clock %uHz, DDRmode %d, width %u\n",
mmc->clock, mmc->ddr_mode, mmc->bus_width);
+ tmio_sd_set_clk_rate(priv, mmc);
ret = tmio_sd_set_bus_width(priv, mmc);
if (ret)
return ret;
tmio_sd_set_ddr_mode(priv, mmc);
- tmio_sd_set_clk_rate(priv, mmc);
tmio_sd_set_pins(dev);
return 0;