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

Jason Liu liu.h.jason at gmail.com
Thu Jul 28 07:56:52 CEST 2011


Hi, Stefano,

2011/7/26 Jason Hui <jason.hui at linaro.org>:
> Hi, Stefano,
>
> On Tue, Jul 26, 2011 at 5:21 PM, Stefano Babic <sbabic at denx.de> wrote:
>> On 07/26/2011 10:25 AM, Jason Liu wrote:
>>> CONFIG_L2_OFF is obsolete after the following commit:
>>>
>>> e47f2db5371047eb9bcd115fee084e6a8a92a239
>>> armv7: rename cache related CONFIG flags
>>> Replace the cache related CONFIG flags with more meaningful
>>> names. Following are the changes:
>>> CONFIG_L2_OFF      -> CONFIG_SYS_L2CACHE_OFF
>>>
>>> But the above commit does not clean up all the mx53 board config file.
>>> This patch does it by using CONFIG_SYS_L2CACHE_OFF instead of _L2_OFF
>>>
>>
>> Hi Jason,
>>
>> I agree  that CONFIG_L2_OFF is obsolete and must be removed. However, I
>> do not see any application of CONFIG_SYS_L2CACHE_OFF.
>>
>> If I grep into u-boot code, this config is not used at all for i.MX.
>> Indeed, I can find application for OMAP boards:
>>
>> arch/arm/cpu/armv7/omap3/board.c:#ifndef CONFIG_SYS_L2CACHE_OFF
>> arch/arm/cpu/armv7/omap3/board.c:#ifndef CONFIG_SYS_L2CACHE_OFF
>> arch/arm/cpu/armv7/s5pc1xx/cache.S:#ifndef CONFIG_SYS_L2CACHE_OFF
>> arch/arm/cpu/armv7/omap4/board.c:#ifndef CONFIG_SYS_L2CACHE_OFF
>>
>> So this setup is usefulness, I think.
>
> It's used before, if you checkout tag: v2011.06
>
> #ifndef CONFIG_L2_OFF
>        /* turn off L2 cache */
>        l2_cache_disable();
>        /* invalidate L2 cache also */
>        invalidate_dcache(get_device_type());
> #endif
>        i = 0;
>        /* mem barrier to sync up things */
>        asm("mcr p15, 0, %0, c7, c10, 4": :"r"(i));
>
> #ifndef CONFIG_L2_OFF
>        l2_cache_enable();
> #endif
>
>
> I still think we need explicitly disable L2 cache first. If it only
> omap related, I don't think we need
> CONFIG_SYS_L2CACHE_OFF for the global u-boot. If you grep the
> CONFIG_SYS_L2CACHE_OFF
> under include/configs, you will see a lot of define other than omap platform.
>
>>
>> By the way (and I know it is not the same topic), do you mean maybe
>> CONFIG_SYS_DCACHE_OFF ? Have you read the thread related to cache
>> problems on MX51 ? Maybe we have to disable D_CACHE until we find a fix
>> for the drivers. What do you mean ?
>
> Yes, the fec is not working after commit:
> c2dd0d45540397704de9b13287417d21049d34c6
> armv7: integrate cache maintenance support
>
> It's due to it enable dcache by default if not define
> CONFIG_SYS_DCACHE_OFF explicitly.
> mxc_fec driver need be fixed or re-write to consider cache safe. I
> agree to disable d-cache first.

Do I need submit patch to disable D-CACHE first?  And another issue
for imx51 is that
mmc command does not work correctly sometimes such as saveenv. Do you
notice that?


Jason

>
> Jason
>
>>
>> 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
>> =====================================================================
>>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>


More information about the U-Boot mailing list