* [PATCH v2] ARM: shmobile: r8a7790 CCI configuration
@ 2014-11-25 8:25 Gaku Inami
2014-11-25 10:04 ` Sudeep Holla
0 siblings, 1 reply; 3+ messages in thread
From: Gaku Inami @ 2014-11-25 8:25 UTC (permalink / raw)
To: linux-arm-kernel
Add the settings of CCI-400 for enabling ca15/ca7 snoop on r8a7790.
Needed to configure the CCI boot cluster port regardless of MCPM.
Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
Changes since version 1:
- Fix a way to wait for the register read.
arch/arm/mach-shmobile/smp-r8a7790.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
index 9c3da13..b65d908 100644
--- a/arch/arm/mach-shmobile/smp-r8a7790.c
+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
@@ -25,6 +25,12 @@
#include "pm-rcar.h"
#include "r8a7790.h"
+#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 */
.isr_bit = 12, /* CA15-SCU */
@@ -48,6 +54,8 @@ static struct rcar_apmu_config r8a7790_apmu_config[] = {
static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
{
+ void __iomem *p;
+
/* let APMU code install data related to shmobile_boot_vector */
shmobile_smp_apmu_prepare_cpus(max_cpus,
r8a7790_apmu_config,
@@ -57,6 +65,17 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
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 (readl_relaxed(p + CCI_STATUS))
+ cpu_relax();
+ /* wait for pending bit low */
+ iounmap(p);
}
struct smp_operations r8a7790_smp_ops __initdata = {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ARM: shmobile: r8a7790 CCI configuration
2014-11-25 8:25 [PATCH v2] ARM: shmobile: r8a7790 CCI configuration Gaku Inami
@ 2014-11-25 10:04 ` Sudeep Holla
2014-11-26 1:25 ` Gaku Inami
0 siblings, 1 reply; 3+ messages in thread
From: Sudeep Holla @ 2014-11-25 10:04 UTC (permalink / raw)
To: linux-arm-kernel
On 25/11/14 08:25, Gaku Inami wrote:
> Add the settings of CCI-400 for enabling ca15/ca7 snoop on r8a7790.
> Needed to configure the CCI boot cluster port regardless of MCPM.
>
> Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>
> Changes since version 1:
> - Fix a way to wait for the register read.
>
> arch/arm/mach-shmobile/smp-r8a7790.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
> index 9c3da13..b65d908 100644
> --- a/arch/arm/mach-shmobile/smp-r8a7790.c
> +++ b/arch/arm/mach-shmobile/smp-r8a7790.c
> @@ -25,6 +25,12 @@
> #include "pm-rcar.h"
> #include "r8a7790.h"
>
> +#define CCI_BASE 0xf0090000
> +#define CCI_SLAVE3 0x4000
> +#define CCI_SLAVE4 0x5000
> +#define CCI_SNOOP 0x0000
> +#define CCI_STATUS 0x000c
> +
I have asked the same question multiple times in the past, why are you
not using the DT bindings and the CCI driver for this ? Why are you
duplicating the code ? Any limitations to use them ?
Regards,
Sudeep
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ARM: shmobile: r8a7790 CCI configuration
2014-11-25 10:04 ` Sudeep Holla
@ 2014-11-26 1:25 ` Gaku Inami
0 siblings, 0 replies; 3+ messages in thread
From: Gaku Inami @ 2014-11-26 1:25 UTC (permalink / raw)
To: linux-arm-kernel
Hi Sudeep,
(2014/11/25 19:04), Sudeep Holla wrote:
>
>
> On 25/11/14 08:25, Gaku Inami wrote:
>> Add the settings of CCI-400 for enabling ca15/ca7 snoop on r8a7790.
>> Needed to configure the CCI boot cluster port regardless of MCPM.
>>
>> Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
>> Signed-off-by: Magnus Damm <damm@opensource.se>
>> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>> ---
>>
>> Changes since version 1:
>> - Fix a way to wait for the register read.
>>
>> arch/arm/mach-shmobile/smp-r8a7790.c | 19 +++++++++++++++++++
>> 1 file changed, 19 insertions(+)
>>
>> diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
>> index 9c3da13..b65d908 100644
>> --- a/arch/arm/mach-shmobile/smp-r8a7790.c
>> +++ b/arch/arm/mach-shmobile/smp-r8a7790.c
>> @@ -25,6 +25,12 @@
>> #include "pm-rcar.h"
>> #include "r8a7790.h"
>>
>> +#define CCI_BASE 0xf0090000
>> +#define CCI_SLAVE3 0x4000
>> +#define CCI_SLAVE4 0x5000
>> +#define CCI_SNOOP 0x0000
>> +#define CCI_STATUS 0x000c
>> +
>
> I have asked the same question multiple times in the past, why are you
> not using the DT bindings and the CCI driver for this ? Why are you
> duplicating the code ? Any limitations to use them ?
>
Thank you for your feedback.
I will consider to use the DT bindings and the CCI driver.
Regards,
Inami
> Regards,
> Sudeep
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-26 1:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-25 8:25 [PATCH v2] ARM: shmobile: r8a7790 CCI configuration Gaku Inami
2014-11-25 10:04 ` Sudeep Holla
2014-11-26 1:25 ` Gaku Inami
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).