[U-Boot] [PATCH] mx53: use CONFIG_SYS_L2CACHE_OFF in config file

Stefano Babic sbabic at denx.de
Thu Jul 28 12:40:39 CEST 2011


On 07/28/2011 12:22 PM, Jason Liu wrote:
> Hi, stefano,

Hi Jason,

> Look at the meaning from the name X_OFF, if we define it, it tells
> people that we want to disable it explicitly.

Yes, but is only dead code for MX5. It has sense only if we add
l2_cache_enable() and disable functions.

> If not define it, it underlying
> tells that we want to enable it, right?

No, it says nothing. A lot of boards has not set this CONFIG, but this
does not mean that L2 cache is enabled.

> So, if we remove this define L2_OFF
> from board config file, it may cause confuse since we don't want to
> enable it now.

IMHO it is confusing if we add it.

If we set them into the config file, it means that the L2 Cache is
enable simply dropping it, and this is not true, as there is not yet
support. Better to add it when we have really support for it.

>> I am still checking this point. My concern is to understand if in the
>> current code we need to do something or not. If there is no code to
>> enable L2 cache (I have not found), there should be no need to disable
>> it. After a reset, L2 cache is disabled, am I right ?
>> Why do you think we have to explicitely disable it ? Am I missing
>> something ?
> 
> Currently, MX5 will disable L2 after reset. some points as above.

Ok, we agree

> Yes, currently, we don't manage L2.
> But, I don't know whether the common code will be changed in the future,
> if we don't disable L2 explicitly, it will enable L2 by default just
> like d-cache.

Well, we will check this issue when it will be needed. We cannot know
the future, it coul also be there is support for L2 Cache at that moment
for the i.MX5.

>> I think, if we agree on these point, we can manage the changes in a
>> single patch (changes are made on the same files, that is the
>> configuration file for the boards), and it is enough to add a useful
>> comment to explain what we do.
> 
> OK, after get agreement, I will do it soon with single patch.

Ok, I think we agree how to proceed ;-)

>> I am sure we get the same issues for D Cache as for the FEC. In fact,
>> for powerpc the fsl_esdhc.c enables cache snooping and does not need to
>> invalidate buffers. We have no counterpart for MX5.
> 
> Yes, correct.

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list