diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2014-05-13 07:13:44 +0900 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-05-15 03:30:05 +0900 |
commit | b3205dea8fbf6db9b1e46a0dad19a0712fdff44f (patch) | |
tree | 440450833abe1f4f5d6654f9f1c9e70f5c0fc4bb /arch/arm/mach-exynos/firmware.c | |
parent | 3528dd34b2d3dc642669fd12399e18a16e3aacc8 (diff) | |
download | linux-b3205dea8fbf6db9b1e46a0dad19a0712fdff44f.tar.gz linux-b3205dea8fbf6db9b1e46a0dad19a0712fdff44f.tar.bz2 linux-b3205dea8fbf6db9b1e46a0dad19a0712fdff44f.zip |
ARM: EXYNOS: Map SYSRAM through generic DT bindings
Instead of hardcoding the SYSRAM details for each SoC,
pass this information through device tree (DT) and make
the code SoC agnostic. Generic DT SRAM bindings are
used for achieving this.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos/firmware.c')
-rw-r--r-- | arch/arm/mach-exynos/firmware.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c index 932129ef26c6..483dfcd69065 100644 --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c @@ -18,6 +18,7 @@ #include <mach/map.h> +#include "common.h" #include "smc.h" static int exynos_do_idle(void) @@ -34,7 +35,12 @@ static int exynos_cpu_boot(int cpu) static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr) { - void __iomem *boot_reg = S5P_VA_SYSRAM_NS + 0x1c + 4*cpu; + void __iomem *boot_reg; + + if (!sysram_ns_base_addr) + return -ENODEV; + + boot_reg = sysram_ns_base_addr + 0x1c + 4*cpu; __raw_writel(boot_addr, boot_reg); return 0; |