From: Sudeep Holla <Sudeep.Holla@arm.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 04/04] ARM: shmobile: r8a7790 CCI configuration
Date: Wed, 15 Jan 2014 14:01:47 +0000 [thread overview]
Message-ID: <52D694CB.5020807@arm.com> (raw)
In-Reply-To: <20140115122622.9437.27236.sendpatchset@w520>
Hi,
On 15/01/14 12:26, Magnus Damm wrote:
> From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
>
> Add the settings of CCI-400 for enabling ca15/ca7 snoop on r8a7790.
>
> Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
>
> arch/arm/mach-shmobile/smp-r8a7790.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> --- 0005/arch/arm/mach-shmobile/smp-r8a7790.c
> +++ work/arch/arm/mach-shmobile/smp-r8a7790.c 2014-01-15 15:40:56.000000000 +0900
> @@ -28,6 +28,11 @@
> #define CA15RESCNT 0x0040
> #define CA7RESCNT 0x0044
> #define MERAM 0xe8080000
> +#define CCI_BASE 0xf0090000
> +#define CCI_SLAVE3 0x4000
> +#define CCI_SLAVE4 0x5000
> +#define CCI_SNOOP 0x0000
> +#define CCI_STATUS 0x000c
>
> static struct rcar_sysc_ch r8a7790_ca15_scu = {
> .chan_offs = 0x180, /* PWRSR5 .. PWRER5 */
> @@ -71,6 +76,16 @@ static void __init r8a7790_smp_prepare_c
> r8a7790_pm_init();
> rcar_sysc_power_up(&r8a7790_ca15_scu);
> rcar_sysc_power_up(&r8a7790_ca7_scu);
> +
> + /* enable snoop and DVM */
> + p = ioremap_nocache(CCI_BASE, 0x8000);
> + writel_relaxed(readl_relaxed(p + CCI_SLAVE3 + CCI_SNOOP) | 0x3,
> + p + CCI_SLAVE3 + CCI_SNOOP); /* ca15 */
> + writel_relaxed(readl_relaxed(p + CCI_SLAVE4 + CCI_SNOOP) | 0x3,
> + p + CCI_SLAVE4 + CCI_SNOOP); /* ca7 */
> + while (__raw_readl(p + CCI_STATUS));
> + /* wait for pending bit low */
> + iounmap(p);
> }
I have mentioned this before, please use drivers/bus/arm-cci.c
That already does the job you need here and you need to use CCI DT bindings
for base address.
Regards,
Sudeep
WARNING: multiple messages have this Message-ID (diff)
From: Sudeep.Holla@arm.com (Sudeep Holla)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 04/04] ARM: shmobile: r8a7790 CCI configuration
Date: Wed, 15 Jan 2014 14:01:47 +0000 [thread overview]
Message-ID: <52D694CB.5020807@arm.com> (raw)
In-Reply-To: <20140115122622.9437.27236.sendpatchset@w520>
Hi,
On 15/01/14 12:26, Magnus Damm wrote:
> From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
>
> Add the settings of CCI-400 for enabling ca15/ca7 snoop on r8a7790.
>
> Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
>
> arch/arm/mach-shmobile/smp-r8a7790.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> --- 0005/arch/arm/mach-shmobile/smp-r8a7790.c
> +++ work/arch/arm/mach-shmobile/smp-r8a7790.c 2014-01-15 15:40:56.000000000 +0900
> @@ -28,6 +28,11 @@
> #define CA15RESCNT 0x0040
> #define CA7RESCNT 0x0044
> #define MERAM 0xe8080000
> +#define CCI_BASE 0xf0090000
> +#define CCI_SLAVE3 0x4000
> +#define CCI_SLAVE4 0x5000
> +#define CCI_SNOOP 0x0000
> +#define CCI_STATUS 0x000c
>
> static struct rcar_sysc_ch r8a7790_ca15_scu = {
> .chan_offs = 0x180, /* PWRSR5 .. PWRER5 */
> @@ -71,6 +76,16 @@ static void __init r8a7790_smp_prepare_c
> r8a7790_pm_init();
> rcar_sysc_power_up(&r8a7790_ca15_scu);
> rcar_sysc_power_up(&r8a7790_ca7_scu);
> +
> + /* enable snoop and DVM */
> + p = ioremap_nocache(CCI_BASE, 0x8000);
> + writel_relaxed(readl_relaxed(p + CCI_SLAVE3 + CCI_SNOOP) | 0x3,
> + p + CCI_SLAVE3 + CCI_SNOOP); /* ca15 */
> + writel_relaxed(readl_relaxed(p + CCI_SLAVE4 + CCI_SNOOP) | 0x3,
> + p + CCI_SLAVE4 + CCI_SNOOP); /* ca7 */
> + while (__raw_readl(p + CCI_STATUS));
> + /* wait for pending bit low */
> + iounmap(p);
> }
I have mentioned this before, please use drivers/bus/arm-cci.c
That already does the job you need here and you need to use CCI DT bindings
for base address.
Regards,
Sudeep
next prev parent reply other threads:[~2014-01-15 14:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 12:25 [PATCH 00/04] ARM: shmobile: r8a7790 SYSC, SCU and CCI setup code Magnus Damm
2014-01-15 12:25 ` Magnus Damm
2014-01-15 12:25 ` [PATCH 01/04] ARM: shmobile: r8a7790 SYSC " Magnus Damm
2014-01-15 12:25 ` Magnus Damm
2014-01-15 12:26 ` [PATCH 02/04] ARM: shmobile: r8a7790 CA7-SCU enablement Magnus Damm
2014-01-15 12:26 ` Magnus Damm
2014-01-15 12:26 ` [PATCH 03/04] ARM: shmobile: r8a7790 CA15-SCU enablement Magnus Damm
2014-01-15 12:26 ` Magnus Damm
2014-01-15 12:26 ` [PATCH 04/04] ARM: shmobile: r8a7790 CCI configuration Magnus Damm
2014-01-15 12:26 ` Magnus Damm
2014-01-15 14:01 ` Sudeep Holla [this message]
2014-01-15 14:01 ` Sudeep Holla
2014-02-06 7:06 ` [PATCH 00/04] ARM: shmobile: r8a7790 SYSC, SCU and CCI setup code Simon Horman
2014-02-06 7:06 ` Simon Horman
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=52D694CB.5020807@arm.com \
--to=sudeep.holla@arm.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 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.