[U-Boot] [RFC] command/cache: Add flush_cache command

Scott Wood scottwood at freescale.com
Wed Mar 20 17:44:31 CET 2013


On 03/20/2013 09:51:03 AM, Wolfgang Denk wrote:
> Dear York Sun,
> 
> In message <1363724992-9803-1-git-send-email-yorksun at freescale.com>  
> you wrote:
> > When we need the copied code/data in the main memory, we can flush  
> the
> > cache now. It uses the existing function flush_cache. Syntax is
> >
> > flush_cache <addr> <size>
> >
> > The addr and size are given in hexadecimal. Like memory command,  
> there is
> > no sanity check for the parameters.
> 
> Why would it be necessary to ever run this manually?
> 
> I feel you are just papering over bugs / shortcomings elsewhere in the
> code.  Should we not rather fix the places where the cache flushes are
> missing in the code?

Possibly -- the alternative would be to have every command that  
modifies memory flush that region of cache afterward (cp, tftp, etc).

You could say the same thing about the existing cache command, though.

-Scott











































































More information about the U-Boot mailing list