From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 20 Mar 2013 11:44:31 -0500 Subject: [U-Boot] [RFC] command/cache: Add flush_cache command In-Reply-To: <20130320145104.03CB820063B@gemini.denx.de> (from wd@denx.de on Wed Mar 20 09:51:03 2013) References: <1363724992-9803-1-git-send-email-yorksun@freescale.com> <20130320145104.03CB820063B@gemini.denx.de> Message-ID: <1363797871.25034.1@snotra> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 03/20/2013 09:51:03 AM, Wolfgang Denk wrote: > Dear York Sun, > > In message <1363724992-9803-1-git-send-email-yorksun@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 > > > > 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