Lorenzo Pieralisi | 6732bc6 | 2013-07-17 10:14:45 +0100 | [diff] [blame] | 1 | #ifndef __ASM_SUSPEND_H |
| 2 | #define __ASM_SUSPEND_H |
| 3 | |
| 4 | #define NR_CTX_REGS 11 |
| 5 | |
| 6 | /* |
| 7 | * struct cpu_suspend_ctx must be 16-byte aligned since it is allocated on |
| 8 | * the stack, which must be 16-byte aligned on v8 |
| 9 | */ |
| 10 | struct cpu_suspend_ctx { |
| 11 | /* |
| 12 | * This struct must be kept in sync with |
| 13 | * cpu_do_{suspend/resume} in mm/proc.S |
| 14 | */ |
| 15 | u64 ctx_regs[NR_CTX_REGS]; |
| 16 | u64 sp; |
| 17 | } __aligned(16); |
Lorenzo Pieralisi | 9532252 | 2013-07-22 12:22:13 +0100 | [diff] [blame] | 18 | |
| 19 | struct sleep_save_sp { |
| 20 | phys_addr_t *save_ptr_stash; |
| 21 | phys_addr_t save_ptr_stash_phys; |
| 22 | }; |
| 23 | |
Sudeep Holla | af391b1 | 2015-06-18 15:41:32 +0100 | [diff] [blame] | 24 | extern int cpu_suspend(unsigned long arg, int (*fn)(unsigned long)); |
Lorenzo Pieralisi | 9532252 | 2013-07-22 12:22:13 +0100 | [diff] [blame] | 25 | extern void cpu_resume(void); |
Lorenzo Pieralisi | 6732bc6 | 2013-07-17 10:14:45 +0100 | [diff] [blame] | 26 | #endif |