From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Poirier Date: Wed, 04 Jul 2012 13:53:16 -0600 Subject: [U-Boot] [RESEND 11/11] snowball: Adding board specific cache cleanup routine In-Reply-To: <20120704185319.B55572026BF@gemini.denx.de> References: <1341413915-7944-1-git-send-email-mathieu.poirier@linaro.org> <1341413915-7944-12-git-send-email-mathieu.poirier@linaro.org> <20120704185319.B55572026BF@gemini.denx.de> Message-ID: <4FF49F2C.1030301@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12-07-04 12:53 PM, Wolfgang Denk wrote: > Dear mathieu.poirier at linaro.org, > > In message <1341413915-7944-12-git-send-email-mathieu.poirier@linaro.org> you wrote: >> From: "Mathieu J. Poirier" >> >> Following ARM's reference manuel for initializing the cache - the >> kernel won't boot otherwise. >> >> Signed-off-by: Mathieu Poirier >> Signed-off-by: John Rigby >> --- >> Changes for v2: >> - Correcting cache maintenance register address. >> - Invalidating all 16 bits in cache maintenance register. >> - Polling cache maintenance register for cleared bits. >> - Added comments to the code. >> - Re-worked commit description. >> --- >> arch/arm/cpu/armv7/u8500/cpu.c | 16 ++++++++++++++++ >> 1 files changed, 16 insertions(+), 0 deletions(-) > ... >> +void cpu_cache_initialization(void) >> +{ >> + /* invalidate all cache entries */ >> + *((volatile unsigned int *)(0xA041277C)) = 0xFFFF; > ... >> + while (*((volatile unsigned int *)(0xA041277C)) & 0xFF) > ... >> + *((volatile unsigned int *)(0xA0412900)) = 0xFF; >> + *((volatile unsigned int *)(0xA0412904)) = 0xFF; > > NAK. Please use proper I/O accessors, and declare a C struct to > access these registers. Ok, to make sure I do this properly please point me to an example in the code base where I can find I/O accessors. Also, could you be more specific about the C struct you're like to see implemented - again and example in the code would be welcomed. Thanks, Mathieu. > > Best regards, > > Wolfgang Denk >