diff options
Diffstat (limited to 'arch/arm/mach-omap2/pm.h')
-rw-r--r-- | arch/arm/mach-omap2/pm.h | 59 |
1 files changed, 56 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 0d75bfd1fdbe..1c1b0ab5b978 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
@@ -11,7 +11,9 @@ | |||
11 | #ifndef __ARCH_ARM_MACH_OMAP2_PM_H | 11 | #ifndef __ARCH_ARM_MACH_OMAP2_PM_H |
12 | #define __ARCH_ARM_MACH_OMAP2_PM_H | 12 | #define __ARCH_ARM_MACH_OMAP2_PM_H |
13 | 13 | ||
14 | #include <plat/powerdomain.h> | 14 | #include <linux/err.h> |
15 | |||
16 | #include "powerdomain.h" | ||
15 | 17 | ||
16 | extern void *omap3_secure_ram_storage; | 18 | extern void *omap3_secure_ram_storage; |
17 | extern void omap3_pm_off_mode_enable(int); | 19 | extern void omap3_pm_off_mode_enable(int); |
@@ -20,6 +22,20 @@ extern int omap3_can_sleep(void); | |||
20 | extern int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state); | 22 | extern int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state); |
21 | extern int omap3_idle_init(void); | 23 | extern int omap3_idle_init(void); |
22 | 24 | ||
25 | #if defined(CONFIG_PM_OPP) | ||
26 | extern int omap3_opp_init(void); | ||
27 | extern int omap4_opp_init(void); | ||
28 | #else | ||
29 | static inline int omap3_opp_init(void) | ||
30 | { | ||
31 | return -EINVAL; | ||
32 | } | ||
33 | static inline int omap4_opp_init(void) | ||
34 | { | ||
35 | return -EINVAL; | ||
36 | } | ||
37 | #endif | ||
38 | |||
23 | struct cpuidle_params { | 39 | struct cpuidle_params { |
24 | u8 valid; | 40 | u8 valid; |
25 | u32 sleep_latency; | 41 | u32 sleep_latency; |
@@ -58,7 +74,7 @@ extern u32 sleep_while_idle; | |||
58 | #endif | 74 | #endif |
59 | 75 | ||
60 | #if defined(CONFIG_CPU_IDLE) | 76 | #if defined(CONFIG_CPU_IDLE) |
61 | extern void omap3_cpuidle_update_states(void); | 77 | extern void omap3_cpuidle_update_states(u32, u32); |
62 | #endif | 78 | #endif |
63 | 79 | ||
64 | #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) | 80 | #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) |
@@ -80,9 +96,46 @@ extern void save_secure_ram_context(u32 *addr); | |||
80 | extern void omap3_save_scratchpad_contents(void); | 96 | extern void omap3_save_scratchpad_contents(void); |
81 | 97 | ||
82 | extern unsigned int omap24xx_idle_loop_suspend_sz; | 98 | extern unsigned int omap24xx_idle_loop_suspend_sz; |
83 | extern unsigned int omap34xx_suspend_sz; | ||
84 | extern unsigned int save_secure_ram_context_sz; | 99 | extern unsigned int save_secure_ram_context_sz; |
85 | extern unsigned int omap24xx_cpu_suspend_sz; | 100 | extern unsigned int omap24xx_cpu_suspend_sz; |
86 | extern unsigned int omap34xx_cpu_suspend_sz; | 101 | extern unsigned int omap34xx_cpu_suspend_sz; |
87 | 102 | ||
103 | #define PM_RTA_ERRATUM_i608 (1 << 0) | ||
104 | #define PM_SDRC_WAKEUP_ERRATUM_i583 (1 << 1) | ||
105 | |||
106 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) | ||
107 | extern u16 pm34xx_errata; | ||
108 | #define IS_PM34XX_ERRATUM(id) (pm34xx_errata & (id)) | ||
109 | extern void enable_omap3630_toggle_l2_on_restore(void); | ||
110 | #else | ||
111 | #define IS_PM34XX_ERRATUM(id) 0 | ||
112 | static inline void enable_omap3630_toggle_l2_on_restore(void) { } | ||
113 | #endif /* defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) */ | ||
114 | |||
115 | #ifdef CONFIG_OMAP_SMARTREFLEX | ||
116 | extern int omap_devinit_smartreflex(void); | ||
117 | extern void omap_enable_smartreflex_on_init(void); | ||
118 | #else | ||
119 | static inline int omap_devinit_smartreflex(void) | ||
120 | { | ||
121 | return -EINVAL; | ||
122 | } | ||
123 | |||
124 | static inline void omap_enable_smartreflex_on_init(void) {} | ||
125 | #endif | ||
126 | |||
127 | #ifdef CONFIG_TWL4030_CORE | ||
128 | extern int omap3_twl_init(void); | ||
129 | extern int omap4_twl_init(void); | ||
130 | #else | ||
131 | static inline int omap3_twl_init(void) | ||
132 | { | ||
133 | return -EINVAL; | ||
134 | } | ||
135 | static inline int omap4_twl_init(void) | ||
136 | { | ||
137 | return -EINVAL; | ||
138 | } | ||
139 | #endif | ||
140 | |||
88 | #endif | 141 | #endif |