[U-Boot] [PATCH 2/2] ARMv7: at91: enable ICache and DCache.

Bo Shen voice.shen at atmel.com
Fri May 16 11:56:49 CEST 2014


Hi Josh,

On 05/16/2014 05:17 PM, Josh Wu wrote:
>>> diff --git a/board/atmel/sama5d3xek/sama5d3xek.c
>>> b/board/atmel/sama5d3xek/sama5d3xek.c
>>> index c835c12..1fc91d9 100644
>>> --- a/board/atmel/sama5d3xek/sama5d3xek.c
>>> +++ b/board/atmel/sama5d3xek/sama5d3xek.c
>>> @@ -200,8 +200,12 @@ int board_init(void)
>>>           at91_gmac_hw_init();
>>>   #endif
>>>   #ifdef CONFIG_LCD
>>> -    if (has_lcdc())
>>> +    if (has_lcdc()) {
>>>           sama5d3xek_lcd_hw_init();
>>> +
>>> +        /* Enable flushing as we enabled dcache */
>>> +        lcd_set_flush_dcache(1);
>>
>> Why not implement in driver, or else, each SoC enable dcache will need
>> add this.
>
> hmm, the thing is some at91 board, for example at91sam9x5ek board, not
> defined CONFIG_SYS_DCACHE_OFF, that means DCache is enabled. But
> actually it doesn't implement dcache_enable().
> In above situation, if we implement it in driver, I can't tell whether
> dcache is really enabled or not.
> For this reason, I manually call lcd_set_flush_dcache(1) in the board file.
> In the future if all boards (use hlcd driver) enabled dcache I will move
> this function to hlcd driver.

I don't see any issue to implement this in driver, may be I am wrong? 
Can you figure out what issue you met?

Btw, if there is really have issues, can make this condition with 
CONFIG_SYS_DCACHE_OFF?

> Best Regards,
> Josh Wu

Best Regards,
Bo Shen


More information about the U-Boot mailing list