yes - you are correct
thank you
Eyal Bari wrote:Probably already fixed in the latest git. See below commit:
in your version of the function the iterated cache ops second argument was start_addr which stay constant.
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=188e94c370621708d13547d58dbc6ed3c5602aa8Note that (addr == aend) is evaluated *after* cache_op()s.
the second bug is that it doesn't iterate over the entire range:
for example:
if size is 42 and the cache line size is 32 - it takes two cache lines to cache this buffer
your version will iterate only over one cache line
my version will iterate over two cache line covering the entire range
If start_addr = 0x80000000, size = 42, CFG_CACHE_LINE_SIZE = 32,
cache_op( , 0x80000000) and cache_op( , 0x80000020) will be done.
I hope I don't miss anything.