aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/smp-emev2.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2013-02-13 08:46:57 -0500
committerSimon Horman <horms+renesas@verge.net.au>2013-03-12 13:13:19 -0400
commitd8a28ed1bc06128f8761b332c74759db1dc7d82c (patch)
treece2cd4e84e5c8923cc4c9be44d841d7d667949db /arch/arm/mach-shmobile/smp-emev2.c
parent3b94afa38350ad5b592df5b6539a20a253e04b53 (diff)
ARM: shmobile: Rework EMEV2 scu_base variable
Rename the static scu_base variable into shmobile_scu_base. Later in the series the shmobile_scu_base variable will be made into a global variable so this is preparation only. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/smp-emev2.c')
-rw-r--r--arch/arm/mach-shmobile/smp-emev2.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
index 4ede41339a70..136867ea1e93 100644
--- a/arch/arm/mach-shmobile/smp-emev2.c
+++ b/arch/arm/mach-shmobile/smp-emev2.c
@@ -32,8 +32,9 @@
32 32
33#define EMEV2_SCU_BASE 0x1e000000 33#define EMEV2_SCU_BASE 0x1e000000
34 34
35static void __iomem *shmobile_scu_base;
36
35static DEFINE_SPINLOCK(scu_lock); 37static DEFINE_SPINLOCK(scu_lock);
36static void __iomem *scu_base;
37 38
38static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) 39static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
39{ 40{
@@ -42,10 +43,10 @@ static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
42 /* we assume this code is running on a different cpu 43 /* we assume this code is running on a different cpu
43 * than the one that is changing coherency setting */ 44 * than the one that is changing coherency setting */
44 spin_lock(&scu_lock); 45 spin_lock(&scu_lock);
45 tmp = readl(scu_base + 8); 46 tmp = readl(shmobile_scu_base + 8);
46 tmp &= ~clr; 47 tmp &= ~clr;
47 tmp |= set; 48 tmp |= set;
48 writel(tmp, scu_base + 8); 49 writel(tmp, shmobile_scu_base + 8);
49 spin_unlock(&scu_lock); 50 spin_unlock(&scu_lock);
50 51
51} 52}
@@ -70,7 +71,7 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus)
70{ 71{
71 int cpu = cpu_logical_map(0); 72 int cpu = cpu_logical_map(0);
72 73
73 scu_enable(scu_base); 74 scu_enable(shmobile_scu_base);
74 75
75 /* Tell ROM loader about our vector (in headsmp.S) */ 76 /* Tell ROM loader about our vector (in headsmp.S) */
76 emev2_set_boot_vector(__pa(shmobile_secondary_vector)); 77 emev2_set_boot_vector(__pa(shmobile_secondary_vector));
@@ -83,12 +84,12 @@ static void __init emev2_smp_init_cpus(void)
83{ 84{
84 unsigned int ncores; 85 unsigned int ncores;
85 86
86 if (!scu_base) { 87 if (!shmobile_scu_base) {
87 scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); 88 shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
88 emev2_clock_init(); /* need ioremapped SMU */ 89 emev2_clock_init(); /* need ioremapped SMU */
89 } 90 }
90 91
91 ncores = scu_base ? scu_get_core_count(scu_base) : 1; 92 ncores = shmobile_scu_base ? scu_get_core_count(shmobile_scu_base) : 1;
92 93
93 shmobile_smp_init_cpus(ncores); 94 shmobile_smp_init_cpus(ncores);
94} 95}