diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2015-05-14 09:46:40 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-05-18 15:06:40 +0200 |
commit | 58202033faca18198af21dabb7e75481d4a2cd8a (patch) | |
tree | abf3cc5d1b6c239ae71c2c6e23f5e41ac66e4fd6 /arch/arm/mach-ux500 | |
parent | 80757f2335c93fbb9a8fa5a2e68f8ef46d2d5081 (diff) | |
download | linux-58202033faca18198af21dabb7e75481d4a2cd8a.tar.gz linux-58202033faca18198af21dabb7e75481d4a2cd8a.tar.bz2 linux-58202033faca18198af21dabb7e75481d4a2cd8a.zip |
ARM: ux500: get SCU base from device tree
The SMP startup/shutdown code relied on a static SCU base
address, let's get this from the device tree instead.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/platsmp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index 1e13d0a8ad77..62b1de922bd8 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c @@ -16,6 +16,8 @@ #include <linux/device.h> #include <linux/smp.h> #include <linux/io.h> +#include <linux/of.h> +#include <linux/of_address.h> #include <asm/cacheflush.h> #include <asm/smp_plat.h> @@ -122,8 +124,13 @@ static void __init wakeup_secondary(void) static void __init ux500_smp_init_cpus(void) { unsigned int i, ncores; + struct device_node *np; - scu_base = ioremap(U8500_SCU_BASE, 0x100); + np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu"); + scu_base = of_iomap(np, 0); + of_node_put(np); + if (!scu_base) + return; backupram = ioremap(U8500_BACKUPRAM0_BASE, SZ_8K); ncores = scu_get_core_count(scu_base); |