aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-03-13 12:25:52 -0400
committerArnd Bergmann <arnd@arndb.de>2014-03-21 13:26:24 -0400
commit39378e4143f9b698e5bd1a0a6fadf13224fee015 (patch)
tree156760fb7d67706206b835be9c80b0f44131bd84 /arch/arm/mach-exynos
parent714e3302538ab1eff926e64ee56a1b50c9b0ca2b (diff)
ARM: exynos: fix l2x0 saved regs handling
The exynos4_l2x0_cache_init function tries to flush the data cache for the location of the saved l2x0 registers and pass the physical address to the s5p-sleep implementation. However, the s5p-sleep code is optional, and if it is disabled, we get a linker error here when the l2x0_regs_phys variable does not exist. To solve this, use a compile-time conditional to drop this code if we don't want it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Cc: Tomasz Figa <tomasz.figa@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-exynos')
-rw-r--r--arch/arm/mach-exynos/common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index f18be40e5b21..8d0042c9d4d3 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -404,8 +404,10 @@ static int __init exynos4_l2x0_cache_init(void)
404 if (ret) 404 if (ret)
405 return ret; 405 return ret;
406 406
407 l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); 407 if (IS_ENABLED(CONFIG_S5P_SLEEP)) {
408 clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long)); 408 l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs);
409 clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long));
410 }
409 return 0; 411 return 0;
410} 412}
411early_initcall(exynos4_l2x0_cache_init); 413early_initcall(exynos4_l2x0_cache_init);