All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] mx6: Enable L2 cache support
Date: Tue, 28 Jan 2014 15:36:28 +0100	[thread overview]
Message-ID: <52E7C06C.9080002@denx.de> (raw)
In-Reply-To: <1390918934-3074-1-git-send-email-fabio.estevam@freescale.com>

Hi Fabio,

On 28/01/2014 15:22, Fabio Estevam wrote:
> Add L2 cache support and enable it by default.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Changes since v1:
> - Fx typo in commit log
> 
>  arch/arm/cpu/armv7/mx6/soc.c | 22 ++++++++++++++++++++++
>  include/configs/mx6_common.h |  5 +++++
>  2 files changed, 27 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
> index 0208cba..5e1e5e9 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,23 @@ 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 *)CONFIG_SYS_PL310_BASE;
> +
> +	setbits_le32(&pl310->pl310_ctrl, L2CACHE);
> +
> +}
> +
> +void v7_outer_cache_disable(void)
> +{
> +	struct pl310_regs *const pl310 =
> +			(struct pl310_regs *)CONFIG_SYS_PL310_BASE;
> +
> +	clrbits_le32(&pl310->pl310_ctrl, L2CACHE);
> +}
> +#endif /* !CONFIG_SYS_L2CACHE_OFF */
> diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
> index 514d634..993eca1 100644
> --- a/include/configs/mx6_common.h
> +++ b/include/configs/mx6_common.h
> @@ -22,4 +22,9 @@
>  #define CONFIG_ARM_ERRATA_751472
>  #define CONFIG_BOARD_POSTCLK_INIT
>  
> +#ifndef CONFIG_SYS_L2CACHE_OFF
> +#define CONFIG_SYS_L2_PL310
> +#define CONFIG_SYS_PL310_BASE          0x00A02000

Why is the address defined here nad not in imx_regs.h ?

Best regards,
Stefano

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

      reply	other threads:[~2014-01-28 14:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 14:22 [U-Boot] [PATCH v2] mx6: Enable L2 cache support Fabio Estevam
2014-01-28 14:36 ` 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=52E7C06C.9080002@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.