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

Wolfgang Denk wd at denx.de
Sat Apr 6 00:09:55 CEST 2013


Dear York Sun,

In message <1365195056-20188-1-git-send-email-yorksun at freescale.com> you wrote:
> When we copy code/data to the main memory, we may need to flush the
> cache if required by architecture. It uses the existing function
> flush_cache. Syntax is
> 
> flush <addr> <size>

Plain "flush" is way too generic a name.  I think we should make it
clear from the command invocation that we are dealing with caches
here.

Actually I think we should not even use a new command for this - we
already have the "dcahe" and "icache" commands for this purpose.

What do you think about implementiung this as a subcommand to
"dcache"?  Something like:

So far:

	dcache on
	dcache off

adding new:

	dcache flush			=> flush all
	dcache flush <addr> <size>	=> flush range

I think this makes more sense.  Comments?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is surely a great calamity for  a  human  being  to  have  no  ob-
sessions.                                                - Robert Bly


More information about the U-Boot mailing list