diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-omap/pm.h | 81 | ||||
-rw-r--r-- | include/asm-arm/arch-omap/sram.h | 2 |
2 files changed, 75 insertions, 8 deletions
diff --git a/include/asm-arm/arch-omap/pm.h b/include/asm-arm/arch-omap/pm.h index 7c790425e363..05b003f3a94c 100644 --- a/include/asm-arm/arch-omap/pm.h +++ b/include/asm-arm/arch-omap/pm.h | |||
@@ -49,7 +49,7 @@ | |||
49 | 49 | ||
50 | /* | 50 | /* |
51 | * ---------------------------------------------------------------------------- | 51 | * ---------------------------------------------------------------------------- |
52 | * Powermanagement bitmasks | 52 | * Power management bitmasks |
53 | * ---------------------------------------------------------------------------- | 53 | * ---------------------------------------------------------------------------- |
54 | */ | 54 | */ |
55 | #define IDLE_WAIT_CYCLES 0x00000fff | 55 | #define IDLE_WAIT_CYCLES 0x00000fff |
@@ -112,32 +112,59 @@ | |||
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | #ifndef __ASSEMBLER__ | 114 | #ifndef __ASSEMBLER__ |
115 | |||
116 | #include <linux/clk.h> | ||
117 | |||
118 | extern void prevent_idle_sleep(void); | ||
119 | extern void allow_idle_sleep(void); | ||
120 | |||
121 | /** | ||
122 | * clk_deny_idle - Prevents the clock from being idled during MPU idle | ||
123 | * @clk: clock signal handle | ||
124 | */ | ||
125 | void clk_deny_idle(struct clk *clk); | ||
126 | |||
127 | /** | ||
128 | * clk_allow_idle - Counters previous clk_deny_idle | ||
129 | * @clk: clock signal handle | ||
130 | */ | ||
131 | void clk_deny_idle(struct clk *clk); | ||
132 | |||
115 | extern void omap_pm_idle(void); | 133 | extern void omap_pm_idle(void); |
116 | extern void omap_pm_suspend(void); | 134 | extern void omap_pm_suspend(void); |
117 | extern void omap730_cpu_suspend(unsigned short, unsigned short); | 135 | extern void omap730_cpu_suspend(unsigned short, unsigned short); |
118 | extern void omap1510_cpu_suspend(unsigned short, unsigned short); | 136 | extern void omap1510_cpu_suspend(unsigned short, unsigned short); |
119 | extern void omap1610_cpu_suspend(unsigned short, unsigned short); | 137 | extern void omap1610_cpu_suspend(unsigned short, unsigned short); |
138 | extern void omap24xx_cpu_suspend(u32 dll_ctrl, u32 cpu_revision); | ||
120 | extern void omap730_idle_loop_suspend(void); | 139 | extern void omap730_idle_loop_suspend(void); |
121 | extern void omap1510_idle_loop_suspend(void); | 140 | extern void omap1510_idle_loop_suspend(void); |
122 | extern void omap1610_idle_loop_suspend(void); | 141 | extern void omap1610_idle_loop_suspend(void); |
142 | extern void omap24xx_idle_loop_suspend(void); | ||
143 | |||
144 | extern unsigned int omap730_cpu_suspend_sz; | ||
145 | extern unsigned int omap1510_cpu_suspend_sz; | ||
146 | extern unsigned int omap1610_cpu_suspend_sz; | ||
147 | extern unsigned int omap24xx_cpu_suspend_sz; | ||
148 | extern unsigned int omap730_idle_loop_suspend_sz; | ||
149 | extern unsigned int omap1510_idle_loop_suspend_sz; | ||
150 | extern unsigned int omap1610_idle_loop_suspend_sz; | ||
151 | extern unsigned int omap24xx_idle_loop_suspend_sz; | ||
123 | 152 | ||
124 | #ifdef CONFIG_OMAP_SERIAL_WAKE | 153 | #ifdef CONFIG_OMAP_SERIAL_WAKE |
125 | extern void omap_serial_wake_trigger(int enable); | 154 | extern void omap_serial_wake_trigger(int enable); |
126 | #else | 155 | #else |
156 | #define omap_serial_wakeup_init() {} | ||
127 | #define omap_serial_wake_trigger(x) {} | 157 | #define omap_serial_wake_trigger(x) {} |
128 | #endif /* CONFIG_OMAP_SERIAL_WAKE */ | 158 | #endif /* CONFIG_OMAP_SERIAL_WAKE */ |
129 | 159 | ||
130 | extern unsigned int omap730_cpu_suspend_sz; | ||
131 | extern unsigned int omap730_idle_loop_suspend_sz; | ||
132 | extern unsigned int omap1510_cpu_suspend_sz; | ||
133 | extern unsigned int omap1510_idle_loop_suspend_sz; | ||
134 | extern unsigned int omap1610_cpu_suspend_sz; | ||
135 | extern unsigned int omap1610_idle_loop_suspend_sz; | ||
136 | |||
137 | #define ARM_SAVE(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] = omap_readl(x) | 160 | #define ARM_SAVE(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] = omap_readl(x) |
138 | #define ARM_RESTORE(x) omap_writel((arm_sleep_save[ARM_SLEEP_SAVE_##x]), (x)) | 161 | #define ARM_RESTORE(x) omap_writel((arm_sleep_save[ARM_SLEEP_SAVE_##x]), (x)) |
139 | #define ARM_SHOW(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] | 162 | #define ARM_SHOW(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] |
140 | 163 | ||
164 | #define DSP_SAVE(x) dsp_sleep_save[DSP_SLEEP_SAVE_##x] = __raw_readw(x) | ||
165 | #define DSP_RESTORE(x) __raw_writew((dsp_sleep_save[DSP_SLEEP_SAVE_##x]), (x)) | ||
166 | #define DSP_SHOW(x) dsp_sleep_save[DSP_SLEEP_SAVE_##x] | ||
167 | |||
141 | #define ULPD_SAVE(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] = omap_readw(x) | 168 | #define ULPD_SAVE(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] = omap_readw(x) |
142 | #define ULPD_RESTORE(x) omap_writew((ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]), (x)) | 169 | #define ULPD_RESTORE(x) omap_writew((ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]), (x)) |
143 | #define ULPD_SHOW(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] | 170 | #define ULPD_SHOW(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] |
@@ -154,6 +181,10 @@ extern unsigned int omap1610_idle_loop_suspend_sz; | |||
154 | #define MPUI1610_RESTORE(x) omap_writel((mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x]), (x)) | 181 | #define MPUI1610_RESTORE(x) omap_writel((mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x]), (x)) |
155 | #define MPUI1610_SHOW(x) mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x] | 182 | #define MPUI1610_SHOW(x) mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x] |
156 | 183 | ||
184 | #define OMAP24XX_SAVE(x) omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x] = x | ||
185 | #define OMAP24XX_RESTORE(x) x = omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x] | ||
186 | #define OMAP24XX_SHOW(x) omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x] | ||
187 | |||
157 | /* | 188 | /* |
158 | * List of global OMAP registers to preserve. | 189 | * List of global OMAP registers to preserve. |
159 | * More ones like CP and general purpose register values are preserved | 190 | * More ones like CP and general purpose register values are preserved |
@@ -176,6 +207,15 @@ enum arm_save_state { | |||
176 | ARM_SLEEP_SAVE_SIZE | 207 | ARM_SLEEP_SAVE_SIZE |
177 | }; | 208 | }; |
178 | 209 | ||
210 | enum dsp_save_state { | ||
211 | DSP_SLEEP_SAVE_START = 0, | ||
212 | /* | ||
213 | * DSP registers 16 bits | ||
214 | */ | ||
215 | DSP_SLEEP_SAVE_DSP_IDLECT2, | ||
216 | DSP_SLEEP_SAVE_SIZE | ||
217 | }; | ||
218 | |||
179 | enum ulpd_save_state { | 219 | enum ulpd_save_state { |
180 | ULPD_SLEEP_SAVE_START = 0, | 220 | ULPD_SLEEP_SAVE_START = 0, |
181 | /* | 221 | /* |
@@ -254,5 +294,30 @@ enum mpui1610_save_state { | |||
254 | #endif | 294 | #endif |
255 | }; | 295 | }; |
256 | 296 | ||
297 | enum omap24xx_save_state { | ||
298 | OMAP24XX_SLEEP_SAVE_START = 0, | ||
299 | OMAP24XX_SLEEP_SAVE_INTC_MIR0, | ||
300 | OMAP24XX_SLEEP_SAVE_INTC_MIR1, | ||
301 | OMAP24XX_SLEEP_SAVE_INTC_MIR2, | ||
302 | OMAP24XX_SLEEP_SAVE_CM_FCLKEN1_CORE, | ||
303 | OMAP24XX_SLEEP_SAVE_CM_FCLKEN2_CORE, | ||
304 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN1_CORE, | ||
305 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN2_CORE, | ||
306 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN4_CORE, | ||
307 | OMAP24XX_SLEEP_SAVE_GPIO1_IRQENABLE1, | ||
308 | OMAP24XX_SLEEP_SAVE_GPIO2_IRQENABLE1, | ||
309 | OMAP24XX_SLEEP_SAVE_GPIO3_IRQENABLE1, | ||
310 | OMAP24XX_SLEEP_SAVE_GPIO4_IRQENABLE1, | ||
311 | OMAP24XX_SLEEP_SAVE_GPIO3_OE, | ||
312 | OMAP24XX_SLEEP_SAVE_GPIO4_OE, | ||
313 | OMAP24XX_SLEEP_SAVE_GPIO3_RISINGDETECT, | ||
314 | OMAP24XX_SLEEP_SAVE_GPIO3_FALLINGDETECT, | ||
315 | OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SPI1_NCS2, | ||
316 | OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_MCBSP1_DX, | ||
317 | OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SSI1_FLAG_TX, | ||
318 | OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SYS_NIRQW0, | ||
319 | OMAP24XX_SLEEP_SAVE_SIZE | ||
320 | }; | ||
321 | |||
257 | #endif /* ASSEMBLER */ | 322 | #endif /* ASSEMBLER */ |
258 | #endif /* __ASM_ARCH_OMAP_PM_H */ | 323 | #endif /* __ASM_ARCH_OMAP_PM_H */ |
diff --git a/include/asm-arm/arch-omap/sram.h b/include/asm-arm/arch-omap/sram.h index e72ccbf0fe06..6fc0dd57b7c3 100644 --- a/include/asm-arm/arch-omap/sram.h +++ b/include/asm-arm/arch-omap/sram.h | |||
@@ -20,6 +20,8 @@ extern void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | |||
20 | u32 mem_type); | 20 | u32 mem_type); |
21 | extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); | 21 | extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); |
22 | 22 | ||
23 | extern unsigned long omap_fb_sram_start; | ||
24 | extern unsigned long omap_fb_sram_size; | ||
23 | 25 | ||
24 | /* Do not use these */ | 26 | /* Do not use these */ |
25 | extern void sram_reprogram_clock(u32 ckctl, u32 dpllctl); | 27 | extern void sram_reprogram_clock(u32 ckctl, u32 dpllctl); |