]> Git Repo - u-boot.git/commitdiff
mmc: tmio: Configure clock before any other IOS
authorMarek Vasut <[email protected]>
Wed, 13 Jun 2018 06:02:55 +0000 (08:02 +0200)
committerMarek Vasut <[email protected]>
Fri, 2 Nov 2018 14:57:14 +0000 (15:57 +0100)
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 <[email protected]>
Cc: Masahiro Yamada <[email protected]>
drivers/mmc/tmio-common.c

index 785b65467199e34b3cbb86d40a586e4878e7f716..2a73829d9943fb0e2ee579615b1614ff3274bb7b 100644 (file)
@@ -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;
This page took 0.035106 seconds and 4 git commands to generate.