Murali Nalajala | 41786ab | 2012-03-06 10:47:32 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2007-2009,2012 Code Aurora Forum. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | #ifndef _ARCH_ARM_MACH_MSM_IDLE_H_ |
| 15 | #define _ARCH_ARM_MACH_MSM_IDLE_H_ |
| 16 | |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 17 | #ifdef CONFIG_MSM_CPU_AVS |
| 18 | /* 11 general purpose registers (r4-r14), 10 cp15 registers, 3 AVS registers */ |
| 19 | #define CPU_SAVED_STATE_SIZE (4 * 11 + 4 * 10 + 4 * 3) |
| 20 | #else |
| 21 | /* 11 general purpose registers (r4-r14), 10 cp15 registers */ |
| 22 | #define CPU_SAVED_STATE_SIZE (4 * 11 + 4 * 10) |
| 23 | #endif |
| 24 | |
Murali Nalajala | 93f2999 | 2012-03-21 15:59:27 +0530 | [diff] [blame] | 25 | #define ON 1 |
| 26 | #define OFF 0 |
| 27 | #define TARGET_IS_8625 1 |
| 28 | |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 29 | #ifndef __ASSEMBLY__ |
| 30 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 31 | int msm_arch_idle(void); |
| 32 | int msm_pm_collapse(void); |
| 33 | void msm_pm_collapse_exit(void); |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 34 | extern void *msm_saved_state; |
| 35 | extern unsigned long msm_saved_state_phys; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 36 | |
| 37 | #ifdef CONFIG_CPU_V7 |
| 38 | void msm_pm_boot_entry(void); |
Maheshkumar Sivasubramanian | a012e09 | 2011-08-18 10:13:03 -0600 | [diff] [blame] | 39 | void msm_pm_set_l2_flush_flag(unsigned int flag); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 40 | extern unsigned long msm_pm_pc_pgd; |
Steve Muckle | c25a936 | 2012-03-22 16:40:01 -0700 | [diff] [blame] | 41 | extern unsigned long msm_pm_boot_vector[NR_CPUS]; |
Murali Nalajala | 93f2999 | 2012-03-21 15:59:27 +0530 | [diff] [blame] | 42 | extern uint32_t target_type; |
Maheshkumar Sivasubramanian | a012e09 | 2011-08-18 10:13:03 -0600 | [diff] [blame] | 43 | #else |
| 44 | static inline void msm_pm_set_l2_flush_flag(unsigned int flag) |
| 45 | { |
| 46 | /* empty */ |
| 47 | } |
Murali Nalajala | 41786ab | 2012-03-06 10:47:32 +0530 | [diff] [blame] | 48 | static inline void msm_pm_boot_entry(void) |
| 49 | { |
| 50 | /* empty */ |
| 51 | } |
| 52 | static inline void msm_pm_write_boot_vector(unsigned int cpu, |
| 53 | unsigned long address) |
| 54 | { |
| 55 | /* empty */ |
| 56 | } |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 57 | #endif |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 58 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 59 | #endif |