aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaku Inami <gaku.inami.xw@bp.renesas.com>2014-01-15 07:26:04 -0500
committerSimon Horman <horms+renesas@verge.net.au>2014-02-23 18:55:47 -0500
commit0445ded61aac0c1a6f43b4be1a2ca2ca47b77eb8 (patch)
tree1ba15bc47d29e78b69caa6b2b273fcb4df06348e
parenta48f165509c18d47f1505888a21918e8a06d590f (diff)
ARM: shmobile: r8a7790 CA7-SCU enablement
Power on CA7 SCU in case of booting from a CA15 core. Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com> [damm@opensource.se: Converted to use broken out SYSC code] Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r--arch/arm/mach-shmobile/smp-r8a7790.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
index 015e2753de1f..beb47ae9d05a 100644
--- a/arch/arm/mach-shmobile/smp-r8a7790.c
+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
@@ -19,6 +19,8 @@
19#include <linux/io.h> 19#include <linux/io.h>
20#include <asm/smp_plat.h> 20#include <asm/smp_plat.h>
21#include <mach/common.h> 21#include <mach/common.h>
22#include <mach/pm-rcar.h>
23#include <mach/r8a7790.h>
22 24
23#define RST 0xe6160000 25#define RST 0xe6160000
24#define CA15BAR 0x0020 26#define CA15BAR 0x0020
@@ -27,6 +29,11 @@
27#define CA7RESCNT 0x0044 29#define CA7RESCNT 0x0044
28#define MERAM 0xe8080000 30#define MERAM 0xe8080000
29 31
32static struct rcar_sysc_ch r8a7790_ca7_scu = {
33 .chan_offs = 0x100, /* PWRSR3 .. PWRER3 */
34 .isr_bit = 21, /* CA7-SCU */
35};
36
30static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus) 37static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
31{ 38{
32 void __iomem *p; 39 void __iomem *p;
@@ -54,6 +61,10 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
54 writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) | 0x5a5a0000, 61 writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) | 0x5a5a0000,
55 p + CA7RESCNT); 62 p + CA7RESCNT);
56 iounmap(p); 63 iounmap(p);
64
65 /* turn on power to SCU */
66 r8a7790_pm_init();
67 rcar_sysc_power_up(&r8a7790_ca7_scu);
57} 68}
58 69
59struct smp_operations r8a7790_smp_ops __initdata = { 70struct smp_operations r8a7790_smp_ops __initdata = {