[U-Boot] [v3] command/cache: Add flush command

sun york-R58495 R58495 at freescale.com
Mon Apr 8 19:45:59 CEST 2013


On Apr 7, 2013, at 1:29 AM, Wolfgang Denk wrote:

> Dear sun york-R58495,
> 
> In message <C707E9F4D8007146BF8DC1424B113AC70B3A435B at 039-SN2MPN1-012.039d.mgd.msft.net> you wrote:
>> 
>>> Can we not split this into:
>>> 
>>> 	dcache flush
>>> 	icache invalidate
>>> 
>>> ?  This would make clear what's happening.
>> 
>> 
>> The idea is to reuse existing code with minimum addition. For the applicati
>> ons concerned, these two steps are both needed. Splitting them doesn't make
>> things easier.
> 
> Reusing code is a Good Thing, but not when it comes at the cost of
> obfucating what the code actually does.
> 
>> If I have to use existing command, I'd rather to put these two steps under
>> icache invalide <addr> <size>.
> 
> No, this is not acceptable.  The "icache" command deals with the IC
> only, it must not meddle with the data cache (like flushing it).
> 

I think it is best to keep this patch as it and stick with the original flush_cache name. It uses the existing function flush_cache() which is available for most (if not all) architectures. Splitting the dcache and icache not only adds more code, but architecture-dependent code.

York
 




More information about the U-Boot mailing list