Go to the documentation of this file. 1 #ifndef __ARCH_ASM_MACH_OMAP2_PRCM_COMMON_H
2 #define __ARCH_ASM_MACH_OMAP2_PRCM_COMMON_H
27 #define CORE_MOD 0x200
29 #define WKUP_MOD 0x400
34 #define OMAP24XX_GR_MOD OCP_MOD
35 #define OMAP24XX_DSP_MOD 0x800
37 #define OMAP2430_MDM_MOD 0xc00
40 #define OMAP3430_IVA2_MOD -0x800
41 #define OMAP3430ES2_SGX_MOD GFX_MOD
42 #define OMAP3430_CCR_MOD PLL_MOD
43 #define OMAP3430_DSS_MOD 0x600
44 #define OMAP3430_CAM_MOD 0x700
45 #define OMAP3430_PER_MOD 0x800
46 #define OMAP3430_EMU_MOD 0x900
47 #define OMAP3430_GR_MOD 0xa00
48 #define OMAP3430_NEON_MOD 0xb00
49 #define OMAP3430ES2_USBHOST_MOD 0xc00
54 #define OMAP2420_EN_MMC_SHIFT 26
55 #define OMAP2420_EN_MMC_MASK (1 << 26)
56 #define OMAP24XX_EN_UART2_SHIFT 22
57 #define OMAP24XX_EN_UART2_MASK (1 << 22)
58 #define OMAP24XX_EN_UART1_SHIFT 21
59 #define OMAP24XX_EN_UART1_MASK (1 << 21)
60 #define OMAP24XX_EN_MCSPI2_SHIFT 18
61 #define OMAP24XX_EN_MCSPI2_MASK (1 << 18)
62 #define OMAP24XX_EN_MCSPI1_SHIFT 17
63 #define OMAP24XX_EN_MCSPI1_MASK (1 << 17)
64 #define OMAP24XX_EN_MCBSP2_SHIFT 16
65 #define OMAP24XX_EN_MCBSP2_MASK (1 << 16)
66 #define OMAP24XX_EN_MCBSP1_SHIFT 15
67 #define OMAP24XX_EN_MCBSP1_MASK (1 << 15)
68 #define OMAP24XX_EN_GPT12_SHIFT 14
69 #define OMAP24XX_EN_GPT12_MASK (1 << 14)
70 #define OMAP24XX_EN_GPT11_SHIFT 13
71 #define OMAP24XX_EN_GPT11_MASK (1 << 13)
72 #define OMAP24XX_EN_GPT10_SHIFT 12
73 #define OMAP24XX_EN_GPT10_MASK (1 << 12)
74 #define OMAP24XX_EN_GPT9_SHIFT 11
75 #define OMAP24XX_EN_GPT9_MASK (1 << 11)
76 #define OMAP24XX_EN_GPT8_SHIFT 10
77 #define OMAP24XX_EN_GPT8_MASK (1 << 10)
78 #define OMAP24XX_EN_GPT7_SHIFT 9
79 #define OMAP24XX_EN_GPT7_MASK (1 << 9)
80 #define OMAP24XX_EN_GPT6_SHIFT 8
81 #define OMAP24XX_EN_GPT6_MASK (1 << 8)
82 #define OMAP24XX_EN_GPT5_SHIFT 7
83 #define OMAP24XX_EN_GPT5_MASK (1 << 7)
84 #define OMAP24XX_EN_GPT4_SHIFT 6
85 #define OMAP24XX_EN_GPT4_MASK (1 << 6)
86 #define OMAP24XX_EN_GPT3_SHIFT 5
87 #define OMAP24XX_EN_GPT3_MASK (1 << 5)
88 #define OMAP24XX_EN_GPT2_SHIFT 4
89 #define OMAP24XX_EN_GPT2_MASK (1 << 4)
90 #define OMAP2420_EN_VLYNQ_SHIFT 3
91 #define OMAP2420_EN_VLYNQ_MASK (1 << 3)
94 #define OMAP2430_EN_GPIO5_SHIFT 10
95 #define OMAP2430_EN_GPIO5_MASK (1 << 10)
96 #define OMAP2430_EN_MCSPI3_SHIFT 9
97 #define OMAP2430_EN_MCSPI3_MASK (1 << 9)
98 #define OMAP2430_EN_MMCHS2_SHIFT 8
99 #define OMAP2430_EN_MMCHS2_MASK (1 << 8)
100 #define OMAP2430_EN_MMCHS1_SHIFT 7
101 #define OMAP2430_EN_MMCHS1_MASK (1 << 7)
102 #define OMAP24XX_EN_UART3_SHIFT 2
103 #define OMAP24XX_EN_UART3_MASK (1 << 2)
104 #define OMAP24XX_EN_USB_SHIFT 0
105 #define OMAP24XX_EN_USB_MASK (1 << 0)
108 #define OMAP2430_EN_MDM_INTC_SHIFT 11
109 #define OMAP2430_EN_MDM_INTC_MASK (1 << 11)
110 #define OMAP2430_EN_USBHS_SHIFT 6
111 #define OMAP2430_EN_USBHS_MASK (1 << 6)
112 #define OMAP24XX_EN_GPMC_SHIFT 1
113 #define OMAP24XX_EN_GPMC_MASK (1 << 1)
116 #define OMAP2420_ST_MMC_SHIFT 26
117 #define OMAP2420_ST_MMC_MASK (1 << 26)
118 #define OMAP24XX_ST_UART2_SHIFT 22
119 #define OMAP24XX_ST_UART2_MASK (1 << 22)
120 #define OMAP24XX_ST_UART1_SHIFT 21
121 #define OMAP24XX_ST_UART1_MASK (1 << 21)
122 #define OMAP24XX_ST_MCSPI2_SHIFT 18
123 #define OMAP24XX_ST_MCSPI2_MASK (1 << 18)
124 #define OMAP24XX_ST_MCSPI1_SHIFT 17
125 #define OMAP24XX_ST_MCSPI1_MASK (1 << 17)
126 #define OMAP24XX_ST_MCBSP2_SHIFT 16
127 #define OMAP24XX_ST_MCBSP2_MASK (1 << 16)
128 #define OMAP24XX_ST_MCBSP1_SHIFT 15
129 #define OMAP24XX_ST_MCBSP1_MASK (1 << 15)
130 #define OMAP24XX_ST_GPT12_SHIFT 14
131 #define OMAP24XX_ST_GPT12_MASK (1 << 14)
132 #define OMAP24XX_ST_GPT11_SHIFT 13
133 #define OMAP24XX_ST_GPT11_MASK (1 << 13)
134 #define OMAP24XX_ST_GPT10_SHIFT 12
135 #define OMAP24XX_ST_GPT10_MASK (1 << 12)
136 #define OMAP24XX_ST_GPT9_SHIFT 11
137 #define OMAP24XX_ST_GPT9_MASK (1 << 11)
138 #define OMAP24XX_ST_GPT8_SHIFT 10
139 #define OMAP24XX_ST_GPT8_MASK (1 << 10)
140 #define OMAP24XX_ST_GPT7_SHIFT 9
141 #define OMAP24XX_ST_GPT7_MASK (1 << 9)
142 #define OMAP24XX_ST_GPT6_SHIFT 8
143 #define OMAP24XX_ST_GPT6_MASK (1 << 8)
144 #define OMAP24XX_ST_GPT5_SHIFT 7
145 #define OMAP24XX_ST_GPT5_MASK (1 << 7)
146 #define OMAP24XX_ST_GPT4_SHIFT 6
147 #define OMAP24XX_ST_GPT4_MASK (1 << 6)
148 #define OMAP24XX_ST_GPT3_SHIFT 5
149 #define OMAP24XX_ST_GPT3_MASK (1 << 5)
150 #define OMAP24XX_ST_GPT2_SHIFT 4
151 #define OMAP24XX_ST_GPT2_MASK (1 << 4)
152 #define OMAP2420_ST_VLYNQ_SHIFT 3
153 #define OMAP2420_ST_VLYNQ_MASK (1 << 3)
156 #define OMAP2430_ST_MDM_INTC_SHIFT 11
157 #define OMAP2430_ST_MDM_INTC_MASK (1 << 11)
158 #define OMAP2430_ST_GPIO5_SHIFT 10
159 #define OMAP2430_ST_GPIO5_MASK (1 << 10)
160 #define OMAP2430_ST_MCSPI3_SHIFT 9
161 #define OMAP2430_ST_MCSPI3_MASK (1 << 9)
162 #define OMAP2430_ST_MMCHS2_SHIFT 8
163 #define OMAP2430_ST_MMCHS2_MASK (1 << 8)
164 #define OMAP2430_ST_MMCHS1_SHIFT 7
165 #define OMAP2430_ST_MMCHS1_MASK (1 << 7)
166 #define OMAP2430_ST_USBHS_SHIFT 6
167 #define OMAP2430_ST_USBHS_MASK (1 << 6)
168 #define OMAP24XX_ST_UART3_SHIFT 2
169 #define OMAP24XX_ST_UART3_MASK (1 << 2)
170 #define OMAP24XX_ST_USB_SHIFT 0
171 #define OMAP24XX_ST_USB_MASK (1 << 0)
174 #define OMAP24XX_EN_GPIOS_SHIFT 2
175 #define OMAP24XX_EN_GPIOS_MASK (1 << 2)
176 #define OMAP24XX_EN_GPT1_SHIFT 0
177 #define OMAP24XX_EN_GPT1_MASK (1 << 0)
180 #define OMAP24XX_ST_GPIOS_SHIFT 2
181 #define OMAP24XX_ST_GPIOS_MASK (1 << 2)
182 #define OMAP24XX_ST_32KSYNC_SHIFT 1
183 #define OMAP24XX_ST_32KSYNC_MASK (1 << 1)
184 #define OMAP24XX_ST_GPT1_SHIFT 0
185 #define OMAP24XX_ST_GPT1_MASK (1 << 0)
188 #define OMAP2430_ST_MDM_SHIFT 0
189 #define OMAP2430_ST_MDM_MASK (1 << 0)
195 #define OMAP3430_REV_SHIFT 0
196 #define OMAP3430_REV_MASK (0xff << 0)
199 #define OMAP3430_AUTOIDLE_MASK (1 << 0)
202 #define OMAP3430_EN_MMC3_MASK (1 << 30)
203 #define OMAP3430_EN_MMC3_SHIFT 30
204 #define OMAP3430_EN_MMC2_MASK (1 << 25)
205 #define OMAP3430_EN_MMC2_SHIFT 25
206 #define OMAP3430_EN_MMC1_MASK (1 << 24)
207 #define OMAP3430_EN_MMC1_SHIFT 24
208 #define AM35XX_EN_UART4_MASK (1 << 23)
209 #define AM35XX_EN_UART4_SHIFT 23
210 #define OMAP3430_EN_MCSPI4_MASK (1 << 21)
211 #define OMAP3430_EN_MCSPI4_SHIFT 21
212 #define OMAP3430_EN_MCSPI3_MASK (1 << 20)
213 #define OMAP3430_EN_MCSPI3_SHIFT 20
214 #define OMAP3430_EN_MCSPI2_MASK (1 << 19)
215 #define OMAP3430_EN_MCSPI2_SHIFT 19
216 #define OMAP3430_EN_MCSPI1_MASK (1 << 18)
217 #define OMAP3430_EN_MCSPI1_SHIFT 18
218 #define OMAP3430_EN_I2C3_MASK (1 << 17)
219 #define OMAP3430_EN_I2C3_SHIFT 17
220 #define OMAP3430_EN_I2C2_MASK (1 << 16)
221 #define OMAP3430_EN_I2C2_SHIFT 16
222 #define OMAP3430_EN_I2C1_MASK (1 << 15)
223 #define OMAP3430_EN_I2C1_SHIFT 15
224 #define OMAP3430_EN_UART2_MASK (1 << 14)
225 #define OMAP3430_EN_UART2_SHIFT 14
226 #define OMAP3430_EN_UART1_MASK (1 << 13)
227 #define OMAP3430_EN_UART1_SHIFT 13
228 #define OMAP3430_EN_GPT11_MASK (1 << 12)
229 #define OMAP3430_EN_GPT11_SHIFT 12
230 #define OMAP3430_EN_GPT10_MASK (1 << 11)
231 #define OMAP3430_EN_GPT10_SHIFT 11
232 #define OMAP3430_EN_MCBSP5_MASK (1 << 10)
233 #define OMAP3430_EN_MCBSP5_SHIFT 10
234 #define OMAP3430_EN_MCBSP1_MASK (1 << 9)
235 #define OMAP3430_EN_MCBSP1_SHIFT 9
236 #define OMAP3430_EN_FSHOSTUSB_MASK (1 << 5)
237 #define OMAP3430_EN_FSHOSTUSB_SHIFT 5
238 #define OMAP3430_EN_D2D_MASK (1 << 3)
239 #define OMAP3430_EN_D2D_SHIFT 3
242 #define OMAP3430_EN_HSOTGUSB_MASK (1 << 4)
243 #define OMAP3430_EN_HSOTGUSB_SHIFT 4
246 #define OMAP3430_ST_MMC3_SHIFT 30
247 #define OMAP3430_ST_MMC3_MASK (1 << 30)
248 #define OMAP3430_ST_MMC2_SHIFT 25
249 #define OMAP3430_ST_MMC2_MASK (1 << 25)
250 #define OMAP3430_ST_MMC1_SHIFT 24
251 #define OMAP3430_ST_MMC1_MASK (1 << 24)
252 #define OMAP3430_ST_MCSPI4_SHIFT 21
253 #define OMAP3430_ST_MCSPI4_MASK (1 << 21)
254 #define OMAP3430_ST_MCSPI3_SHIFT 20
255 #define OMAP3430_ST_MCSPI3_MASK (1 << 20)
256 #define OMAP3430_ST_MCSPI2_SHIFT 19
257 #define OMAP3430_ST_MCSPI2_MASK (1 << 19)
258 #define OMAP3430_ST_MCSPI1_SHIFT 18
259 #define OMAP3430_ST_MCSPI1_MASK (1 << 18)
260 #define OMAP3430_ST_I2C3_SHIFT 17
261 #define OMAP3430_ST_I2C3_MASK (1 << 17)
262 #define OMAP3430_ST_I2C2_SHIFT 16
263 #define OMAP3430_ST_I2C2_MASK (1 << 16)
264 #define OMAP3430_ST_I2C1_SHIFT 15
265 #define OMAP3430_ST_I2C1_MASK (1 << 15)
266 #define OMAP3430_ST_UART2_SHIFT 14
267 #define OMAP3430_ST_UART2_MASK (1 << 14)
268 #define OMAP3430_ST_UART1_SHIFT 13
269 #define OMAP3430_ST_UART1_MASK (1 << 13)
270 #define OMAP3430_ST_GPT11_SHIFT 12
271 #define OMAP3430_ST_GPT11_MASK (1 << 12)
272 #define OMAP3430_ST_GPT10_SHIFT 11
273 #define OMAP3430_ST_GPT10_MASK (1 << 11)
274 #define OMAP3430_ST_MCBSP5_SHIFT 10
275 #define OMAP3430_ST_MCBSP5_MASK (1 << 10)
276 #define OMAP3430_ST_MCBSP1_SHIFT 9
277 #define OMAP3430_ST_MCBSP1_MASK (1 << 9)
278 #define OMAP3430ES1_ST_FSHOSTUSB_SHIFT 5
279 #define OMAP3430ES1_ST_FSHOSTUSB_MASK (1 << 5)
280 #define OMAP3430ES1_ST_HSOTGUSB_SHIFT 4
281 #define OMAP3430ES1_ST_HSOTGUSB_MASK (1 << 4)
282 #define OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT 5
283 #define OMAP3430ES2_ST_HSOTGUSB_IDLE_MASK (1 << 5)
284 #define OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT 4
285 #define OMAP3430ES2_ST_HSOTGUSB_STDBY_MASK (1 << 4)
286 #define OMAP3430_ST_D2D_SHIFT 3
287 #define OMAP3430_ST_D2D_MASK (1 << 3)
290 #define OMAP3430_EN_GPIO1_MASK (1 << 3)
291 #define OMAP3430_EN_GPIO1_SHIFT 3
292 #define OMAP3430_EN_GPT12_MASK (1 << 1)
293 #define OMAP3430_EN_GPT12_SHIFT 1
294 #define OMAP3430_EN_GPT1_MASK (1 << 0)
295 #define OMAP3430_EN_GPT1_SHIFT 0
298 #define OMAP3430_EN_SR2_MASK (1 << 7)
299 #define OMAP3430_EN_SR2_SHIFT 7
300 #define OMAP3430_EN_SR1_MASK (1 << 6)
301 #define OMAP3430_EN_SR1_SHIFT 6
304 #define OMAP3430_EN_GPT12_MASK (1 << 1)
305 #define OMAP3430_EN_GPT12_SHIFT 1
308 #define OMAP3430_ST_SR2_SHIFT 7
309 #define OMAP3430_ST_SR2_MASK (1 << 7)
310 #define OMAP3430_ST_SR1_SHIFT 6
311 #define OMAP3430_ST_SR1_MASK (1 << 6)
312 #define OMAP3430_ST_GPIO1_SHIFT 3
313 #define OMAP3430_ST_GPIO1_MASK (1 << 3)
314 #define OMAP3430_ST_32KSYNC_SHIFT 2
315 #define OMAP3430_ST_32KSYNC_MASK (1 << 2)
316 #define OMAP3430_ST_GPT12_SHIFT 1
317 #define OMAP3430_ST_GPT12_MASK (1 << 1)
318 #define OMAP3430_ST_GPT1_SHIFT 0
319 #define OMAP3430_ST_GPT1_MASK (1 << 0)
326 #define OMAP3430_EN_MPU_MASK (1 << 1)
327 #define OMAP3430_EN_MPU_SHIFT 1
331 #define OMAP3630_EN_UART4_MASK (1 << 18)
332 #define OMAP3630_EN_UART4_SHIFT 18
333 #define OMAP3430_EN_GPIO6_MASK (1 << 17)
334 #define OMAP3430_EN_GPIO6_SHIFT 17
335 #define OMAP3430_EN_GPIO5_MASK (1 << 16)
336 #define OMAP3430_EN_GPIO5_SHIFT 16
337 #define OMAP3430_EN_GPIO4_MASK (1 << 15)
338 #define OMAP3430_EN_GPIO4_SHIFT 15
339 #define OMAP3430_EN_GPIO3_MASK (1 << 14)
340 #define OMAP3430_EN_GPIO3_SHIFT 14
341 #define OMAP3430_EN_GPIO2_MASK (1 << 13)
342 #define OMAP3430_EN_GPIO2_SHIFT 13
343 #define OMAP3430_EN_UART3_MASK (1 << 11)
344 #define OMAP3430_EN_UART3_SHIFT 11
345 #define OMAP3430_EN_GPT9_MASK (1 << 10)
346 #define OMAP3430_EN_GPT9_SHIFT 10
347 #define OMAP3430_EN_GPT8_MASK (1 << 9)
348 #define OMAP3430_EN_GPT8_SHIFT 9
349 #define OMAP3430_EN_GPT7_MASK (1 << 8)
350 #define OMAP3430_EN_GPT7_SHIFT 8
351 #define OMAP3430_EN_GPT6_MASK (1 << 7)
352 #define OMAP3430_EN_GPT6_SHIFT 7
353 #define OMAP3430_EN_GPT5_MASK (1 << 6)
354 #define OMAP3430_EN_GPT5_SHIFT 6
355 #define OMAP3430_EN_GPT4_MASK (1 << 5)
356 #define OMAP3430_EN_GPT4_SHIFT 5
357 #define OMAP3430_EN_GPT3_MASK (1 << 4)
358 #define OMAP3430_EN_GPT3_SHIFT 4
359 #define OMAP3430_EN_GPT2_MASK (1 << 3)
360 #define OMAP3430_EN_GPT2_SHIFT 3
365 #define OMAP3430_EN_MCBSP4_MASK (1 << 2)
366 #define OMAP3430_EN_MCBSP4_SHIFT 2
367 #define OMAP3430_EN_MCBSP3_MASK (1 << 1)
368 #define OMAP3430_EN_MCBSP3_SHIFT 1
369 #define OMAP3430_EN_MCBSP2_MASK (1 << 0)
370 #define OMAP3430_EN_MCBSP2_SHIFT 0
373 #define OMAP3630_ST_UART4_SHIFT 18
374 #define OMAP3630_ST_UART4_MASK (1 << 18)
375 #define OMAP3430_ST_GPIO6_SHIFT 17
376 #define OMAP3430_ST_GPIO6_MASK (1 << 17)
377 #define OMAP3430_ST_GPIO5_SHIFT 16
378 #define OMAP3430_ST_GPIO5_MASK (1 << 16)
379 #define OMAP3430_ST_GPIO4_SHIFT 15
380 #define OMAP3430_ST_GPIO4_MASK (1 << 15)
381 #define OMAP3430_ST_GPIO3_SHIFT 14
382 #define OMAP3430_ST_GPIO3_MASK (1 << 14)
383 #define OMAP3430_ST_GPIO2_SHIFT 13
384 #define OMAP3430_ST_GPIO2_MASK (1 << 13)
385 #define OMAP3430_ST_UART3_SHIFT 11
386 #define OMAP3430_ST_UART3_MASK (1 << 11)
387 #define OMAP3430_ST_GPT9_SHIFT 10
388 #define OMAP3430_ST_GPT9_MASK (1 << 10)
389 #define OMAP3430_ST_GPT8_SHIFT 9
390 #define OMAP3430_ST_GPT8_MASK (1 << 9)
391 #define OMAP3430_ST_GPT7_SHIFT 8
392 #define OMAP3430_ST_GPT7_MASK (1 << 8)
393 #define OMAP3430_ST_GPT6_SHIFT 7
394 #define OMAP3430_ST_GPT6_MASK (1 << 7)
395 #define OMAP3430_ST_GPT5_SHIFT 6
396 #define OMAP3430_ST_GPT5_MASK (1 << 6)
397 #define OMAP3430_ST_GPT4_SHIFT 5
398 #define OMAP3430_ST_GPT4_MASK (1 << 5)
399 #define OMAP3430_ST_GPT3_SHIFT 4
400 #define OMAP3430_ST_GPT3_MASK (1 << 4)
401 #define OMAP3430_ST_GPT2_SHIFT 3
402 #define OMAP3430_ST_GPT2_MASK (1 << 3)
405 #define OMAP3430_EN_CORE_SHIFT 0
406 #define OMAP3430_EN_CORE_MASK (1 << 0)
413 #define MAX_MODULE_HARDRESET_WAIT 10000
421 #define MAX_IOPAD_LATCH_TIME 100
423 # ifndef __ASSEMBLER__
429 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
500 #define OMAP_PRCM_IRQ(_name, _offset, _priority) { \
503 .priority = _priority \