[U-Boot] [PATCH] tegra2: Enable data cache

Simon Glass sjg at chromium.org
Wed Sep 14 17:13:40 CEST 2011


Hi Aneesh,

On Wed, Sep 14, 2011 at 6:10 AM, Aneesh V <aneesh at ti.com> wrote:
[snip]
>> not specific to your patch, but this seems kind of dumb to copy & paste the
>> same thing between all the arm sub arches/boards.  why cant the default
>> enable_caches() look like this for arm:
>> void enable_caches(void)
>> {
>> #ifndef CONFIG_SYS_DCACHE_OFF
>>       dcache_enable();
>> #endif
>> #ifndef CONFIG_SYS_ICACHE_OFF
>>       icache_enable();
>> #endif
>> }
>
> That was how it was earlier. But then many boards were not cache ready
> and still didn't define CONFIG_SYS_DCACHE_OFF, so they were broken. So,
> the current situation is that the absence of CONFIG_SYS_DCACHE_OFF
> doesn't mean that the board is cache-ready.
>
> I like the suggestion made by Jason Liu, that of using
> CONFIG_SYS_DCACHE_ON instead. In the present situation ARM cpus that
> properly support cache handling seems to be in the minority, so
> CONFIG_SYS_DCACHE_ON may be more appropriate. But Wolfgang doesn't seem
> to like this.

My concern with this is that the situation will never improve. At
least this way there will be an incentive to sort things out, since
one day the cache enable code will be in arch/arm/lib/board.c. I hope
it is soon, but it will need more driver support first.

Regards,
Simon

>
> best regards,
> Aneesh
>


More information about the U-Boot mailing list