aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc_spi.c
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2019-08-29 15:42:41 +0800
committerPeng Fan <peng.fan@nxp.com>2019-09-05 15:28:40 +0800
commitc077c057a49d47cdc029cce654e9895ea987fce5 (patch)
tree553f212453a6025e47f8befb0f595c1a29858794 /drivers/mmc/mmc_spi.c
parent30231e0ddb84d689875958903ee48ddd6d28f37e (diff)
downloadu-boot-c077c057a49d47cdc029cce654e9895ea987fce5.zip
u-boot-c077c057a49d47cdc029cce654e9895ea987fce5.tar.gz
u-boot-c077c057a49d47cdc029cce654e9895ea987fce5.tar.bz2
mmc: dw_mmc: fix timeout calculate method
There are two cases not been considered: - use uint for timeout, it will overflow when size bigger than 512KB for it *8*1000 at the beginning, but we may use size up to 32MB; The 'timeout' will overflow if size bigger than 51.2MB after this fix, which should be enough for U-Boot; - The timeout is using clock speed for data rate, but the device may not have such high speed, eg. clock is 52MHz while the device write speed may be less than 10MB/s, and we may use up to 150MHz clock. Fix them in this patch, the max timeout is about 6500 when size is 32MB after fix. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'drivers/mmc/mmc_spi.c')
0 files changed, 0 insertions, 0 deletions