aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-04-04 06:25:36 -0400
committerArnd Bergmann <arnd@arndb.de>2018-04-05 05:06:41 -0400
commit03de3727b25059d9802d1baac319ba40c035eade (patch)
treefccb9bf26374623160090c822fecdf00da9ac082
parent84985460569570f5cca5fabbfb811e11b07bc916 (diff)
ARM: omap2: fix am43xx build without L2X0
When CONFIG_CACHE_L2X0 is disabled, the am43xx specific suspend implemnentation fails to link: arch/arm/mach-omap2/sleep43xx.o: In function `get_l2cache_base': (.text+0x180): undefined reference to `omap4_get_l2cache_base' This adds an #ifdef protection around the code, like we do for am44xx. Fixes: 41d37e61372f ("ARM: OMAP2+: Introduce low-level suspend code for AM43XX") Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--arch/arm/mach-omap2/sleep43xx.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
index 59770a69396b..b24be624e8b9 100644
--- a/arch/arm/mach-omap2/sleep43xx.S
+++ b/arch/arm/mach-omap2/sleep43xx.S
@@ -52,10 +52,12 @@
52ENTRY(am43xx_do_wfi) 52ENTRY(am43xx_do_wfi)
53 stmfd sp!, {r4 - r11, lr} @ save registers on stack 53 stmfd sp!, {r4 - r11, lr} @ save registers on stack
54 54
55#ifdef CONFIG_CACHE_L2X0
55 /* Retrieve l2 cache virt address BEFORE we shut off EMIF */ 56 /* Retrieve l2 cache virt address BEFORE we shut off EMIF */
56 ldr r1, get_l2cache_base 57 ldr r1, get_l2cache_base
57 blx r1 58 blx r1
58 mov r8, r0 59 mov r8, r0
60#endif
59 61
60 /* 62 /*
61 * Flush all data from the L1 and L2 data cache before disabling 63 * Flush all data from the L1 and L2 data cache before disabling
@@ -334,8 +336,6 @@ ENDPROC(am43xx_resume_from_deep_sleep)
334 .align 336 .align
335resume_addr: 337resume_addr:
336 .word cpu_resume - PAGE_OFFSET + 0x80000000 338 .word cpu_resume - PAGE_OFFSET + 0x80000000
337get_l2cache_base:
338 .word omap4_get_l2cache_base
339kernel_flush: 339kernel_flush:
340 .word v7_flush_dcache_all 340 .word v7_flush_dcache_all
341ddr_start: 341ddr_start:
@@ -354,7 +354,10 @@ am43xx_phys_emif_clkctrl:
354 .word (AM43XX_CM_BASE + AM43XX_CM_PER_INST + \ 354 .word (AM43XX_CM_BASE + AM43XX_CM_PER_INST + \
355 AM43XX_CM_PER_EMIF_CLKCTRL_OFFSET) 355 AM43XX_CM_PER_EMIF_CLKCTRL_OFFSET)
356 356
357#ifdef CONFIG_CACHE_L2X0
357/* L2 cache related defines for AM437x */ 358/* L2 cache related defines for AM437x */
359get_l2cache_base:
360 .word omap4_get_l2cache_base
358l2_cache_base: 361l2_cache_base:
359 .word OMAP44XX_L2CACHE_BASE 362 .word OMAP44XX_L2CACHE_BASE
360l2_smc1: 363l2_smc1:
@@ -365,6 +368,7 @@ l2_smc3:
365 .word OMAP4_MON_L2X0_CTRL_INDEX 368 .word OMAP4_MON_L2X0_CTRL_INDEX
366l2_val: 369l2_val:
367 .word 0xffff 370 .word 0xffff
371#endif
368 372
369.align 3 373.align 3
370/* DDR related defines */ 374/* DDR related defines */