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"
28 * OMAP2430 hardware module integration data
30 * ALl of the data in this section should be autogeneratable from the
31 * TI hardware database or other technical documentation. Data that
32 * is driver-specific or driver-kernel integration-specific belongs
36 static struct omap_hwmod omap2430_mpu_hwmod;
37 static struct omap_hwmod omap2430_iva_hwmod;
38 static struct omap_hwmod omap2430_l3_main_hwmod;
39 static struct omap_hwmod omap2430_l4_core_hwmod;
40 static struct omap_hwmod omap2430_wd_timer2_hwmod;
41 static struct omap_hwmod omap2430_gpio1_hwmod;
42 static struct omap_hwmod omap2430_gpio2_hwmod;
43 static struct omap_hwmod omap2430_gpio3_hwmod;
44 static struct omap_hwmod omap2430_gpio4_hwmod;
45 static struct omap_hwmod omap2430_gpio5_hwmod;
47 /* L3 -> L4_CORE interface */
48 static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
49 .master = &omap2430_l3_main_hwmod,
50 .slave = &omap2430_l4_core_hwmod,
51 .user = OCP_USER_MPU | OCP_USER_SDMA,
54 /* MPU -> L3 interface */
55 static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
56 .master = &omap2430_mpu_hwmod,
57 .slave = &omap2430_l3_main_hwmod,
61 /* Slave interfaces on the L3 interconnect */
62 static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
63 &omap2430_mpu__l3_main,
66 /* Master interfaces on the L3 interconnect */
67 static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
68 &omap2430_l3_main__l4_core,
72 static struct omap_hwmod omap2430_l3_main_hwmod = {
74 .class = &l3_hwmod_class,
75 .masters = omap2430_l3_main_masters,
76 .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
77 .slaves = omap2430_l3_main_slaves,
78 .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
79 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
80 .flags = HWMOD_NO_IDLEST,
83 static struct omap_hwmod omap2430_l4_wkup_hwmod;
84 static struct omap_hwmod omap2430_uart1_hwmod;
85 static struct omap_hwmod omap2430_uart2_hwmod;
86 static struct omap_hwmod omap2430_uart3_hwmod;
87 static struct omap_hwmod omap2430_i2c1_hwmod;
88 static struct omap_hwmod omap2430_i2c2_hwmod;
90 /* I2C IP block address space length (in bytes) */
91 #define OMAP2_I2C_AS_LEN 128
93 /* L4 CORE -> I2C1 interface */
94 static struct omap_hwmod_addr_space omap2430_i2c1_addr_space[] = {
96 .pa_start = 0x48070000,
97 .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
98 .flags = ADDR_TYPE_RT,
102 static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
103 .master = &omap2430_l4_core_hwmod,
104 .slave = &omap2430_i2c1_hwmod,
106 .addr = omap2430_i2c1_addr_space,
107 .addr_cnt = ARRAY_SIZE(omap2430_i2c1_addr_space),
108 .user = OCP_USER_MPU | OCP_USER_SDMA,
111 /* L4 CORE -> I2C2 interface */
112 static struct omap_hwmod_addr_space omap2430_i2c2_addr_space[] = {
114 .pa_start = 0x48072000,
115 .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
116 .flags = ADDR_TYPE_RT,
120 static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
121 .master = &omap2430_l4_core_hwmod,
122 .slave = &omap2430_i2c2_hwmod,
124 .addr = omap2430_i2c2_addr_space,
125 .addr_cnt = ARRAY_SIZE(omap2430_i2c2_addr_space),
126 .user = OCP_USER_MPU | OCP_USER_SDMA,
129 /* L4_CORE -> L4_WKUP interface */
130 static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
131 .master = &omap2430_l4_core_hwmod,
132 .slave = &omap2430_l4_wkup_hwmod,
133 .user = OCP_USER_MPU | OCP_USER_SDMA,
136 /* L4 CORE -> UART1 interface */
137 static struct omap_hwmod_addr_space omap2430_uart1_addr_space[] = {
139 .pa_start = OMAP2_UART1_BASE,
140 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
141 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
145 static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
146 .master = &omap2430_l4_core_hwmod,
147 .slave = &omap2430_uart1_hwmod,
149 .addr = omap2430_uart1_addr_space,
150 .addr_cnt = ARRAY_SIZE(omap2430_uart1_addr_space),
151 .user = OCP_USER_MPU | OCP_USER_SDMA,
154 /* L4 CORE -> UART2 interface */
155 static struct omap_hwmod_addr_space omap2430_uart2_addr_space[] = {
157 .pa_start = OMAP2_UART2_BASE,
158 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
159 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
163 static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
164 .master = &omap2430_l4_core_hwmod,
165 .slave = &omap2430_uart2_hwmod,
167 .addr = omap2430_uart2_addr_space,
168 .addr_cnt = ARRAY_SIZE(omap2430_uart2_addr_space),
169 .user = OCP_USER_MPU | OCP_USER_SDMA,
172 /* L4 PER -> UART3 interface */
173 static struct omap_hwmod_addr_space omap2430_uart3_addr_space[] = {
175 .pa_start = OMAP2_UART3_BASE,
176 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
177 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
181 static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
182 .master = &omap2430_l4_core_hwmod,
183 .slave = &omap2430_uart3_hwmod,
185 .addr = omap2430_uart3_addr_space,
186 .addr_cnt = ARRAY_SIZE(omap2430_uart3_addr_space),
187 .user = OCP_USER_MPU | OCP_USER_SDMA,
190 /* Slave interfaces on the L4_CORE interconnect */
191 static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
192 &omap2430_l3_main__l4_core,
195 /* Master interfaces on the L4_CORE interconnect */
196 static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
197 &omap2430_l4_core__l4_wkup,
201 static struct omap_hwmod omap2430_l4_core_hwmod = {
203 .class = &l4_hwmod_class,
204 .masters = omap2430_l4_core_masters,
205 .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
206 .slaves = omap2430_l4_core_slaves,
207 .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
208 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
209 .flags = HWMOD_NO_IDLEST,
212 /* Slave interfaces on the L4_WKUP interconnect */
213 static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
214 &omap2430_l4_core__l4_wkup,
215 &omap2_l4_core__uart1,
216 &omap2_l4_core__uart2,
217 &omap2_l4_core__uart3,
220 /* Master interfaces on the L4_WKUP interconnect */
221 static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
225 static struct omap_hwmod omap2430_l4_wkup_hwmod = {
227 .class = &l4_hwmod_class,
228 .masters = omap2430_l4_wkup_masters,
229 .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
230 .slaves = omap2430_l4_wkup_slaves,
231 .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
232 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
233 .flags = HWMOD_NO_IDLEST,
236 /* Master interfaces on the MPU device */
237 static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
238 &omap2430_mpu__l3_main,
242 static struct omap_hwmod omap2430_mpu_hwmod = {
244 .class = &mpu_hwmod_class,
245 .main_clk = "mpu_ck",
246 .masters = omap2430_mpu_masters,
247 .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
248 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
252 * IVA2_1 interface data
255 /* IVA2 <- L3 interface */
256 static struct omap_hwmod_ocp_if omap2430_l3__iva = {
257 .master = &omap2430_l3_main_hwmod,
258 .slave = &omap2430_iva_hwmod,
260 .user = OCP_USER_MPU | OCP_USER_SDMA,
263 static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
271 static struct omap_hwmod omap2430_iva_hwmod = {
273 .class = &iva_hwmod_class,
274 .masters = omap2430_iva_masters,
275 .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
276 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
279 /* l4_wkup -> wd_timer2 */
280 static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
282 .pa_start = 0x49016000,
283 .pa_end = 0x4901607f,
284 .flags = ADDR_TYPE_RT
288 static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
289 .master = &omap2430_l4_wkup_hwmod,
290 .slave = &omap2430_wd_timer2_hwmod,
291 .clk = "mpu_wdt_ick",
292 .addr = omap2430_wd_timer2_addrs,
293 .addr_cnt = ARRAY_SIZE(omap2430_wd_timer2_addrs),
294 .user = OCP_USER_MPU | OCP_USER_SDMA,
299 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
303 static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
307 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
309 .sysc_fields = &omap_hwmod_sysc_type1,
312 static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
314 .sysc = &omap2430_wd_timer_sysc,
318 static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
319 &omap2430_l4_wkup__wd_timer2,
322 static struct omap_hwmod omap2430_wd_timer2_hwmod = {
324 .class = &omap2430_wd_timer_hwmod_class,
325 .main_clk = "mpu_wdt_fck",
329 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
330 .module_offs = WKUP_MOD,
332 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
335 .slaves = omap2430_wd_timer2_slaves,
336 .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
337 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
342 static struct omap_hwmod_class_sysconfig uart_sysc = {
346 .sysc_flags = (SYSC_HAS_SIDLEMODE |
347 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
349 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
350 .sysc_fields = &omap_hwmod_sysc_type1,
353 static struct omap_hwmod_class uart_class = {
360 static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
361 { .irq = INT_24XX_UART1_IRQ, },
364 static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
365 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
366 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
369 static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
370 &omap2_l4_core__uart1,
373 static struct omap_hwmod omap2430_uart1_hwmod = {
375 .mpu_irqs = uart1_mpu_irqs,
376 .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
377 .sdma_reqs = uart1_sdma_reqs,
378 .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
379 .main_clk = "uart1_fck",
382 .module_offs = CORE_MOD,
384 .module_bit = OMAP24XX_EN_UART1_SHIFT,
386 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
389 .slaves = omap2430_uart1_slaves,
390 .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
391 .class = &uart_class,
392 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
397 static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
398 { .irq = INT_24XX_UART2_IRQ, },
401 static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
402 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
403 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
406 static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
407 &omap2_l4_core__uart2,
410 static struct omap_hwmod omap2430_uart2_hwmod = {
412 .mpu_irqs = uart2_mpu_irqs,
413 .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
414 .sdma_reqs = uart2_sdma_reqs,
415 .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
416 .main_clk = "uart2_fck",
419 .module_offs = CORE_MOD,
421 .module_bit = OMAP24XX_EN_UART2_SHIFT,
423 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
426 .slaves = omap2430_uart2_slaves,
427 .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
428 .class = &uart_class,
429 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
434 static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
435 { .irq = INT_24XX_UART3_IRQ, },
438 static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
439 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
440 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
443 static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
444 &omap2_l4_core__uart3,
447 static struct omap_hwmod omap2430_uart3_hwmod = {
449 .mpu_irqs = uart3_mpu_irqs,
450 .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
451 .sdma_reqs = uart3_sdma_reqs,
452 .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
453 .main_clk = "uart3_fck",
456 .module_offs = CORE_MOD,
458 .module_bit = OMAP24XX_EN_UART3_SHIFT,
460 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
463 .slaves = omap2430_uart3_slaves,
464 .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
465 .class = &uart_class,
466 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
470 static struct omap_hwmod_class_sysconfig i2c_sysc = {
474 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
475 .sysc_fields = &omap_hwmod_sysc_type1,
478 static struct omap_hwmod_class i2c_class = {
483 static struct omap_i2c_dev_attr i2c_dev_attr;
487 static struct omap_i2c_dev_attr i2c1_dev_attr = {
488 .fifo_depth = 8, /* bytes */
491 static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
492 { .irq = INT_24XX_I2C1_IRQ, },
495 static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
496 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
497 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
500 static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
501 &omap2430_l4_core__i2c1,
504 static struct omap_hwmod omap2430_i2c1_hwmod = {
506 .mpu_irqs = i2c1_mpu_irqs,
507 .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
508 .sdma_reqs = i2c1_sdma_reqs,
509 .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
510 .main_clk = "i2chs1_fck",
514 * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
515 * I2CHS IP's do not follow the usual pattern.
516 * prcm_reg_id alone cannot be used to program
517 * the iclk and fclk. Needs to be handled using
518 * additonal flags when clk handling is moved
519 * to hwmod framework.
521 .module_offs = CORE_MOD,
523 .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
525 .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
528 .slaves = omap2430_i2c1_slaves,
529 .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
531 .dev_attr = &i2c1_dev_attr,
532 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
537 static struct omap_i2c_dev_attr i2c2_dev_attr = {
538 .fifo_depth = 8, /* bytes */
541 static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
542 { .irq = INT_24XX_I2C2_IRQ, },
545 static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
546 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
547 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
550 static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
551 &omap2430_l4_core__i2c2,
554 static struct omap_hwmod omap2430_i2c2_hwmod = {
556 .mpu_irqs = i2c2_mpu_irqs,
557 .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
558 .sdma_reqs = i2c2_sdma_reqs,
559 .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
560 .main_clk = "i2chs2_fck",
563 .module_offs = CORE_MOD,
565 .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
567 .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
570 .slaves = omap2430_i2c2_slaves,
571 .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
573 .dev_attr = &i2c2_dev_attr,
574 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
577 /* l4_wkup -> gpio1 */
578 static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
580 .pa_start = 0x4900C000,
581 .pa_end = 0x4900C1ff,
582 .flags = ADDR_TYPE_RT
586 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
587 .master = &omap2430_l4_wkup_hwmod,
588 .slave = &omap2430_gpio1_hwmod,
590 .addr = omap2430_gpio1_addr_space,
591 .addr_cnt = ARRAY_SIZE(omap2430_gpio1_addr_space),
592 .user = OCP_USER_MPU | OCP_USER_SDMA,
595 /* l4_wkup -> gpio2 */
596 static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
598 .pa_start = 0x4900E000,
599 .pa_end = 0x4900E1ff,
600 .flags = ADDR_TYPE_RT
604 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
605 .master = &omap2430_l4_wkup_hwmod,
606 .slave = &omap2430_gpio2_hwmod,
608 .addr = omap2430_gpio2_addr_space,
609 .addr_cnt = ARRAY_SIZE(omap2430_gpio2_addr_space),
610 .user = OCP_USER_MPU | OCP_USER_SDMA,
613 /* l4_wkup -> gpio3 */
614 static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
616 .pa_start = 0x49010000,
617 .pa_end = 0x490101ff,
618 .flags = ADDR_TYPE_RT
622 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
623 .master = &omap2430_l4_wkup_hwmod,
624 .slave = &omap2430_gpio3_hwmod,
626 .addr = omap2430_gpio3_addr_space,
627 .addr_cnt = ARRAY_SIZE(omap2430_gpio3_addr_space),
628 .user = OCP_USER_MPU | OCP_USER_SDMA,
631 /* l4_wkup -> gpio4 */
632 static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
634 .pa_start = 0x49012000,
635 .pa_end = 0x490121ff,
636 .flags = ADDR_TYPE_RT
640 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
641 .master = &omap2430_l4_wkup_hwmod,
642 .slave = &omap2430_gpio4_hwmod,
644 .addr = omap2430_gpio4_addr_space,
645 .addr_cnt = ARRAY_SIZE(omap2430_gpio4_addr_space),
646 .user = OCP_USER_MPU | OCP_USER_SDMA,
649 /* l4_core -> gpio5 */
650 static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
652 .pa_start = 0x480B6000,
653 .pa_end = 0x480B61ff,
654 .flags = ADDR_TYPE_RT
658 static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
659 .master = &omap2430_l4_core_hwmod,
660 .slave = &omap2430_gpio5_hwmod,
662 .addr = omap2430_gpio5_addr_space,
663 .addr_cnt = ARRAY_SIZE(omap2430_gpio5_addr_space),
664 .user = OCP_USER_MPU | OCP_USER_SDMA,
668 static struct omap_gpio_dev_attr gpio_dev_attr = {
673 static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
677 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
678 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
679 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
680 .sysc_fields = &omap_hwmod_sysc_type1,
685 * general purpose io module
687 static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
689 .sysc = &omap243x_gpio_sysc,
694 static struct omap_hwmod_irq_info omap243x_gpio1_irqs[] = {
695 { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
698 static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
699 &omap2430_l4_wkup__gpio1,
702 static struct omap_hwmod omap2430_gpio1_hwmod = {
704 .mpu_irqs = omap243x_gpio1_irqs,
705 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio1_irqs),
706 .main_clk = "gpios_fck",
710 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
711 .module_offs = WKUP_MOD,
713 .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
716 .slaves = omap2430_gpio1_slaves,
717 .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
718 .class = &omap243x_gpio_hwmod_class,
719 .dev_attr = &gpio_dev_attr,
720 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
724 static struct omap_hwmod_irq_info omap243x_gpio2_irqs[] = {
725 { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
728 static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
729 &omap2430_l4_wkup__gpio2,
732 static struct omap_hwmod omap2430_gpio2_hwmod = {
734 .mpu_irqs = omap243x_gpio2_irqs,
735 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio2_irqs),
736 .main_clk = "gpios_fck",
740 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
741 .module_offs = WKUP_MOD,
743 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
746 .slaves = omap2430_gpio2_slaves,
747 .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
748 .class = &omap243x_gpio_hwmod_class,
749 .dev_attr = &gpio_dev_attr,
750 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
754 static struct omap_hwmod_irq_info omap243x_gpio3_irqs[] = {
755 { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
758 static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
759 &omap2430_l4_wkup__gpio3,
762 static struct omap_hwmod omap2430_gpio3_hwmod = {
764 .mpu_irqs = omap243x_gpio3_irqs,
765 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio3_irqs),
766 .main_clk = "gpios_fck",
770 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
771 .module_offs = WKUP_MOD,
773 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
776 .slaves = omap2430_gpio3_slaves,
777 .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
778 .class = &omap243x_gpio_hwmod_class,
779 .dev_attr = &gpio_dev_attr,
780 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
784 static struct omap_hwmod_irq_info omap243x_gpio4_irqs[] = {
785 { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
788 static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
789 &omap2430_l4_wkup__gpio4,
792 static struct omap_hwmod omap2430_gpio4_hwmod = {
794 .mpu_irqs = omap243x_gpio4_irqs,
795 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio4_irqs),
796 .main_clk = "gpios_fck",
800 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
801 .module_offs = WKUP_MOD,
803 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
806 .slaves = omap2430_gpio4_slaves,
807 .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
808 .class = &omap243x_gpio_hwmod_class,
809 .dev_attr = &gpio_dev_attr,
810 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
814 static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
815 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
818 static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
819 &omap2430_l4_core__gpio5,
822 static struct omap_hwmod omap2430_gpio5_hwmod = {
824 .mpu_irqs = omap243x_gpio5_irqs,
825 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio5_irqs),
826 .main_clk = "gpio5_fck",
830 .module_bit = OMAP2430_EN_GPIO5_SHIFT,
831 .module_offs = CORE_MOD,
833 .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
836 .slaves = omap2430_gpio5_slaves,
837 .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
838 .class = &omap243x_gpio_hwmod_class,
839 .dev_attr = &gpio_dev_attr,
840 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
843 static __initdata struct omap_hwmod *omap2430_hwmods[] = {
844 &omap2430_l3_main_hwmod,
845 &omap2430_l4_core_hwmod,
846 &omap2430_l4_wkup_hwmod,
849 &omap2430_wd_timer2_hwmod,
850 &omap2430_uart1_hwmod,
851 &omap2430_uart2_hwmod,
852 &omap2430_uart3_hwmod,
853 &omap2430_i2c1_hwmod,
854 &omap2430_i2c2_hwmod,
857 &omap2430_gpio1_hwmod,
858 &omap2430_gpio2_hwmod,
859 &omap2430_gpio3_hwmod,
860 &omap2430_gpio4_hwmod,
861 &omap2430_gpio5_hwmod,
865 int __init omap2430_hwmod_init(void)
867 return omap_hwmod_init(omap2430_hwmods);