Message ID | 1457050214-117592-9-git-send-email-agraf@suse.de |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
On Fri, Mar 04, 2016 at 01:09:52AM +0100, Alexander Graf wrote: > When enable dcache on HiKey, we're running into MMC command timeouts > because our retry loop is now faster than the eMMC (or an external SD > card) can answer. > > Increase the retry count to the same as the timeout value for status > reports. > > The real fix is obviously to not base this whole thing on a cycle counter > but on real wall time, but that would be slightly more intrusive. > > Signed-off-by: Alexander Graf <agraf@suse.de> Applied to u-boot/master, thanks!
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 909e3ca..7329f40 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -189,7 +189,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, data ? DIV_ROUND_UP(data->blocks, 8) : 0); int ret = 0, flags = 0, i; unsigned int timeout = 100000; - u32 retry = 10000; + u32 retry = 100000; u32 mask, ctrl; ulong start = get_timer(0); struct bounce_buffer bbstate;
When enable dcache on HiKey, we're running into MMC command timeouts because our retry loop is now faster than the eMMC (or an external SD card) can answer. Increase the retry count to the same as the timeout value for status reports. The real fix is obviously to not base this whole thing on a cycle counter but on real wall time, but that would be slightly more intrusive. Signed-off-by: Alexander Graf <agraf@suse.de> --- drivers/mmc/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)