From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mx31pdk: Enable D and I caches
Date: Fri, 04 Nov 2011 07:40:18 +0100 [thread overview]
Message-ID: <4EB388D2.4020808@denx.de> (raw)
In-Reply-To: <1320171397-28477-1-git-send-email-fabio.estevam@freescale.com>
On 11/01/2011 07:16 PM, Fabio Estevam wrote:
> Enable D and I caches on mx31pdk.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Stefano,
>
> You explained that enabling cache may cause some drivers like FEC and MMC not to work properly.
> As mx31pdk does not have FEC or MMC driver I thought this should be OK.
>
> Tested by booting Linux kernel via TFTP and mounting a NFS rootfs.
>
> board/freescale/mx31pdk/mx31pdk.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
> index 9f8bc53..1d7b4f6 100644
> --- a/board/freescale/mx31pdk/mx31pdk.c
> +++ b/board/freescale/mx31pdk/mx31pdk.c
> @@ -71,11 +71,19 @@ int board_early_init_f(void)
> return 0;
> }
>
> +void enable_caches(void)
> +{
> + icache_enable();
> + dcache_enable();
> +}
> +
> int board_init(void)
> {
> /* adress of boot parameters */
> gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
>
> + enable_caches();
> +
> return 0;
> }
>
Applied to u-boot-imx, thanks.
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
=====================================================================
prev parent reply other threads:[~2011-11-04 6:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-01 18:16 [U-Boot] [PATCH] mx31pdk: Enable D and I caches Fabio Estevam
2011-11-02 8:41 ` Stefano Babic
2011-11-02 23:31 ` Fabio Estevam
2011-11-03 8:02 ` Jason Liu
2011-11-04 6:40 ` Stefano Babic [this message]
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=4EB388D2.4020808@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