Commit 533462fba545d271e087c3c632cf62ff04808e40

Authored by Russell King
Committed by Russell King
1 parent f79299ca85

[ARM] pxa: omit PXA25x or PXA27x standby/sleep code as appropriate

There's no point building standby/sleep code for processors which
aren't configured.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Showing 3 changed files with 10 additions and 7 deletions Side-by-side Diff

arch/arm/mach-pxa/Makefile
... ... @@ -41,13 +41,9 @@
41 41 obj-$(CONFIG_LEDS) += $(led-y)
42 42  
43 43 # Misc features
44   -obj-$(CONFIG_PM) += pm.o sleep.o
  44 +obj-$(CONFIG_PM) += pm.o sleep.o standby.o
45 45 obj-$(CONFIG_CPU_FREQ) += cpu-pxa.o
46 46 obj-$(CONFIG_PXA_SSP) += ssp.o
47   -
48   -ifeq ($(CONFIG_PXA27x),y)
49   -obj-$(CONFIG_PM) += standby.o
50   -endif
51 47  
52 48 ifeq ($(CONFIG_PCI),y)
53 49 obj-$(CONFIG_MACH_ARMCORE) += cm-x270-pci.o
arch/arm/mach-pxa/sleep.S
... ... @@ -50,6 +50,7 @@
50 50 str r0, [r1]
51 51 ldr pc, [sp], #4
52 52  
  53 +#ifdef CONFIG_PXA27x
53 54 /*
54 55 * pxa27x_cpu_suspend()
55 56 *
56 57  
57 58  
... ... @@ -105,9 +106,11 @@
105 106  
106 107 @ align execution to a cache line
107 108 b pxa_cpu_do_suspend
  109 +#endif
108 110  
  111 +#ifdef CONFIG_PXA25x
109 112 /*
110   - * pxa27x_cpu_suspend()
  113 + * pxa25x_cpu_suspend()
111 114 *
112 115 * Forces CPU into sleep state.
113 116 *
... ... @@ -170,6 +173,7 @@
170 173 mcr p14, 0, r0, c6, c0, 0
171 174 orr r0, r0, #2 @ initiate change bit
172 175 b pxa_cpu_do_suspend
  176 +#endif
173 177  
174 178 .ltorg
175 179 .align 5
... ... @@ -209,7 +213,7 @@
209 213 20: b 20b @ loop waiting for sleep
210 214  
211 215 /*
212   - * cpu_pxa_resume()
  216 + * pxa_cpu_resume()
213 217 *
214 218 * entry point from bootloader into kernel during resume
215 219 *
arch/arm/mach-pxa/standby.S
... ... @@ -17,6 +17,7 @@
17 17  
18 18 .text
19 19  
  20 +#ifdef CONFIG_PXA27x
20 21 ENTRY(pxa_cpu_standby)
21 22 ldr r0, =PSSR
22 23 mov r1, #(PSSR_PH | PSSR_STS)
... ... @@ -29,4 +30,6 @@
29 30 1: mcr p14, 0, r2, c7, c0, 0 @ put the system into Standby
30 31 str r1, [r0] @ make sure PSSR_PH/STS are clear
31 32 mov pc, lr
  33 +
  34 +#endif