public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: sshtylyov@mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: S5PC210: Set the common L2 cache configurations
Date: Sat, 11 Sep 2010 15:11:16 +0400	[thread overview]
Message-ID: <4C8B63D4.2010608@ru.mvista.com> (raw)
In-Reply-To: <20100911053115.GA23209@july>

Hello.

On 11-09-2010 9:31, Kyungmin Park wrote:

> From: Kyungmin Park<kyungmin.park@samsung.com>

> S5PC210 has PL310 1MiB L2 cache.
> It uses the optimized data&  tag latency and also enable the prefetch.

> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
> ---
>   arch/arm/mach-s5pv310/cpu.c |   19 +++++++++++++++++++
>   1 files changed, 19 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
> index e5b261a..b50312e 100644
> --- a/arch/arm/mach-s5pv310/cpu.c
> +++ b/arch/arm/mach-s5pv310/cpu.c
> @@ -15,6 +15,7 @@
>   #include<asm/mach/irq.h>
>
>   #include<asm/proc-fns.h>
> +#include<asm/hardware/cache-l2x0.h>
>
>   #include<plat/cpu.h>
>   #include<plat/clock.h>
> @@ -121,6 +122,24 @@ static int __init s5pv310_core_init(void)
>
>   core_initcall(s5pv310_core_init);
>
> +static int __init s5pv310_init_cache(void)
> +{
> +#ifdef CONFIG_CACHE_L2X0
> +	void __iomem *p = S5P_VA_L2CC;
> +
> +	/* TAG,  Data latency control */
> +	writel(0x110, p + L2X0_TAG_LATENCY_CTRL);
> +	writel(0x110, p + L2X0_DATA_LATENCY_CTRL);
> +
> +	/* L2 cache prefetch control */
> +	writel(0x6, p + L2X0_PREFETCH_CTRL);
> +
> +	l2x0_init(p, 0x3C070001, 0xC200FFFF);
> +#endif
> +	return 0;
> +}

    CodingStyle document forbids #ifdef's in the function bodies, so this 
should better be:

#ifdef CONFIG_CACHE_L2X0
static int __init s5pv310_init_cache(void)
{
	/* ... */
	return 0;
}
#else
static int__init s5pv310_init_cache(void)
{
	return 0;
}
#endif

WBR, Sergei

  reply	other threads:[~2010-09-11 11:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-11  5:31 [PATCH 3/3] ARM: S5PC210: Set the common L2 cache configurations Kyungmin Park
2010-09-11 11:11 ` Sergei Shtylyov [this message]
2010-09-14  9:48 ` Kukjin Kim
2010-09-14  9:56   ` Kyungmin Park

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=4C8B63D4.2010608@ru.mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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