public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] mx6: Enable L2 cache support
Date: Tue, 28 Jan 2014 17:53:06 +0100	[thread overview]
Message-ID: <52E7E072.2000501@gmail.com> (raw)
In-Reply-To: <1390920860-12153-1-git-send-email-fabio.estevam@freescale.com>

Hi Fabio,

Am 28.01.2014 15:54, schrieb Fabio Estevam:
> Add L2 cache support and enable it by default.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Changes since v2:
> - Add L2_PL310_BASE definition in imx_regs.h
> Changes since v1:
> - Fx typo in commit log
>
>   arch/arm/cpu/armv7/mx6/soc.c             | 20 ++++++++++++++++++++
>   arch/arm/include/asm/arch-mx6/imx-regs.h |  1 +
>   include/configs/mx6_common.h             |  5 +++++
>   3 files changed, 26 insertions(+)
>
> diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
> index 0208cba..b84de87 100644
> --- a/arch/arm/cpu/armv7/mx6/soc.c
> +++ b/arch/arm/cpu/armv7/mx6/soc.c
> @@ -8,6 +8,8 @@
>    */
>
>   #include <common.h>
> +#include <asm/armv7.h>
> +#include <asm/pl310.h>
>   #include <asm/errno.h>
>   #include <asm/io.h>
>   #include <asm/arch/imx-regs.h>
> @@ -336,3 +338,21 @@ void imx_setup_hdmi(void)
>   	writel(reg, &mxc_ccm->chsccdr);
>   }
>   #endif
> +
> +#ifndef CONFIG_SYS_L2CACHE_OFF
> +#define L2CACHE		1
> +void v7_outer_cache_enable(void)
> +{
> +	struct pl310_regs *const pl310 = (struct pl310_regs *)L2_PL310_BASE;
> +
> +	setbits_le32(&pl310->pl310_ctrl, L2CACHE);
> +
> +}

Just for better understanding: Do you want to keep this intentionally 
simple? Or is there any special reason why you don't set additional 
(performance) registers here? E.g. the L2 PREFETCH and POWER 
registers, and the tag and data latency settings? Like done in the kernel.

Best regards

Dirk

  parent reply	other threads:[~2014-01-28 16:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 14:54 [U-Boot] [PATCH v3] mx6: Enable L2 cache support Fabio Estevam
2014-01-28 14:58 ` Stefano Babic
2014-01-28 16:53 ` Dirk Behme [this message]
2014-01-28 19:12   ` Fabio Estevam
2014-01-29 12:47   ` Stefano Babic
2014-01-29 17:57     ` Fabio Estevam

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=52E7E072.2000501@gmail.com \
    --to=dirk.behme@gmail.com \
    --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