diff options
Diffstat (limited to 'arch/arm')
| -rw-r--r-- | arch/arm/include/asm/suspend.h | 19 | ||||
| -rw-r--r-- | arch/arm/include/asm/system.h | 2 | ||||
| -rw-r--r-- | arch/arm/kernel/sleep.S | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 5 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/palmz72.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/pxa25x.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/pxa27x.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/zeus.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-sa1100/pm.c | 3 | ||||
| -rw-r--r-- | arch/arm/plat-samsung/pm.c | 3 |
11 files changed, 37 insertions, 15 deletions
diff --git a/arch/arm/include/asm/suspend.h b/arch/arm/include/asm/suspend.h new file mode 100644 index 000000000000..8d5b4461c205 --- /dev/null +++ b/arch/arm/include/asm/suspend.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #ifndef __ASM_ARM_SUSPEND_H | ||
| 2 | #define __ASM_ARM_SUSPEND_H | ||
| 3 | |||
| 4 | #include <asm/memory.h> | ||
| 5 | |||
| 6 | extern void cpu_resume(void); | ||
| 7 | |||
| 8 | /* | ||
| 9 | * Hide the first two arguments to __cpu_suspend - these are an implementation | ||
| 10 | * detail which platform code shouldn't have to know about. | ||
| 11 | */ | ||
| 12 | static inline void cpu_suspend(unsigned long arg, void (*fn)(unsigned long)) | ||
| 13 | { | ||
| 14 | extern void __cpu_suspend(int, long, unsigned long, | ||
| 15 | void (*)(unsigned long)); | ||
| 16 | __cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, arg, fn); | ||
| 17 | } | ||
| 18 | |||
| 19 | #endif | ||
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 50be6055df89..832888d0c20c 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
| @@ -106,8 +106,6 @@ extern void __show_regs(struct pt_regs *); | |||
| 106 | 106 | ||
| 107 | extern int cpu_architecture(void); | 107 | extern int cpu_architecture(void); |
| 108 | extern void cpu_init(void); | 108 | extern void cpu_init(void); |
| 109 | extern void cpu_suspend(int, long, unsigned long, void (*)(unsigned long)); | ||
| 110 | extern void cpu_resume(void); | ||
| 111 | 109 | ||
| 112 | void arm_machine_restart(char mode, const char *cmd); | 110 | void arm_machine_restart(char mode, const char *cmd); |
| 113 | extern void (*arm_pm_restart)(char str, const char *cmd); | 111 | extern void (*arm_pm_restart)(char str, const char *cmd); |
diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S index 53922748d101..c156d0e5f455 100644 --- a/arch/arm/kernel/sleep.S +++ b/arch/arm/kernel/sleep.S | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | * r3 = suspend function | 14 | * r3 = suspend function |
| 15 | * Note: does not return until system resumes | 15 | * Note: does not return until system resumes |
| 16 | */ | 16 | */ |
| 17 | ENTRY(cpu_suspend) | 17 | ENTRY(__cpu_suspend) |
| 18 | stmfd sp!, {r4 - r11, lr} | 18 | stmfd sp!, {r4 - r11, lr} |
| 19 | #ifdef MULTI_CPU | 19 | #ifdef MULTI_CPU |
| 20 | ldr r10, =processor | 20 | ldr r10, =processor |
| @@ -56,7 +56,7 @@ ENTRY(cpu_suspend) | |||
| 56 | bl __cpuc_flush_kern_all | 56 | bl __cpuc_flush_kern_all |
| 57 | #endif | 57 | #endif |
| 58 | ldmfd sp!, {r0, pc} @ call suspend fn | 58 | ldmfd sp!, {r0, pc} @ call suspend fn |
| 59 | ENDPROC(cpu_suspend) | 59 | ENDPROC(__cpu_suspend) |
| 60 | .ltorg | 60 | .ltorg |
| 61 | 61 | ||
| 62 | /* | 62 | /* |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index ae4017750bbe..3e9a13e1ac57 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
| @@ -31,6 +31,8 @@ | |||
| 31 | #include <linux/console.h> | 31 | #include <linux/console.h> |
| 32 | #include <trace/events/power.h> | 32 | #include <trace/events/power.h> |
| 33 | 33 | ||
| 34 | #include <asm/suspend.h> | ||
| 35 | |||
| 34 | #include <plat/sram.h> | 36 | #include <plat/sram.h> |
| 35 | #include "clockdomain.h" | 37 | #include "clockdomain.h" |
| 36 | #include "powerdomain.h" | 38 | #include "powerdomain.h" |
| @@ -411,8 +413,7 @@ void omap_sram_idle(void) | |||
| 411 | * from there before resuming. | 413 | * from there before resuming. |
| 412 | */ | 414 | */ |
| 413 | if (save_state == 1 || save_state == 3) | 415 | if (save_state == 1 || save_state == 3) |
| 414 | cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, save_state, | 416 | cpu_suspend(save_state, omap34xx_do_sram_idle); |
| 415 | omap34xx_do_sram_idle); | ||
| 416 | else | 417 | else |
| 417 | omap34xx_do_sram_idle(save_state); | 418 | omap34xx_do_sram_idle(save_state); |
| 418 | 419 | ||
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c index 65f24f0b77e8..5a5329bc33f1 100644 --- a/arch/arm/mach-pxa/palmz72.c +++ b/arch/arm/mach-pxa/palmz72.c | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | #include <linux/i2c-gpio.h> | 33 | #include <linux/i2c-gpio.h> |
| 34 | 34 | ||
| 35 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
| 36 | #include <asm/suspend.h> | ||
| 36 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
| 37 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
| 38 | 39 | ||
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index fd7725cb5c01..9c434d21a271 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
| 26 | 26 | ||
| 27 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
| 28 | #include <asm/suspend.h> | ||
| 28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
| 29 | #include <mach/irqs.h> | 30 | #include <mach/irqs.h> |
| 30 | #include <mach/gpio.h> | 31 | #include <mach/gpio.h> |
| @@ -244,8 +245,7 @@ static void pxa25x_cpu_pm_enter(suspend_state_t state) | |||
| 244 | 245 | ||
| 245 | switch (state) { | 246 | switch (state) { |
| 246 | case PM_SUSPEND_MEM: | 247 | case PM_SUSPEND_MEM: |
| 247 | cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, PWRMODE_SLEEP, | 248 | cpu_suspend(PWRMODE_SLEEP, pxa25x_finish_suspend); |
| 248 | pxa25x_finish_suspend); | ||
| 249 | break; | 249 | break; |
| 250 | } | 250 | } |
| 251 | } | 251 | } |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 824379d43758..9d2400b5f503 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
| 25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
| 26 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
| 27 | #include <asm/suspend.h> | ||
| 27 | #include <mach/irqs.h> | 28 | #include <mach/irqs.h> |
| 28 | #include <mach/gpio.h> | 29 | #include <mach/gpio.h> |
| 29 | #include <mach/pxa27x.h> | 30 | #include <mach/pxa27x.h> |
| @@ -304,8 +305,7 @@ void pxa27x_cpu_pm_enter(suspend_state_t state) | |||
| 304 | pxa_cpu_standby(); | 305 | pxa_cpu_standby(); |
| 305 | break; | 306 | break; |
| 306 | case PM_SUSPEND_MEM: | 307 | case PM_SUSPEND_MEM: |
| 307 | cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, pwrmode, | 308 | cpu_suspend(pwrmode, pxa27x_finish_suspend); |
| 308 | pxa27x_finish_suspend); | ||
| 309 | #ifndef CONFIG_IWMMXT | 309 | #ifndef CONFIG_IWMMXT |
| 310 | asm volatile("mar acc0, %Q0, %R0" : "=r" (acc0)); | 310 | asm volatile("mar acc0, %Q0, %R0" : "=r" (acc0)); |
| 311 | #endif | 311 | #endif |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 220fd8c15dab..9fe947b5d5f7 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/i2c/pxa-i2c.h> | 24 | #include <linux/i2c/pxa-i2c.h> |
| 25 | 25 | ||
| 26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
| 27 | #include <asm/suspend.h> | ||
| 27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
| 28 | #include <mach/gpio.h> | 29 | #include <mach/gpio.h> |
| 29 | #include <mach/pxa3xx-regs.h> | 30 | #include <mach/pxa3xx-regs.h> |
| @@ -167,7 +168,7 @@ static void pxa3xx_cpu_pm_suspend(void) | |||
| 167 | /* overwrite with the resume address */ | 168 | /* overwrite with the resume address */ |
| 168 | *p = virt_to_phys(cpu_resume); | 169 | *p = virt_to_phys(cpu_resume); |
| 169 | 170 | ||
| 170 | cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, 0, pxa3xx_finish_suspend); | 171 | cpu_suspend(0, pxa3xx_finish_suspend); |
| 171 | 172 | ||
| 172 | *p = saved_data; | 173 | *p = saved_data; |
| 173 | 174 | ||
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 28eb410ca779..9b99cc164de5 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/can/platform/mcp251x.h> | 31 | #include <linux/can/platform/mcp251x.h> |
| 32 | 32 | ||
| 33 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
| 34 | #include <asm/suspend.h> | ||
| 34 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
| 35 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
| 36 | 37 | ||
| @@ -676,8 +677,7 @@ static struct pxa2xx_udc_mach_info zeus_udc_info = { | |||
| 676 | static void zeus_power_off(void) | 677 | static void zeus_power_off(void) |
| 677 | { | 678 | { |
| 678 | local_irq_disable(); | 679 | local_irq_disable(); |
| 679 | cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, PWRMODE_DEEPSLEEP, | 680 | cpu_suspend(PWRMODE_DEEPSLEEP, pxa27x_finish_suspend); |
| 680 | pxa27x_finish_suspend); | ||
| 681 | } | 681 | } |
| 682 | #else | 682 | #else |
| 683 | #define zeus_power_off NULL | 683 | #define zeus_power_off NULL |
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c index 259ed3bcc3fe..cf9a1e9fb70d 100644 --- a/arch/arm/mach-sa1100/pm.c +++ b/arch/arm/mach-sa1100/pm.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | 29 | ||
| 30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
| 31 | #include <asm/memory.h> | 31 | #include <asm/memory.h> |
| 32 | #include <asm/suspend.h> | ||
| 32 | #include <asm/system.h> | 33 | #include <asm/system.h> |
| 33 | #include <asm/mach/time.h> | 34 | #include <asm/mach/time.h> |
| 34 | 35 | ||
| @@ -75,7 +76,7 @@ static int sa11x0_pm_enter(suspend_state_t state) | |||
| 75 | PSPR = virt_to_phys(cpu_resume); | 76 | PSPR = virt_to_phys(cpu_resume); |
| 76 | 77 | ||
| 77 | /* go zzz */ | 78 | /* go zzz */ |
| 78 | cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, 0, sa1100_finish_suspend); | 79 | cpu_suspend(0, sa1100_finish_suspend); |
| 79 | 80 | ||
| 80 | /* | 81 | /* |
| 81 | * Ensure not to come back here if it wasn't intended | 82 | * Ensure not to come back here if it wasn't intended |
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index 3a6d0768ba0c..69d6b040a019 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
| 21 | 21 | ||
| 22 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
| 23 | #include <asm/suspend.h> | ||
| 23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
| 24 | #include <mach/map.h> | 25 | #include <mach/map.h> |
| 25 | 26 | ||
| @@ -298,7 +299,7 @@ static int s3c_pm_enter(suspend_state_t state) | |||
| 298 | * we resume as it saves its own register state and restores it | 299 | * we resume as it saves its own register state and restores it |
| 299 | * during the resume. */ | 300 | * during the resume. */ |
| 300 | 301 | ||
| 301 | cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, 0, pm_cpu_sleep); | 302 | cpu_suspend(0, pm_cpu_sleep); |
| 302 | 303 | ||
| 303 | /* restore the system state */ | 304 | /* restore the system state */ |
| 304 | 305 | ||
