mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
mmc: fix dest address
After reading data from mmc, dest pointer will point to the end address. To calculate the start of dest pointer number of bytes copied has to be subtracted. Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org> Change-Id: I24610a3b3bb498c4ee4ebba58e557d109c6af1ef
This commit is contained in:
parent
8f22bd73ef
commit
76d4b7de87
1 changed files with 2 additions and 1 deletions
|
|
@ -272,7 +272,8 @@ static ulong mmc_bread(int dev_num, lbaint_t start, lbaint_t blkcnt, void *dst)
|
|||
dst += cur * mmc->read_bl_len;
|
||||
} while (blocks_todo > 0);
|
||||
#if !defined(CONFIG_SYS_DCACHE_OFF)
|
||||
flush_cache((unsigned long)dst, blkcnt * mmc->read_bl_len);
|
||||
flush_cache((unsigned long)dst - ( blkcnt * mmc->read_bl_len),
|
||||
blkcnt * mmc->read_bl_len);
|
||||
#endif
|
||||
|
||||
return blkcnt;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue