aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2013-06-10 05:19:46 -0400
committerSimon Horman <horms+renesas@verge.net.au>2013-06-17 03:07:27 -0400
commitbfabbcc679e86cfcaf0e7fd41563f14c29bc74d4 (patch)
treecc0c11759322852c170aea7563624006ee6770c2
parentebe72ab90a5c1e3b69d89b841552fd02805dc4e4 (diff)
ARM: shmobile: Add SCU boot function using argument
Add a shmoible_boot_scu function that assumes that the base address of the SCU is passed in r0. This code is free from inline virtual to physical address conversion. 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/headsmp-scu.S13
-rw-r--r--arch/arm/mach-shmobile/include/mach/common.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/headsmp-scu.S b/arch/arm/mach-shmobile/headsmp-scu.S
index 7d113f898e7f..c5c9106bf6c4 100644
--- a/arch/arm/mach-shmobile/headsmp-scu.S
+++ b/arch/arm/mach-shmobile/headsmp-scu.S
@@ -51,6 +51,19 @@ ENTRY(shmobile_secondary_vector_scu)
512: .long shmobile_scu_base - PAGE_OFFSET + PLAT_PHYS_OFFSET 512: .long shmobile_scu_base - PAGE_OFFSET + PLAT_PHYS_OFFSET
52ENDPROC(shmobile_secondary_vector_scu) 52ENDPROC(shmobile_secondary_vector_scu)
53 53
54ENTRY(shmobile_boot_scu)
55 @ r0 = SCU base address
56 mrc p15, 0, r1, c0, c0, 5 @ read MIPDR
57 and r1, r1, #3 @ mask out cpu ID
58 lsl r1, r1, #3 @ we will shift by cpu_id * 8 bits
59 ldr r2, [r0, #8] @ SCU Power Status Register
60 mov r3, #3
61 bic r2, r2, r3, lsl r1 @ Clear bits of our CPU (Run Mode)
62 str r2, [r0, #8] @ write back
63
64 b shmobile_invalidate_start
65ENDPROC(shmobile_boot_scu)
66
54 .text 67 .text
55 .globl shmobile_scu_base 68 .globl shmobile_scu_base
56shmobile_scu_base: 69shmobile_scu_base:
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 54472ef4a270..8ef1c3c13ea8 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -11,6 +11,7 @@ extern void shmobile_boot_vector(void);
11extern unsigned long shmobile_boot_fn; 11extern unsigned long shmobile_boot_fn;
12extern unsigned long shmobile_boot_arg; 12extern unsigned long shmobile_boot_arg;
13extern void shmobile_secondary_vector_scu(void); 13extern void shmobile_secondary_vector_scu(void);
14extern void shmobile_boot_scu(void);
14struct clk; 15struct clk;
15extern int shmobile_clk_init(void); 16extern int shmobile_clk_init(void);
16extern void shmobile_handle_irq_intc(struct pt_regs *); 17extern void shmobile_handle_irq_intc(struct pt_regs *);