aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2018-08-04 18:04:30 +0800
committerHaojian Zhuang <haojian.zhuang@linaro.org>2018-08-10 17:11:12 +0800
commitbd4e3deee9d72bfdb46d161eba62c6ae9d107855 (patch)
tree682f47074738e4e37517fe617cc82d6385281261 /drivers/mmc
parent07858dd809dab5d3802e707c99c084cce3304824 (diff)
downloadtrusted-firmware-a-bd4e3deee9d72bfdb46d161eba62c6ae9d107855.tar.gz
drivers/mmc: set buswidth and speed before reading data
It should set buswidth and speed of mmc controller before accessing mmc. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/mmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 5823293c90..217f90c473 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -473,12 +473,12 @@ static int mmc_enumerate(unsigned int clk, unsigned int bus_width)
}
} while (ret != MMC_STATE_TRAN);
- ret = mmc_fill_device_info();
+ ret = mmc_set_ios(clk, bus_width);
if (ret != 0) {
return ret;
}
- return mmc_set_ios(clk, bus_width);
+ return mmc_fill_device_info();
}
size_t mmc_read_blocks(int lba, uintptr_t buf, size_t size)