From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V1 1/1] MX5: Keep L2 cache enabled before jump to kernel
Date: Fri, 15 Apr 2011 17:09:11 +0200 [thread overview]
Message-ID: <4DA85F97.1040706@denx.de> (raw)
In-Reply-To: <1302701143-10624-1-git-send-email-jason.hui@linaro.org>
On 04/13/2011 03:25 PM, Jason Liu wrote:
Hi Jason,
> Currently, Linux kernel does not do any L2 cache enable
> Operation.So,Keep L2 cache enabled(L2EN=1) in the u-boot
> before Jump to the Linux Kernel and thus L2 cache can be
> effectively used in Linux Kernel.
If the cache is not active in the kernel for MX5, this should be fixed
in the kernel for this architecture. Normally, cache is activated inside
the kernel itself, as I cann see for other architectures and other ARMV7
processors (omap)
However, if you plan to add cache support, why not add the functions to
get the cache enabled in u-boot ?
> +
> +/*
> + * Sine we did not enable D-cache in uboot,this is the
> + * Dummy function for L2 ON to make build pass. please
> + * Check the arch/arm/cpu/armv7/cpu.c file
> + */
This seems to me a workaround for a non clear problem (at least, not
clear for me..) to activate the cache at the startup of the kernel.
There are already processors in u-boot supporting the cache, and if we
add caching functions to u-boot for i.MX5, we must implement the full
support to have cache active in the bootloader.
> +invalidate_dcache:
> + mov pc, lr
> +
> +l2_cache_enable:
> + mrc p15, 0, r0, c1, c0, 1;
No registers are saved before calling this funtion ?
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
=====================================================================
next prev parent reply other threads:[~2011-04-15 15:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-13 13:25 [U-Boot] [PATCH V1 1/1] MX5: Keep L2 cache enabled before jump to kernel Jason Liu
2011-04-14 12:09 ` Albert ARIBAUD
2011-04-15 15:09 ` Stefano Babic [this message]
2011-04-15 15:55 ` Jason Liu
2011-04-16 9:55 ` Albert ARIBAUD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DA85F97.1040706@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox