diff options
author | Magnus Damm <damm@opensource.se> | 2013-06-10 05:19:46 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-06-17 03:07:27 -0400 |
commit | bfabbcc679e86cfcaf0e7fd41563f14c29bc74d4 (patch) | |
tree | cc0c11759322852c170aea7563624006ee6770c2 | |
parent | ebe72ab90a5c1e3b69d89b841552fd02805dc4e4 (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.S | 13 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/common.h | 1 |
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) | |||
51 | 2: .long shmobile_scu_base - PAGE_OFFSET + PLAT_PHYS_OFFSET | 51 | 2: .long shmobile_scu_base - PAGE_OFFSET + PLAT_PHYS_OFFSET |
52 | ENDPROC(shmobile_secondary_vector_scu) | 52 | ENDPROC(shmobile_secondary_vector_scu) |
53 | 53 | ||
54 | ENTRY(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 | ||
65 | ENDPROC(shmobile_boot_scu) | ||
66 | |||
54 | .text | 67 | .text |
55 | .globl shmobile_scu_base | 68 | .globl shmobile_scu_base |
56 | shmobile_scu_base: | 69 | shmobile_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); | |||
11 | extern unsigned long shmobile_boot_fn; | 11 | extern unsigned long shmobile_boot_fn; |
12 | extern unsigned long shmobile_boot_arg; | 12 | extern unsigned long shmobile_boot_arg; |
13 | extern void shmobile_secondary_vector_scu(void); | 13 | extern void shmobile_secondary_vector_scu(void); |
14 | extern void shmobile_boot_scu(void); | ||
14 | struct clk; | 15 | struct clk; |
15 | extern int shmobile_clk_init(void); | 16 | extern int shmobile_clk_init(void); |
16 | extern void shmobile_handle_irq_intc(struct pt_regs *); | 17 | extern void shmobile_handle_irq_intc(struct pt_regs *); |