From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 8 Apr 2013 14:50:20 -0500 Subject: [U-Boot] [v3] command/cache: Add flush command In-Reply-To: <20130407082931.1F28B200400@gemini.denx.de> (from wd@denx.de on Sun Apr 7 03:29:31 2013) References: <1365195056-20188-1-git-send-email-yorksun@freescale.com> <20130405220955.DC9BB2015C6@gemini.denx.de> <515F5812.8030008@freescale.com> <20130406070150.54B072002D9@gemini.denx.de> <20130407082931.1F28B200400@gemini.denx.de> Message-ID: <1365450620.28843.12@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 04/07/2013 03:29:31 AM, Wolfgang Denk wrote: > Dear sun york-R58495, > > In message > > 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 . > > 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 thought you said it was OK to flush more than the user asked for, if the implementation does not have separate icache/dcache flushes? Why is it fundamentally different if it's a hardware limitation, or a limitation of the software layer whose functionality is being exposed? -Scott