diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2013-06-06 12:24:28 +0200 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2013-06-13 19:48:40 +0200 |
commit | 580ff0eea15c341d17d564f7e5c519df37033d8e (patch) | |
tree | f3572705e6f41aab6d06fae867ed266ab7fbb0cc /arch/arm/mach-mvebu/headsmp.S | |
parent | arm: mvebu: remove hardcoded static I/O mapping (diff) | |
download | linux-580ff0eea15c341d17d564f7e5c519df37033d8e.tar.xz linux-580ff0eea15c341d17d564f7e5c519df37033d8e.zip |
arm: mvebu: don't hardcode a physical address in headsmp.S
Now that the coherency_init() function is called a bit earlier, we can
actually read the physical address of the coherency unit registers
from the Device Tree, and communicate that to the headsmp.S code,
which avoids hardcoding a physical address.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-mvebu/headsmp.S')
-rw-r--r-- | arch/arm/mach-mvebu/headsmp.S | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/mach-mvebu/headsmp.S b/arch/arm/mach-mvebu/headsmp.S index a06e0ede8c08..7147300c8af2 100644 --- a/arch/arm/mach-mvebu/headsmp.S +++ b/arch/arm/mach-mvebu/headsmp.S @@ -21,12 +21,6 @@ #include <linux/linkage.h> #include <linux/init.h> -/* - * At this stage the secondary CPUs don't have acces yet to the MMU, so - * we have to provide physical addresses - */ -#define ARMADA_XP_CFB_BASE 0xD0020200 - __CPUINIT /* @@ -35,15 +29,21 @@ * startup */ ENTRY(armada_xp_secondary_startup) + /* Get coherency fabric base physical address */ + adr r0, 1f + ldr r1, [r0] + ldr r0, [r0, r1] /* Read CPU id */ mrc p15, 0, r1, c0, c0, 5 and r1, r1, #0xF /* Add CPU to coherency fabric */ - ldr r0, =ARMADA_XP_CFB_BASE - bl ll_set_cpu_coherent b secondary_startup ENDPROC(armada_xp_secondary_startup) + + .align 2 +1: + .long coherency_phys_base - . |