2 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
4 * Copyright (C) 2009-2010 Nokia Corporation
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * XXX handle crossbar/shared link difference for L3?
12 * XXX these should be marked initdata for multi-OMAP kernels
14 #include <plat/omap_hwmod.h>
15 #include <mach/irqs.h>
18 #include <plat/serial.h>
20 #include <plat/gpio.h>
22 #include "omap_hwmod_common_data.h"
24 #include "prm-regbits-24xx.h"
25 #include "cm-regbits-24xx.h"
29 * OMAP2430 hardware module integration data
31 * ALl of the data in this section should be autogeneratable from the
32 * TI hardware database or other technical documentation. Data that
33 * is driver-specific or driver-kernel integration-specific belongs
37 static struct omap_hwmod omap2430_mpu_hwmod
;
38 static struct omap_hwmod omap2430_iva_hwmod
;
39 static struct omap_hwmod omap2430_l3_main_hwmod
;
40 static struct omap_hwmod omap2430_l4_core_hwmod
;
41 static struct omap_hwmod omap2430_wd_timer2_hwmod
;
42 static struct omap_hwmod omap2430_gpio1_hwmod
;
43 static struct omap_hwmod omap2430_gpio2_hwmod
;
44 static struct omap_hwmod omap2430_gpio3_hwmod
;
45 static struct omap_hwmod omap2430_gpio4_hwmod
;
46 static struct omap_hwmod omap2430_gpio5_hwmod
;
47 static struct omap_hwmod omap2430_dma_system_hwmod
;
49 /* L3 -> L4_CORE interface */
50 static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core
= {
51 .master
= &omap2430_l3_main_hwmod
,
52 .slave
= &omap2430_l4_core_hwmod
,
53 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
56 /* MPU -> L3 interface */
57 static struct omap_hwmod_ocp_if omap2430_mpu__l3_main
= {
58 .master
= &omap2430_mpu_hwmod
,
59 .slave
= &omap2430_l3_main_hwmod
,
63 /* Slave interfaces on the L3 interconnect */
64 static struct omap_hwmod_ocp_if
*omap2430_l3_main_slaves
[] = {
65 &omap2430_mpu__l3_main
,
68 /* Master interfaces on the L3 interconnect */
69 static struct omap_hwmod_ocp_if
*omap2430_l3_main_masters
[] = {
70 &omap2430_l3_main__l4_core
,
74 static struct omap_hwmod omap2430_l3_main_hwmod
= {
76 .class = &l3_hwmod_class
,
77 .masters
= omap2430_l3_main_masters
,
78 .masters_cnt
= ARRAY_SIZE(omap2430_l3_main_masters
),
79 .slaves
= omap2430_l3_main_slaves
,
80 .slaves_cnt
= ARRAY_SIZE(omap2430_l3_main_slaves
),
81 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
82 .flags
= HWMOD_NO_IDLEST
,
85 static struct omap_hwmod omap2430_l4_wkup_hwmod
;
86 static struct omap_hwmod omap2430_uart1_hwmod
;
87 static struct omap_hwmod omap2430_uart2_hwmod
;
88 static struct omap_hwmod omap2430_uart3_hwmod
;
89 static struct omap_hwmod omap2430_i2c1_hwmod
;
90 static struct omap_hwmod omap2430_i2c2_hwmod
;
92 static struct omap_hwmod omap2430_usbhsotg_hwmod
;
94 /* l3_core -> usbhsotg interface */
95 static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3
= {
96 .master
= &omap2430_usbhsotg_hwmod
,
97 .slave
= &omap2430_l3_main_hwmod
,
102 /* I2C IP block address space length (in bytes) */
103 #define OMAP2_I2C_AS_LEN 128
105 /* L4 CORE -> I2C1 interface */
106 static struct omap_hwmod_addr_space omap2430_i2c1_addr_space
[] = {
108 .pa_start
= 0x48070000,
109 .pa_end
= 0x48070000 + OMAP2_I2C_AS_LEN
- 1,
110 .flags
= ADDR_TYPE_RT
,
114 static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1
= {
115 .master
= &omap2430_l4_core_hwmod
,
116 .slave
= &omap2430_i2c1_hwmod
,
118 .addr
= omap2430_i2c1_addr_space
,
119 .addr_cnt
= ARRAY_SIZE(omap2430_i2c1_addr_space
),
120 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
123 /* L4 CORE -> I2C2 interface */
124 static struct omap_hwmod_addr_space omap2430_i2c2_addr_space
[] = {
126 .pa_start
= 0x48072000,
127 .pa_end
= 0x48072000 + OMAP2_I2C_AS_LEN
- 1,
128 .flags
= ADDR_TYPE_RT
,
132 static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2
= {
133 .master
= &omap2430_l4_core_hwmod
,
134 .slave
= &omap2430_i2c2_hwmod
,
136 .addr
= omap2430_i2c2_addr_space
,
137 .addr_cnt
= ARRAY_SIZE(omap2430_i2c2_addr_space
),
138 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
141 /* L4_CORE -> L4_WKUP interface */
142 static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup
= {
143 .master
= &omap2430_l4_core_hwmod
,
144 .slave
= &omap2430_l4_wkup_hwmod
,
145 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
148 /* L4 CORE -> UART1 interface */
149 static struct omap_hwmod_addr_space omap2430_uart1_addr_space
[] = {
151 .pa_start
= OMAP2_UART1_BASE
,
152 .pa_end
= OMAP2_UART1_BASE
+ SZ_8K
- 1,
153 .flags
= ADDR_MAP_ON_INIT
| ADDR_TYPE_RT
,
157 static struct omap_hwmod_ocp_if omap2_l4_core__uart1
= {
158 .master
= &omap2430_l4_core_hwmod
,
159 .slave
= &omap2430_uart1_hwmod
,
161 .addr
= omap2430_uart1_addr_space
,
162 .addr_cnt
= ARRAY_SIZE(omap2430_uart1_addr_space
),
163 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
166 /* L4 CORE -> UART2 interface */
167 static struct omap_hwmod_addr_space omap2430_uart2_addr_space
[] = {
169 .pa_start
= OMAP2_UART2_BASE
,
170 .pa_end
= OMAP2_UART2_BASE
+ SZ_1K
- 1,
171 .flags
= ADDR_MAP_ON_INIT
| ADDR_TYPE_RT
,
175 static struct omap_hwmod_ocp_if omap2_l4_core__uart2
= {
176 .master
= &omap2430_l4_core_hwmod
,
177 .slave
= &omap2430_uart2_hwmod
,
179 .addr
= omap2430_uart2_addr_space
,
180 .addr_cnt
= ARRAY_SIZE(omap2430_uart2_addr_space
),
181 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
184 /* L4 PER -> UART3 interface */
185 static struct omap_hwmod_addr_space omap2430_uart3_addr_space
[] = {
187 .pa_start
= OMAP2_UART3_BASE
,
188 .pa_end
= OMAP2_UART3_BASE
+ SZ_1K
- 1,
189 .flags
= ADDR_MAP_ON_INIT
| ADDR_TYPE_RT
,
193 static struct omap_hwmod_ocp_if omap2_l4_core__uart3
= {
194 .master
= &omap2430_l4_core_hwmod
,
195 .slave
= &omap2430_uart3_hwmod
,
197 .addr
= omap2430_uart3_addr_space
,
198 .addr_cnt
= ARRAY_SIZE(omap2430_uart3_addr_space
),
199 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
203 * usbhsotg interface data
205 static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs
[] = {
207 .pa_start
= OMAP243X_HS_BASE
,
208 .pa_end
= OMAP243X_HS_BASE
+ SZ_4K
- 1,
209 .flags
= ADDR_TYPE_RT
213 /* l4_core ->usbhsotg interface */
214 static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg
= {
215 .master
= &omap2430_l4_core_hwmod
,
216 .slave
= &omap2430_usbhsotg_hwmod
,
218 .addr
= omap2430_usbhsotg_addrs
,
219 .addr_cnt
= ARRAY_SIZE(omap2430_usbhsotg_addrs
),
220 .user
= OCP_USER_MPU
,
223 static struct omap_hwmod_ocp_if
*omap2430_usbhsotg_masters
[] = {
224 &omap2430_usbhsotg__l3
,
227 static struct omap_hwmod_ocp_if
*omap2430_usbhsotg_slaves
[] = {
228 &omap2430_l4_core__usbhsotg
,
231 /* Slave interfaces on the L4_CORE interconnect */
232 static struct omap_hwmod_ocp_if
*omap2430_l4_core_slaves
[] = {
233 &omap2430_l3_main__l4_core
,
236 /* Master interfaces on the L4_CORE interconnect */
237 static struct omap_hwmod_ocp_if
*omap2430_l4_core_masters
[] = {
238 &omap2430_l4_core__l4_wkup
,
242 static struct omap_hwmod omap2430_l4_core_hwmod
= {
244 .class = &l4_hwmod_class
,
245 .masters
= omap2430_l4_core_masters
,
246 .masters_cnt
= ARRAY_SIZE(omap2430_l4_core_masters
),
247 .slaves
= omap2430_l4_core_slaves
,
248 .slaves_cnt
= ARRAY_SIZE(omap2430_l4_core_slaves
),
249 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
250 .flags
= HWMOD_NO_IDLEST
,
253 /* Slave interfaces on the L4_WKUP interconnect */
254 static struct omap_hwmod_ocp_if
*omap2430_l4_wkup_slaves
[] = {
255 &omap2430_l4_core__l4_wkup
,
256 &omap2_l4_core__uart1
,
257 &omap2_l4_core__uart2
,
258 &omap2_l4_core__uart3
,
261 /* Master interfaces on the L4_WKUP interconnect */
262 static struct omap_hwmod_ocp_if
*omap2430_l4_wkup_masters
[] = {
266 static struct omap_hwmod omap2430_l4_wkup_hwmod
= {
268 .class = &l4_hwmod_class
,
269 .masters
= omap2430_l4_wkup_masters
,
270 .masters_cnt
= ARRAY_SIZE(omap2430_l4_wkup_masters
),
271 .slaves
= omap2430_l4_wkup_slaves
,
272 .slaves_cnt
= ARRAY_SIZE(omap2430_l4_wkup_slaves
),
273 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
274 .flags
= HWMOD_NO_IDLEST
,
277 /* Master interfaces on the MPU device */
278 static struct omap_hwmod_ocp_if
*omap2430_mpu_masters
[] = {
279 &omap2430_mpu__l3_main
,
283 static struct omap_hwmod omap2430_mpu_hwmod
= {
285 .class = &mpu_hwmod_class
,
286 .main_clk
= "mpu_ck",
287 .masters
= omap2430_mpu_masters
,
288 .masters_cnt
= ARRAY_SIZE(omap2430_mpu_masters
),
289 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
293 * IVA2_1 interface data
296 /* IVA2 <- L3 interface */
297 static struct omap_hwmod_ocp_if omap2430_l3__iva
= {
298 .master
= &omap2430_l3_main_hwmod
,
299 .slave
= &omap2430_iva_hwmod
,
301 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
304 static struct omap_hwmod_ocp_if
*omap2430_iva_masters
[] = {
312 static struct omap_hwmod omap2430_iva_hwmod
= {
314 .class = &iva_hwmod_class
,
315 .masters
= omap2430_iva_masters
,
316 .masters_cnt
= ARRAY_SIZE(omap2430_iva_masters
),
317 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
)
320 /* l4_wkup -> wd_timer2 */
321 static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs
[] = {
323 .pa_start
= 0x49016000,
324 .pa_end
= 0x4901607f,
325 .flags
= ADDR_TYPE_RT
329 static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2
= {
330 .master
= &omap2430_l4_wkup_hwmod
,
331 .slave
= &omap2430_wd_timer2_hwmod
,
332 .clk
= "mpu_wdt_ick",
333 .addr
= omap2430_wd_timer2_addrs
,
334 .addr_cnt
= ARRAY_SIZE(omap2430_wd_timer2_addrs
),
335 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
340 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
344 static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc
= {
348 .sysc_flags
= (SYSC_HAS_EMUFREE
| SYSC_HAS_SOFTRESET
|
350 .sysc_fields
= &omap_hwmod_sysc_type1
,
353 static struct omap_hwmod_class omap2430_wd_timer_hwmod_class
= {
355 .sysc
= &omap2430_wd_timer_sysc
,
356 .pre_shutdown
= &omap2_wd_timer_disable
360 static struct omap_hwmod_ocp_if
*omap2430_wd_timer2_slaves
[] = {
361 &omap2430_l4_wkup__wd_timer2
,
364 static struct omap_hwmod omap2430_wd_timer2_hwmod
= {
366 .class = &omap2430_wd_timer_hwmod_class
,
367 .main_clk
= "mpu_wdt_fck",
371 .module_bit
= OMAP24XX_EN_MPU_WDT_SHIFT
,
372 .module_offs
= WKUP_MOD
,
374 .idlest_idle_bit
= OMAP24XX_ST_MPU_WDT_SHIFT
,
377 .slaves
= omap2430_wd_timer2_slaves
,
378 .slaves_cnt
= ARRAY_SIZE(omap2430_wd_timer2_slaves
),
379 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
384 static struct omap_hwmod_class_sysconfig uart_sysc
= {
388 .sysc_flags
= (SYSC_HAS_SIDLEMODE
|
389 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
391 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
392 .sysc_fields
= &omap_hwmod_sysc_type1
,
395 static struct omap_hwmod_class uart_class
= {
402 static struct omap_hwmod_irq_info uart1_mpu_irqs
[] = {
403 { .irq
= INT_24XX_UART1_IRQ
, },
406 static struct omap_hwmod_dma_info uart1_sdma_reqs
[] = {
407 { .name
= "rx", .dma_req
= OMAP24XX_DMA_UART1_RX
, },
408 { .name
= "tx", .dma_req
= OMAP24XX_DMA_UART1_TX
, },
411 static struct omap_hwmod_ocp_if
*omap2430_uart1_slaves
[] = {
412 &omap2_l4_core__uart1
,
415 static struct omap_hwmod omap2430_uart1_hwmod
= {
417 .mpu_irqs
= uart1_mpu_irqs
,
418 .mpu_irqs_cnt
= ARRAY_SIZE(uart1_mpu_irqs
),
419 .sdma_reqs
= uart1_sdma_reqs
,
420 .sdma_reqs_cnt
= ARRAY_SIZE(uart1_sdma_reqs
),
421 .main_clk
= "uart1_fck",
424 .module_offs
= CORE_MOD
,
426 .module_bit
= OMAP24XX_EN_UART1_SHIFT
,
428 .idlest_idle_bit
= OMAP24XX_EN_UART1_SHIFT
,
431 .slaves
= omap2430_uart1_slaves
,
432 .slaves_cnt
= ARRAY_SIZE(omap2430_uart1_slaves
),
433 .class = &uart_class
,
434 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
439 static struct omap_hwmod_irq_info uart2_mpu_irqs
[] = {
440 { .irq
= INT_24XX_UART2_IRQ
, },
443 static struct omap_hwmod_dma_info uart2_sdma_reqs
[] = {
444 { .name
= "rx", .dma_req
= OMAP24XX_DMA_UART2_RX
, },
445 { .name
= "tx", .dma_req
= OMAP24XX_DMA_UART2_TX
, },
448 static struct omap_hwmod_ocp_if
*omap2430_uart2_slaves
[] = {
449 &omap2_l4_core__uart2
,
452 static struct omap_hwmod omap2430_uart2_hwmod
= {
454 .mpu_irqs
= uart2_mpu_irqs
,
455 .mpu_irqs_cnt
= ARRAY_SIZE(uart2_mpu_irqs
),
456 .sdma_reqs
= uart2_sdma_reqs
,
457 .sdma_reqs_cnt
= ARRAY_SIZE(uart2_sdma_reqs
),
458 .main_clk
= "uart2_fck",
461 .module_offs
= CORE_MOD
,
463 .module_bit
= OMAP24XX_EN_UART2_SHIFT
,
465 .idlest_idle_bit
= OMAP24XX_EN_UART2_SHIFT
,
468 .slaves
= omap2430_uart2_slaves
,
469 .slaves_cnt
= ARRAY_SIZE(omap2430_uart2_slaves
),
470 .class = &uart_class
,
471 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
476 static struct omap_hwmod_irq_info uart3_mpu_irqs
[] = {
477 { .irq
= INT_24XX_UART3_IRQ
, },
480 static struct omap_hwmod_dma_info uart3_sdma_reqs
[] = {
481 { .name
= "rx", .dma_req
= OMAP24XX_DMA_UART3_RX
, },
482 { .name
= "tx", .dma_req
= OMAP24XX_DMA_UART3_TX
, },
485 static struct omap_hwmod_ocp_if
*omap2430_uart3_slaves
[] = {
486 &omap2_l4_core__uart3
,
489 static struct omap_hwmod omap2430_uart3_hwmod
= {
491 .mpu_irqs
= uart3_mpu_irqs
,
492 .mpu_irqs_cnt
= ARRAY_SIZE(uart3_mpu_irqs
),
493 .sdma_reqs
= uart3_sdma_reqs
,
494 .sdma_reqs_cnt
= ARRAY_SIZE(uart3_sdma_reqs
),
495 .main_clk
= "uart3_fck",
498 .module_offs
= CORE_MOD
,
500 .module_bit
= OMAP24XX_EN_UART3_SHIFT
,
502 .idlest_idle_bit
= OMAP24XX_EN_UART3_SHIFT
,
505 .slaves
= omap2430_uart3_slaves
,
506 .slaves_cnt
= ARRAY_SIZE(omap2430_uart3_slaves
),
507 .class = &uart_class
,
508 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
512 static struct omap_hwmod_class_sysconfig i2c_sysc
= {
516 .sysc_flags
= (SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
),
517 .sysc_fields
= &omap_hwmod_sysc_type1
,
520 static struct omap_hwmod_class i2c_class
= {
525 static struct omap_i2c_dev_attr i2c_dev_attr
= {
526 .fifo_depth
= 8, /* bytes */
531 static struct omap_hwmod_irq_info i2c1_mpu_irqs
[] = {
532 { .irq
= INT_24XX_I2C1_IRQ
, },
535 static struct omap_hwmod_dma_info i2c1_sdma_reqs
[] = {
536 { .name
= "tx", .dma_req
= OMAP24XX_DMA_I2C1_TX
},
537 { .name
= "rx", .dma_req
= OMAP24XX_DMA_I2C1_RX
},
540 static struct omap_hwmod_ocp_if
*omap2430_i2c1_slaves
[] = {
541 &omap2430_l4_core__i2c1
,
544 static struct omap_hwmod omap2430_i2c1_hwmod
= {
546 .mpu_irqs
= i2c1_mpu_irqs
,
547 .mpu_irqs_cnt
= ARRAY_SIZE(i2c1_mpu_irqs
),
548 .sdma_reqs
= i2c1_sdma_reqs
,
549 .sdma_reqs_cnt
= ARRAY_SIZE(i2c1_sdma_reqs
),
550 .main_clk
= "i2chs1_fck",
554 * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
555 * I2CHS IP's do not follow the usual pattern.
556 * prcm_reg_id alone cannot be used to program
557 * the iclk and fclk. Needs to be handled using
558 * additonal flags when clk handling is moved
559 * to hwmod framework.
561 .module_offs
= CORE_MOD
,
563 .module_bit
= OMAP2430_EN_I2CHS1_SHIFT
,
565 .idlest_idle_bit
= OMAP2430_ST_I2CHS1_SHIFT
,
568 .slaves
= omap2430_i2c1_slaves
,
569 .slaves_cnt
= ARRAY_SIZE(omap2430_i2c1_slaves
),
571 .dev_attr
= &i2c_dev_attr
,
572 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
577 static struct omap_hwmod_irq_info i2c2_mpu_irqs
[] = {
578 { .irq
= INT_24XX_I2C2_IRQ
, },
581 static struct omap_hwmod_dma_info i2c2_sdma_reqs
[] = {
582 { .name
= "tx", .dma_req
= OMAP24XX_DMA_I2C2_TX
},
583 { .name
= "rx", .dma_req
= OMAP24XX_DMA_I2C2_RX
},
586 static struct omap_hwmod_ocp_if
*omap2430_i2c2_slaves
[] = {
587 &omap2430_l4_core__i2c2
,
590 static struct omap_hwmod omap2430_i2c2_hwmod
= {
592 .mpu_irqs
= i2c2_mpu_irqs
,
593 .mpu_irqs_cnt
= ARRAY_SIZE(i2c2_mpu_irqs
),
594 .sdma_reqs
= i2c2_sdma_reqs
,
595 .sdma_reqs_cnt
= ARRAY_SIZE(i2c2_sdma_reqs
),
596 .main_clk
= "i2chs2_fck",
599 .module_offs
= CORE_MOD
,
601 .module_bit
= OMAP2430_EN_I2CHS2_SHIFT
,
603 .idlest_idle_bit
= OMAP2430_ST_I2CHS2_SHIFT
,
606 .slaves
= omap2430_i2c2_slaves
,
607 .slaves_cnt
= ARRAY_SIZE(omap2430_i2c2_slaves
),
609 .dev_attr
= &i2c_dev_attr
,
610 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
613 /* l4_wkup -> gpio1 */
614 static struct omap_hwmod_addr_space omap2430_gpio1_addr_space
[] = {
616 .pa_start
= 0x4900C000,
617 .pa_end
= 0x4900C1ff,
618 .flags
= ADDR_TYPE_RT
622 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1
= {
623 .master
= &omap2430_l4_wkup_hwmod
,
624 .slave
= &omap2430_gpio1_hwmod
,
626 .addr
= omap2430_gpio1_addr_space
,
627 .addr_cnt
= ARRAY_SIZE(omap2430_gpio1_addr_space
),
628 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
631 /* l4_wkup -> gpio2 */
632 static struct omap_hwmod_addr_space omap2430_gpio2_addr_space
[] = {
634 .pa_start
= 0x4900E000,
635 .pa_end
= 0x4900E1ff,
636 .flags
= ADDR_TYPE_RT
640 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2
= {
641 .master
= &omap2430_l4_wkup_hwmod
,
642 .slave
= &omap2430_gpio2_hwmod
,
644 .addr
= omap2430_gpio2_addr_space
,
645 .addr_cnt
= ARRAY_SIZE(omap2430_gpio2_addr_space
),
646 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
649 /* l4_wkup -> gpio3 */
650 static struct omap_hwmod_addr_space omap2430_gpio3_addr_space
[] = {
652 .pa_start
= 0x49010000,
653 .pa_end
= 0x490101ff,
654 .flags
= ADDR_TYPE_RT
658 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3
= {
659 .master
= &omap2430_l4_wkup_hwmod
,
660 .slave
= &omap2430_gpio3_hwmod
,
662 .addr
= omap2430_gpio3_addr_space
,
663 .addr_cnt
= ARRAY_SIZE(omap2430_gpio3_addr_space
),
664 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
667 /* l4_wkup -> gpio4 */
668 static struct omap_hwmod_addr_space omap2430_gpio4_addr_space
[] = {
670 .pa_start
= 0x49012000,
671 .pa_end
= 0x490121ff,
672 .flags
= ADDR_TYPE_RT
676 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4
= {
677 .master
= &omap2430_l4_wkup_hwmod
,
678 .slave
= &omap2430_gpio4_hwmod
,
680 .addr
= omap2430_gpio4_addr_space
,
681 .addr_cnt
= ARRAY_SIZE(omap2430_gpio4_addr_space
),
682 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
685 /* l4_core -> gpio5 */
686 static struct omap_hwmod_addr_space omap2430_gpio5_addr_space
[] = {
688 .pa_start
= 0x480B6000,
689 .pa_end
= 0x480B61ff,
690 .flags
= ADDR_TYPE_RT
694 static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5
= {
695 .master
= &omap2430_l4_core_hwmod
,
696 .slave
= &omap2430_gpio5_hwmod
,
698 .addr
= omap2430_gpio5_addr_space
,
699 .addr_cnt
= ARRAY_SIZE(omap2430_gpio5_addr_space
),
700 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
704 static struct omap_gpio_dev_attr gpio_dev_attr
= {
709 static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc
= {
713 .sysc_flags
= (SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
|
714 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
),
715 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
716 .sysc_fields
= &omap_hwmod_sysc_type1
,
721 * general purpose io module
723 static struct omap_hwmod_class omap243x_gpio_hwmod_class
= {
725 .sysc
= &omap243x_gpio_sysc
,
730 static struct omap_hwmod_irq_info omap243x_gpio1_irqs
[] = {
731 { .irq
= 29 }, /* INT_24XX_GPIO_BANK1 */
734 static struct omap_hwmod_ocp_if
*omap2430_gpio1_slaves
[] = {
735 &omap2430_l4_wkup__gpio1
,
738 static struct omap_hwmod omap2430_gpio1_hwmod
= {
740 .mpu_irqs
= omap243x_gpio1_irqs
,
741 .mpu_irqs_cnt
= ARRAY_SIZE(omap243x_gpio1_irqs
),
742 .main_clk
= "gpios_fck",
746 .module_bit
= OMAP24XX_EN_GPIOS_SHIFT
,
747 .module_offs
= WKUP_MOD
,
749 .idlest_idle_bit
= OMAP24XX_EN_GPIOS_SHIFT
,
752 .slaves
= omap2430_gpio1_slaves
,
753 .slaves_cnt
= ARRAY_SIZE(omap2430_gpio1_slaves
),
754 .class = &omap243x_gpio_hwmod_class
,
755 .dev_attr
= &gpio_dev_attr
,
756 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
760 static struct omap_hwmod_irq_info omap243x_gpio2_irqs
[] = {
761 { .irq
= 30 }, /* INT_24XX_GPIO_BANK2 */
764 static struct omap_hwmod_ocp_if
*omap2430_gpio2_slaves
[] = {
765 &omap2430_l4_wkup__gpio2
,
768 static struct omap_hwmod omap2430_gpio2_hwmod
= {
770 .mpu_irqs
= omap243x_gpio2_irqs
,
771 .mpu_irqs_cnt
= ARRAY_SIZE(omap243x_gpio2_irqs
),
772 .main_clk
= "gpios_fck",
776 .module_bit
= OMAP24XX_EN_GPIOS_SHIFT
,
777 .module_offs
= WKUP_MOD
,
779 .idlest_idle_bit
= OMAP24XX_ST_GPIOS_SHIFT
,
782 .slaves
= omap2430_gpio2_slaves
,
783 .slaves_cnt
= ARRAY_SIZE(omap2430_gpio2_slaves
),
784 .class = &omap243x_gpio_hwmod_class
,
785 .dev_attr
= &gpio_dev_attr
,
786 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
790 static struct omap_hwmod_irq_info omap243x_gpio3_irqs
[] = {
791 { .irq
= 31 }, /* INT_24XX_GPIO_BANK3 */
794 static struct omap_hwmod_ocp_if
*omap2430_gpio3_slaves
[] = {
795 &omap2430_l4_wkup__gpio3
,
798 static struct omap_hwmod omap2430_gpio3_hwmod
= {
800 .mpu_irqs
= omap243x_gpio3_irqs
,
801 .mpu_irqs_cnt
= ARRAY_SIZE(omap243x_gpio3_irqs
),
802 .main_clk
= "gpios_fck",
806 .module_bit
= OMAP24XX_EN_GPIOS_SHIFT
,
807 .module_offs
= WKUP_MOD
,
809 .idlest_idle_bit
= OMAP24XX_ST_GPIOS_SHIFT
,
812 .slaves
= omap2430_gpio3_slaves
,
813 .slaves_cnt
= ARRAY_SIZE(omap2430_gpio3_slaves
),
814 .class = &omap243x_gpio_hwmod_class
,
815 .dev_attr
= &gpio_dev_attr
,
816 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
820 static struct omap_hwmod_irq_info omap243x_gpio4_irqs
[] = {
821 { .irq
= 32 }, /* INT_24XX_GPIO_BANK4 */
824 static struct omap_hwmod_ocp_if
*omap2430_gpio4_slaves
[] = {
825 &omap2430_l4_wkup__gpio4
,
828 static struct omap_hwmod omap2430_gpio4_hwmod
= {
830 .mpu_irqs
= omap243x_gpio4_irqs
,
831 .mpu_irqs_cnt
= ARRAY_SIZE(omap243x_gpio4_irqs
),
832 .main_clk
= "gpios_fck",
836 .module_bit
= OMAP24XX_EN_GPIOS_SHIFT
,
837 .module_offs
= WKUP_MOD
,
839 .idlest_idle_bit
= OMAP24XX_ST_GPIOS_SHIFT
,
842 .slaves
= omap2430_gpio4_slaves
,
843 .slaves_cnt
= ARRAY_SIZE(omap2430_gpio4_slaves
),
844 .class = &omap243x_gpio_hwmod_class
,
845 .dev_attr
= &gpio_dev_attr
,
846 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
850 static struct omap_hwmod_irq_info omap243x_gpio5_irqs
[] = {
851 { .irq
= 33 }, /* INT_24XX_GPIO_BANK5 */
854 static struct omap_hwmod_ocp_if
*omap2430_gpio5_slaves
[] = {
855 &omap2430_l4_core__gpio5
,
858 static struct omap_hwmod omap2430_gpio5_hwmod
= {
860 .mpu_irqs
= omap243x_gpio5_irqs
,
861 .mpu_irqs_cnt
= ARRAY_SIZE(omap243x_gpio5_irqs
),
862 .main_clk
= "gpio5_fck",
866 .module_bit
= OMAP2430_EN_GPIO5_SHIFT
,
867 .module_offs
= CORE_MOD
,
869 .idlest_idle_bit
= OMAP2430_ST_GPIO5_SHIFT
,
872 .slaves
= omap2430_gpio5_slaves
,
873 .slaves_cnt
= ARRAY_SIZE(omap2430_gpio5_slaves
),
874 .class = &omap243x_gpio_hwmod_class
,
875 .dev_attr
= &gpio_dev_attr
,
876 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
880 static struct omap_hwmod_class_sysconfig omap2430_dma_sysc
= {
884 .sysc_flags
= (SYSC_HAS_SOFTRESET
| SYSC_HAS_MIDLEMODE
|
885 SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_EMUFREE
|
887 .idlemodes
= (MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
888 .sysc_fields
= &omap_hwmod_sysc_type1
,
891 static struct omap_hwmod_class omap2430_dma_hwmod_class
= {
893 .sysc
= &omap2430_dma_sysc
,
897 static struct omap_dma_dev_attr dma_dev_attr
= {
898 .dev_caps
= RESERVE_CHANNEL
| DMA_LINKED_LCH
| GLOBAL_PRIORITY
|
899 IS_CSSA_32
| IS_CDSA_32
| IS_RW_PRIORITY
,
903 static struct omap_hwmod_irq_info omap2430_dma_system_irqs
[] = {
904 { .name
= "0", .irq
= 12 }, /* INT_24XX_SDMA_IRQ0 */
905 { .name
= "1", .irq
= 13 }, /* INT_24XX_SDMA_IRQ1 */
906 { .name
= "2", .irq
= 14 }, /* INT_24XX_SDMA_IRQ2 */
907 { .name
= "3", .irq
= 15 }, /* INT_24XX_SDMA_IRQ3 */
910 static struct omap_hwmod_addr_space omap2430_dma_system_addrs
[] = {
912 .pa_start
= 0x48056000,
913 .pa_end
= 0x4a0560ff,
914 .flags
= ADDR_TYPE_RT
918 /* dma_system -> L3 */
919 static struct omap_hwmod_ocp_if omap2430_dma_system__l3
= {
920 .master
= &omap2430_dma_system_hwmod
,
921 .slave
= &omap2430_l3_main_hwmod
,
923 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
926 /* dma_system master ports */
927 static struct omap_hwmod_ocp_if
*omap2430_dma_system_masters
[] = {
928 &omap2430_dma_system__l3
,
931 /* l4_core -> dma_system */
932 static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system
= {
933 .master
= &omap2430_l4_core_hwmod
,
934 .slave
= &omap2430_dma_system_hwmod
,
936 .addr
= omap2430_dma_system_addrs
,
937 .addr_cnt
= ARRAY_SIZE(omap2430_dma_system_addrs
),
938 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
941 /* dma_system slave ports */
942 static struct omap_hwmod_ocp_if
*omap2430_dma_system_slaves
[] = {
943 &omap2430_l4_core__dma_system
,
946 static struct omap_hwmod omap2430_dma_system_hwmod
= {
948 .class = &omap2430_dma_hwmod_class
,
949 .mpu_irqs
= omap2430_dma_system_irqs
,
950 .mpu_irqs_cnt
= ARRAY_SIZE(omap2430_dma_system_irqs
),
951 .main_clk
= "core_l3_ck",
952 .slaves
= omap2430_dma_system_slaves
,
953 .slaves_cnt
= ARRAY_SIZE(omap2430_dma_system_slaves
),
954 .masters
= omap2430_dma_system_masters
,
955 .masters_cnt
= ARRAY_SIZE(omap2430_dma_system_masters
),
956 .dev_attr
= &dma_dev_attr
,
957 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
),
958 .flags
= HWMOD_NO_IDLEST
,
964 static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc
= {
968 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
|
969 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
971 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
972 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
973 .sysc_fields
= &omap_hwmod_sysc_type1
,
976 static struct omap_hwmod_class usbotg_class
= {
978 .sysc
= &omap2430_usbhsotg_sysc
,
982 static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs
[] = {
984 { .name
= "mc", .irq
= 92 },
985 { .name
= "dma", .irq
= 93 },
988 static struct omap_hwmod omap2430_usbhsotg_hwmod
= {
989 .name
= "usb_otg_hs",
990 .mpu_irqs
= omap2430_usbhsotg_mpu_irqs
,
991 .mpu_irqs_cnt
= ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs
),
992 .main_clk
= "usbhs_ick",
996 .module_bit
= OMAP2430_EN_USBHS_MASK
,
997 .module_offs
= CORE_MOD
,
999 .idlest_idle_bit
= OMAP2430_ST_USBHS_SHIFT
,
1002 .masters
= omap2430_usbhsotg_masters
,
1003 .masters_cnt
= ARRAY_SIZE(omap2430_usbhsotg_masters
),
1004 .slaves
= omap2430_usbhsotg_slaves
,
1005 .slaves_cnt
= ARRAY_SIZE(omap2430_usbhsotg_slaves
),
1006 .class = &usbotg_class
,
1008 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1009 * broken when autoidle is enabled
1010 * workaround is to disable the autoidle bit at module level.
1012 .flags
= HWMOD_NO_OCP_AUTOIDLE
| HWMOD_SWSUP_SIDLE
1013 | HWMOD_SWSUP_MSTANDBY
,
1014 .omap_chip
= OMAP_CHIP_INIT(CHIP_IS_OMAP2430
)
1017 static __initdata
struct omap_hwmod
*omap2430_hwmods
[] = {
1018 &omap2430_l3_main_hwmod
,
1019 &omap2430_l4_core_hwmod
,
1020 &omap2430_l4_wkup_hwmod
,
1021 &omap2430_mpu_hwmod
,
1022 &omap2430_iva_hwmod
,
1023 &omap2430_wd_timer2_hwmod
,
1024 &omap2430_uart1_hwmod
,
1025 &omap2430_uart2_hwmod
,
1026 &omap2430_uart3_hwmod
,
1027 &omap2430_i2c1_hwmod
,
1028 &omap2430_i2c2_hwmod
,
1031 &omap2430_gpio1_hwmod
,
1032 &omap2430_gpio2_hwmod
,
1033 &omap2430_gpio3_hwmod
,
1034 &omap2430_gpio4_hwmod
,
1035 &omap2430_gpio5_hwmod
,
1037 /* dma_system class*/
1038 &omap2430_dma_system_hwmod
,
1041 &omap2430_usbhsotg_hwmod
,
1045 int __init
omap2430_hwmod_init(void)
1047 return omap_hwmod_init(omap2430_hwmods
);