2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 * The data in this file should be completely autogeneratable from
13 * the TI hardware database or other technical documentation.
15 * XXX these should be marked initdata for multi-OMAP kernels
18 #include <linux/i2c-omap.h>
19 #include <linux/power/smartreflex.h>
20 #include <linux/platform_data/gpio-omap.h>
22 #include <plat-omap/dma-omap.h>
23 #include <plat/serial.h>
27 #include <linux/platform_data/asoc-ti-mcbsp.h>
28 #include <linux/platform_data/spi-omap2-mcspi.h>
29 #include <plat/dmtimer.h>
30 #include <plat/iommu.h>
35 #include "omap_hwmod.h"
36 #include "omap_hwmod_common_data.h"
37 #include "prm-regbits-34xx.h"
38 #include "cm-regbits-34xx.h"
46 * OMAP3xxx hardware module integration data
48 * All of the data in this section should be autogeneratable from the
49 * TI hardware database or other technical documentation. Data that
50 * is driver-specific or driver-kernel integration-specific belongs
59 static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
60 { .irq = 9 + OMAP_INTC_START, },
61 { .irq = 10 + OMAP_INTC_START, },
65 static struct omap_hwmod omap3xxx_l3_main_hwmod = {
67 .class = &l3_hwmod_class,
68 .mpu_irqs = omap3xxx_l3_main_irqs,
69 .flags = HWMOD_NO_IDLEST,
73 static struct omap_hwmod omap3xxx_l4_core_hwmod = {
75 .class = &l4_hwmod_class,
76 .flags = HWMOD_NO_IDLEST,
80 static struct omap_hwmod omap3xxx_l4_per_hwmod = {
82 .class = &l4_hwmod_class,
83 .flags = HWMOD_NO_IDLEST,
87 static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
89 .class = &l4_hwmod_class,
90 .flags = HWMOD_NO_IDLEST,
94 static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
96 .class = &l4_hwmod_class,
97 .flags = HWMOD_NO_IDLEST,
101 static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = {
102 { .name = "pmu", .irq = 3 + OMAP_INTC_START },
106 static struct omap_hwmod omap3xxx_mpu_hwmod = {
108 .mpu_irqs = omap3xxx_mpu_irqs,
109 .class = &mpu_hwmod_class,
110 .main_clk = "arm_fck",
114 static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
115 { .name = "logic", .rst_shift = 0, .st_shift = 8 },
116 { .name = "seq0", .rst_shift = 1, .st_shift = 9 },
117 { .name = "seq1", .rst_shift = 2, .st_shift = 10 },
120 static struct omap_hwmod omap3xxx_iva_hwmod = {
122 .class = &iva_hwmod_class,
123 .clkdm_name = "iva2_clkdm",
124 .rst_lines = omap3xxx_iva_resets,
125 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
126 .main_clk = "iva2_ck",
129 .module_offs = OMAP3430_IVA2_MOD,
131 .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
133 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
140 * debug and emulation sub system
143 static struct omap_hwmod_class omap3xxx_debugss_hwmod_class = {
148 static struct omap_hwmod omap3xxx_debugss_hwmod = {
150 .class = &omap3xxx_debugss_hwmod_class,
151 .clkdm_name = "emu_clkdm",
152 .main_clk = "emu_src_ck",
153 .flags = HWMOD_NO_IDLEST,
157 static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
161 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
162 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
163 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
164 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
165 .sysc_fields = &omap_hwmod_sysc_type1,
168 static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = {
170 .sysc = &omap3xxx_timer_1ms_sysc,
173 static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
177 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
178 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
179 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
180 .sysc_fields = &omap_hwmod_sysc_type1,
183 static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
185 .sysc = &omap3xxx_timer_sysc,
188 /* secure timers dev attribute */
189 static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
190 .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
193 /* always-on timers dev attribute */
194 static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
195 .timer_capability = OMAP_TIMER_ALWON,
198 /* pwm timers dev attribute */
199 static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
200 .timer_capability = OMAP_TIMER_HAS_PWM,
203 /* timers with DSP interrupt dev attribute */
204 static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
205 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
208 /* pwm timers with DSP interrupt dev attribute */
209 static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = {
210 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM,
214 static struct omap_hwmod omap3xxx_timer1_hwmod = {
216 .mpu_irqs = omap2_timer1_mpu_irqs,
217 .main_clk = "gpt1_fck",
221 .module_bit = OMAP3430_EN_GPT1_SHIFT,
222 .module_offs = WKUP_MOD,
224 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
227 .dev_attr = &capability_alwon_dev_attr,
228 .class = &omap3xxx_timer_1ms_hwmod_class,
232 static struct omap_hwmod omap3xxx_timer2_hwmod = {
234 .mpu_irqs = omap2_timer2_mpu_irqs,
235 .main_clk = "gpt2_fck",
239 .module_bit = OMAP3430_EN_GPT2_SHIFT,
240 .module_offs = OMAP3430_PER_MOD,
242 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
245 .class = &omap3xxx_timer_1ms_hwmod_class,
249 static struct omap_hwmod omap3xxx_timer3_hwmod = {
251 .mpu_irqs = omap2_timer3_mpu_irqs,
252 .main_clk = "gpt3_fck",
256 .module_bit = OMAP3430_EN_GPT3_SHIFT,
257 .module_offs = OMAP3430_PER_MOD,
259 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
262 .class = &omap3xxx_timer_hwmod_class,
266 static struct omap_hwmod omap3xxx_timer4_hwmod = {
268 .mpu_irqs = omap2_timer4_mpu_irqs,
269 .main_clk = "gpt4_fck",
273 .module_bit = OMAP3430_EN_GPT4_SHIFT,
274 .module_offs = OMAP3430_PER_MOD,
276 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
279 .class = &omap3xxx_timer_hwmod_class,
283 static struct omap_hwmod omap3xxx_timer5_hwmod = {
285 .mpu_irqs = omap2_timer5_mpu_irqs,
286 .main_clk = "gpt5_fck",
290 .module_bit = OMAP3430_EN_GPT5_SHIFT,
291 .module_offs = OMAP3430_PER_MOD,
293 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
296 .dev_attr = &capability_dsp_dev_attr,
297 .class = &omap3xxx_timer_hwmod_class,
301 static struct omap_hwmod omap3xxx_timer6_hwmod = {
303 .mpu_irqs = omap2_timer6_mpu_irqs,
304 .main_clk = "gpt6_fck",
308 .module_bit = OMAP3430_EN_GPT6_SHIFT,
309 .module_offs = OMAP3430_PER_MOD,
311 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
314 .dev_attr = &capability_dsp_dev_attr,
315 .class = &omap3xxx_timer_hwmod_class,
319 static struct omap_hwmod omap3xxx_timer7_hwmod = {
321 .mpu_irqs = omap2_timer7_mpu_irqs,
322 .main_clk = "gpt7_fck",
326 .module_bit = OMAP3430_EN_GPT7_SHIFT,
327 .module_offs = OMAP3430_PER_MOD,
329 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
332 .dev_attr = &capability_dsp_dev_attr,
333 .class = &omap3xxx_timer_hwmod_class,
337 static struct omap_hwmod omap3xxx_timer8_hwmod = {
339 .mpu_irqs = omap2_timer8_mpu_irqs,
340 .main_clk = "gpt8_fck",
344 .module_bit = OMAP3430_EN_GPT8_SHIFT,
345 .module_offs = OMAP3430_PER_MOD,
347 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
350 .dev_attr = &capability_dsp_pwm_dev_attr,
351 .class = &omap3xxx_timer_hwmod_class,
355 static struct omap_hwmod omap3xxx_timer9_hwmod = {
357 .mpu_irqs = omap2_timer9_mpu_irqs,
358 .main_clk = "gpt9_fck",
362 .module_bit = OMAP3430_EN_GPT9_SHIFT,
363 .module_offs = OMAP3430_PER_MOD,
365 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
368 .dev_attr = &capability_pwm_dev_attr,
369 .class = &omap3xxx_timer_hwmod_class,
373 static struct omap_hwmod omap3xxx_timer10_hwmod = {
375 .mpu_irqs = omap2_timer10_mpu_irqs,
376 .main_clk = "gpt10_fck",
380 .module_bit = OMAP3430_EN_GPT10_SHIFT,
381 .module_offs = CORE_MOD,
383 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
386 .dev_attr = &capability_pwm_dev_attr,
387 .class = &omap3xxx_timer_1ms_hwmod_class,
391 static struct omap_hwmod omap3xxx_timer11_hwmod = {
393 .mpu_irqs = omap2_timer11_mpu_irqs,
394 .main_clk = "gpt11_fck",
398 .module_bit = OMAP3430_EN_GPT11_SHIFT,
399 .module_offs = CORE_MOD,
401 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
404 .dev_attr = &capability_pwm_dev_attr,
405 .class = &omap3xxx_timer_hwmod_class,
409 static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
410 { .irq = 95 + OMAP_INTC_START, },
414 static struct omap_hwmod omap3xxx_timer12_hwmod = {
416 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
417 .main_clk = "gpt12_fck",
421 .module_bit = OMAP3430_EN_GPT12_SHIFT,
422 .module_offs = WKUP_MOD,
424 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
427 .dev_attr = &capability_secure_dev_attr,
428 .class = &omap3xxx_timer_hwmod_class,
433 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
437 static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
441 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
442 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
443 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
444 SYSS_HAS_RESET_STATUS),
445 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
446 .sysc_fields = &omap_hwmod_sysc_type1,
450 static struct omap_hwmod_class_sysconfig i2c_sysc = {
454 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
455 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
456 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
457 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
458 .clockact = CLOCKACT_TEST_ICLK,
459 .sysc_fields = &omap_hwmod_sysc_type1,
462 static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
464 .sysc = &omap3xxx_wd_timer_sysc,
465 .pre_shutdown = &omap2_wd_timer_disable,
466 .reset = &omap2_wd_timer_reset,
469 static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
471 .class = &omap3xxx_wd_timer_hwmod_class,
472 .main_clk = "wdt2_fck",
476 .module_bit = OMAP3430_EN_WDT2_SHIFT,
477 .module_offs = WKUP_MOD,
479 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
483 * XXX: Use software supervised mode, HW supervised smartidle seems to
484 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
486 .flags = HWMOD_SWSUP_SIDLE,
490 static struct omap_hwmod omap3xxx_uart1_hwmod = {
492 .mpu_irqs = omap2_uart1_mpu_irqs,
493 .sdma_reqs = omap2_uart1_sdma_reqs,
494 .main_clk = "uart1_fck",
497 .module_offs = CORE_MOD,
499 .module_bit = OMAP3430_EN_UART1_SHIFT,
501 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
504 .class = &omap2_uart_class,
508 static struct omap_hwmod omap3xxx_uart2_hwmod = {
510 .mpu_irqs = omap2_uart2_mpu_irqs,
511 .sdma_reqs = omap2_uart2_sdma_reqs,
512 .main_clk = "uart2_fck",
515 .module_offs = CORE_MOD,
517 .module_bit = OMAP3430_EN_UART2_SHIFT,
519 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
522 .class = &omap2_uart_class,
526 static struct omap_hwmod omap3xxx_uart3_hwmod = {
528 .mpu_irqs = omap2_uart3_mpu_irqs,
529 .sdma_reqs = omap2_uart3_sdma_reqs,
530 .main_clk = "uart3_fck",
533 .module_offs = OMAP3430_PER_MOD,
535 .module_bit = OMAP3430_EN_UART3_SHIFT,
537 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
540 .class = &omap2_uart_class,
544 static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
545 { .irq = 80 + OMAP_INTC_START, },
549 static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
550 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
551 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
555 static struct omap_hwmod omap36xx_uart4_hwmod = {
557 .mpu_irqs = uart4_mpu_irqs,
558 .sdma_reqs = uart4_sdma_reqs,
559 .main_clk = "uart4_fck",
562 .module_offs = OMAP3430_PER_MOD,
564 .module_bit = OMAP3630_EN_UART4_SHIFT,
566 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
569 .class = &omap2_uart_class,
572 static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
573 { .irq = 84 + OMAP_INTC_START, },
577 static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
578 { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
579 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
584 * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
585 * uart2_fck being enabled. So we add uart1_fck as an optional clock,
586 * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
587 * should not be needed. The functional clock structure of the AM35xx
588 * UART4 is extremely unclear and opaque; it is unclear what the role
589 * of uart1/2_fck is for the UART4. Any clarification from either
590 * empirical testing or the AM3505/3517 hardware designers would be
593 static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks[] = {
594 { .role = "softreset_uart1_fck", .clk = "uart1_fck" },
597 static struct omap_hwmod am35xx_uart4_hwmod = {
599 .mpu_irqs = am35xx_uart4_mpu_irqs,
600 .sdma_reqs = am35xx_uart4_sdma_reqs,
601 .main_clk = "uart4_fck",
604 .module_offs = CORE_MOD,
606 .module_bit = AM35XX_EN_UART4_SHIFT,
608 .idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
611 .opt_clks = am35xx_uart4_opt_clks,
612 .opt_clks_cnt = ARRAY_SIZE(am35xx_uart4_opt_clks),
613 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
614 .class = &omap2_uart_class,
617 static struct omap_hwmod_class i2c_class = {
620 .rev = OMAP_I2C_IP_VERSION_1,
621 .reset = &omap_i2c_reset,
624 static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
625 { .name = "dispc", .dma_req = 5 },
626 { .name = "dsi1", .dma_req = 74 },
631 static struct omap_hwmod_opt_clk dss_opt_clks[] = {
633 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
634 * driver does not use these clocks.
636 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
637 { .role = "tv_clk", .clk = "dss_tv_fck" },
638 /* required only on OMAP3430 */
639 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
642 static struct omap_hwmod omap3430es1_dss_core_hwmod = {
644 .class = &omap2_dss_hwmod_class,
645 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
646 .sdma_reqs = omap3xxx_dss_sdma_chs,
650 .module_bit = OMAP3430_EN_DSS1_SHIFT,
651 .module_offs = OMAP3430_DSS_MOD,
653 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
656 .opt_clks = dss_opt_clks,
657 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
658 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
661 static struct omap_hwmod omap3xxx_dss_core_hwmod = {
663 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
664 .class = &omap2_dss_hwmod_class,
665 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
666 .sdma_reqs = omap3xxx_dss_sdma_chs,
670 .module_bit = OMAP3430_EN_DSS1_SHIFT,
671 .module_offs = OMAP3430_DSS_MOD,
673 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
674 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
677 .opt_clks = dss_opt_clks,
678 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
686 static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
690 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
691 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
693 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
694 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
695 .sysc_fields = &omap_hwmod_sysc_type1,
698 static struct omap_hwmod_class omap3_dispc_hwmod_class = {
700 .sysc = &omap3_dispc_sysc,
703 static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
705 .class = &omap3_dispc_hwmod_class,
706 .mpu_irqs = omap2_dispc_irqs,
707 .main_clk = "dss1_alwon_fck",
711 .module_bit = OMAP3430_EN_DSS1_SHIFT,
712 .module_offs = OMAP3430_DSS_MOD,
715 .flags = HWMOD_NO_IDLEST,
716 .dev_attr = &omap2_3_dss_dispc_dev_attr
721 * display serial interface controller
724 static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
728 static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
729 { .irq = 25 + OMAP_INTC_START, },
734 static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
735 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
738 static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
740 .class = &omap3xxx_dsi_hwmod_class,
741 .mpu_irqs = omap3xxx_dsi1_irqs,
742 .main_clk = "dss1_alwon_fck",
746 .module_bit = OMAP3430_EN_DSS1_SHIFT,
747 .module_offs = OMAP3430_DSS_MOD,
750 .opt_clks = dss_dsi1_opt_clks,
751 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
752 .flags = HWMOD_NO_IDLEST,
755 static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
756 { .role = "ick", .clk = "dss_ick" },
759 static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
761 .class = &omap2_rfbi_hwmod_class,
762 .main_clk = "dss1_alwon_fck",
766 .module_bit = OMAP3430_EN_DSS1_SHIFT,
767 .module_offs = OMAP3430_DSS_MOD,
770 .opt_clks = dss_rfbi_opt_clks,
771 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
772 .flags = HWMOD_NO_IDLEST,
775 static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
776 /* required only on OMAP3430 */
777 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
780 static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
782 .class = &omap2_venc_hwmod_class,
783 .main_clk = "dss_tv_fck",
787 .module_bit = OMAP3430_EN_DSS1_SHIFT,
788 .module_offs = OMAP3430_DSS_MOD,
791 .opt_clks = dss_venc_opt_clks,
792 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
793 .flags = HWMOD_NO_IDLEST,
797 static struct omap_i2c_dev_attr i2c1_dev_attr = {
798 .fifo_depth = 8, /* bytes */
799 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
800 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
801 OMAP_I2C_FLAG_BUS_SHIFT_2,
804 static struct omap_hwmod omap3xxx_i2c1_hwmod = {
806 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
807 .mpu_irqs = omap2_i2c1_mpu_irqs,
808 .sdma_reqs = omap2_i2c1_sdma_reqs,
809 .main_clk = "i2c1_fck",
812 .module_offs = CORE_MOD,
814 .module_bit = OMAP3430_EN_I2C1_SHIFT,
816 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
820 .dev_attr = &i2c1_dev_attr,
824 static struct omap_i2c_dev_attr i2c2_dev_attr = {
825 .fifo_depth = 8, /* bytes */
826 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
827 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
828 OMAP_I2C_FLAG_BUS_SHIFT_2,
831 static struct omap_hwmod omap3xxx_i2c2_hwmod = {
833 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
834 .mpu_irqs = omap2_i2c2_mpu_irqs,
835 .sdma_reqs = omap2_i2c2_sdma_reqs,
836 .main_clk = "i2c2_fck",
839 .module_offs = CORE_MOD,
841 .module_bit = OMAP3430_EN_I2C2_SHIFT,
843 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
847 .dev_attr = &i2c2_dev_attr,
851 static struct omap_i2c_dev_attr i2c3_dev_attr = {
852 .fifo_depth = 64, /* bytes */
853 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
854 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
855 OMAP_I2C_FLAG_BUS_SHIFT_2,
858 static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
859 { .irq = 61 + OMAP_INTC_START, },
863 static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
864 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
865 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
869 static struct omap_hwmod omap3xxx_i2c3_hwmod = {
871 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
872 .mpu_irqs = i2c3_mpu_irqs,
873 .sdma_reqs = i2c3_sdma_reqs,
874 .main_clk = "i2c3_fck",
877 .module_offs = CORE_MOD,
879 .module_bit = OMAP3430_EN_I2C3_SHIFT,
881 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
885 .dev_attr = &i2c3_dev_attr,
890 * general purpose io module
893 static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
897 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
898 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
899 SYSS_HAS_RESET_STATUS),
900 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
901 .sysc_fields = &omap_hwmod_sysc_type1,
904 static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
906 .sysc = &omap3xxx_gpio_sysc,
911 static struct omap_gpio_dev_attr gpio_dev_attr = {
917 static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
918 { .role = "dbclk", .clk = "gpio1_dbck", },
921 static struct omap_hwmod omap3xxx_gpio1_hwmod = {
923 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
924 .mpu_irqs = omap2_gpio1_irqs,
925 .main_clk = "gpio1_ick",
926 .opt_clks = gpio1_opt_clks,
927 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
931 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
932 .module_offs = WKUP_MOD,
934 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
937 .class = &omap3xxx_gpio_hwmod_class,
938 .dev_attr = &gpio_dev_attr,
942 static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
943 { .role = "dbclk", .clk = "gpio2_dbck", },
946 static struct omap_hwmod omap3xxx_gpio2_hwmod = {
948 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
949 .mpu_irqs = omap2_gpio2_irqs,
950 .main_clk = "gpio2_ick",
951 .opt_clks = gpio2_opt_clks,
952 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
956 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
957 .module_offs = OMAP3430_PER_MOD,
959 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
962 .class = &omap3xxx_gpio_hwmod_class,
963 .dev_attr = &gpio_dev_attr,
967 static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
968 { .role = "dbclk", .clk = "gpio3_dbck", },
971 static struct omap_hwmod omap3xxx_gpio3_hwmod = {
973 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
974 .mpu_irqs = omap2_gpio3_irqs,
975 .main_clk = "gpio3_ick",
976 .opt_clks = gpio3_opt_clks,
977 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
981 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
982 .module_offs = OMAP3430_PER_MOD,
984 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
987 .class = &omap3xxx_gpio_hwmod_class,
988 .dev_attr = &gpio_dev_attr,
992 static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
993 { .role = "dbclk", .clk = "gpio4_dbck", },
996 static struct omap_hwmod omap3xxx_gpio4_hwmod = {
998 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
999 .mpu_irqs = omap2_gpio4_irqs,
1000 .main_clk = "gpio4_ick",
1001 .opt_clks = gpio4_opt_clks,
1002 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
1006 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
1007 .module_offs = OMAP3430_PER_MOD,
1009 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
1012 .class = &omap3xxx_gpio_hwmod_class,
1013 .dev_attr = &gpio_dev_attr,
1017 static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
1018 { .irq = 33 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK5 */
1022 static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
1023 { .role = "dbclk", .clk = "gpio5_dbck", },
1026 static struct omap_hwmod omap3xxx_gpio5_hwmod = {
1028 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1029 .mpu_irqs = omap3xxx_gpio5_irqs,
1030 .main_clk = "gpio5_ick",
1031 .opt_clks = gpio5_opt_clks,
1032 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
1036 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
1037 .module_offs = OMAP3430_PER_MOD,
1039 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
1042 .class = &omap3xxx_gpio_hwmod_class,
1043 .dev_attr = &gpio_dev_attr,
1047 static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
1048 { .irq = 34 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK6 */
1052 static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
1053 { .role = "dbclk", .clk = "gpio6_dbck", },
1056 static struct omap_hwmod omap3xxx_gpio6_hwmod = {
1058 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1059 .mpu_irqs = omap3xxx_gpio6_irqs,
1060 .main_clk = "gpio6_ick",
1061 .opt_clks = gpio6_opt_clks,
1062 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
1066 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
1067 .module_offs = OMAP3430_PER_MOD,
1069 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
1072 .class = &omap3xxx_gpio_hwmod_class,
1073 .dev_attr = &gpio_dev_attr,
1076 /* dma attributes */
1077 static struct omap_dma_dev_attr dma_dev_attr = {
1078 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1079 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1083 static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
1085 .sysc_offs = 0x002c,
1086 .syss_offs = 0x0028,
1087 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1088 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1089 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
1090 SYSS_HAS_RESET_STATUS),
1091 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1092 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1093 .sysc_fields = &omap_hwmod_sysc_type1,
1096 static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
1098 .sysc = &omap3xxx_dma_sysc,
1102 static struct omap_hwmod omap3xxx_dma_system_hwmod = {
1104 .class = &omap3xxx_dma_hwmod_class,
1105 .mpu_irqs = omap2_dma_system_irqs,
1106 .main_clk = "core_l3_ick",
1109 .module_offs = CORE_MOD,
1111 .module_bit = OMAP3430_ST_SDMA_SHIFT,
1113 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
1116 .dev_attr = &dma_dev_attr,
1117 .flags = HWMOD_NO_IDLEST,
1122 * multi channel buffered serial port controller
1125 static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
1126 .sysc_offs = 0x008c,
1127 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
1128 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1129 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1130 .sysc_fields = &omap_hwmod_sysc_type1,
1134 static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
1136 .sysc = &omap3xxx_mcbsp_sysc,
1137 .rev = MCBSP_CONFIG_TYPE3,
1140 /* McBSP functional clock mapping */
1141 static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = {
1142 { .role = "pad_fck", .clk = "mcbsp_clks" },
1143 { .role = "prcm_fck", .clk = "core_96m_fck" },
1146 static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
1147 { .role = "pad_fck", .clk = "mcbsp_clks" },
1148 { .role = "prcm_fck", .clk = "per_96m_fck" },
1152 static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
1153 { .name = "common", .irq = 16 + OMAP_INTC_START, },
1154 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
1155 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
1159 static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1161 .class = &omap3xxx_mcbsp_hwmod_class,
1162 .mpu_irqs = omap3xxx_mcbsp1_irqs,
1163 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
1164 .main_clk = "mcbsp1_fck",
1168 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
1169 .module_offs = CORE_MOD,
1171 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
1174 .opt_clks = mcbsp15_opt_clks,
1175 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
1179 static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
1180 { .name = "common", .irq = 17 + OMAP_INTC_START, },
1181 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
1182 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
1186 static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
1187 .sidetone = "mcbsp2_sidetone",
1190 static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1192 .class = &omap3xxx_mcbsp_hwmod_class,
1193 .mpu_irqs = omap3xxx_mcbsp2_irqs,
1194 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
1195 .main_clk = "mcbsp2_fck",
1199 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1200 .module_offs = OMAP3430_PER_MOD,
1202 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1205 .opt_clks = mcbsp234_opt_clks,
1206 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
1207 .dev_attr = &omap34xx_mcbsp2_dev_attr,
1211 static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
1212 { .name = "common", .irq = 22 + OMAP_INTC_START, },
1213 { .name = "tx", .irq = 89 + OMAP_INTC_START, },
1214 { .name = "rx", .irq = 90 + OMAP_INTC_START, },
1218 static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
1219 .sidetone = "mcbsp3_sidetone",
1222 static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1224 .class = &omap3xxx_mcbsp_hwmod_class,
1225 .mpu_irqs = omap3xxx_mcbsp3_irqs,
1226 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
1227 .main_clk = "mcbsp3_fck",
1231 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1232 .module_offs = OMAP3430_PER_MOD,
1234 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1237 .opt_clks = mcbsp234_opt_clks,
1238 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
1239 .dev_attr = &omap34xx_mcbsp3_dev_attr,
1243 static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
1244 { .name = "common", .irq = 23 + OMAP_INTC_START, },
1245 { .name = "tx", .irq = 54 + OMAP_INTC_START, },
1246 { .name = "rx", .irq = 55 + OMAP_INTC_START, },
1250 static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
1251 { .name = "rx", .dma_req = 20 },
1252 { .name = "tx", .dma_req = 19 },
1256 static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1258 .class = &omap3xxx_mcbsp_hwmod_class,
1259 .mpu_irqs = omap3xxx_mcbsp4_irqs,
1260 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
1261 .main_clk = "mcbsp4_fck",
1265 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
1266 .module_offs = OMAP3430_PER_MOD,
1268 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
1271 .opt_clks = mcbsp234_opt_clks,
1272 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
1276 static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
1277 { .name = "common", .irq = 27 + OMAP_INTC_START, },
1278 { .name = "tx", .irq = 81 + OMAP_INTC_START, },
1279 { .name = "rx", .irq = 82 + OMAP_INTC_START, },
1283 static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
1284 { .name = "rx", .dma_req = 22 },
1285 { .name = "tx", .dma_req = 21 },
1289 static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
1291 .class = &omap3xxx_mcbsp_hwmod_class,
1292 .mpu_irqs = omap3xxx_mcbsp5_irqs,
1293 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
1294 .main_clk = "mcbsp5_fck",
1298 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
1299 .module_offs = CORE_MOD,
1301 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
1304 .opt_clks = mcbsp15_opt_clks,
1305 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
1308 /* 'mcbsp sidetone' class */
1309 static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
1310 .sysc_offs = 0x0010,
1311 .sysc_flags = SYSC_HAS_AUTOIDLE,
1312 .sysc_fields = &omap_hwmod_sysc_type1,
1315 static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1316 .name = "mcbsp_sidetone",
1317 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
1320 /* mcbsp2_sidetone */
1321 static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
1322 { .name = "irq", .irq = 4 + OMAP_INTC_START, },
1326 static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1327 .name = "mcbsp2_sidetone",
1328 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1329 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
1330 .main_clk = "mcbsp2_fck",
1334 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1335 .module_offs = OMAP3430_PER_MOD,
1337 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1342 /* mcbsp3_sidetone */
1343 static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
1344 { .name = "irq", .irq = 5 + OMAP_INTC_START, },
1348 static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
1349 .name = "mcbsp3_sidetone",
1350 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1351 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
1352 .main_clk = "mcbsp3_fck",
1356 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1357 .module_offs = OMAP3430_PER_MOD,
1359 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1365 static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
1369 static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
1371 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
1372 .clockact = CLOCKACT_TEST_ICLK,
1373 .sysc_fields = &omap34xx_sr_sysc_fields,
1376 static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
1377 .name = "smartreflex",
1378 .sysc = &omap34xx_sr_sysc,
1382 static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
1387 static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
1389 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1390 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1392 .sysc_fields = &omap36xx_sr_sysc_fields,
1395 static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
1396 .name = "smartreflex",
1397 .sysc = &omap36xx_sr_sysc,
1402 static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1403 .sensor_voltdm_name = "mpu_iva",
1406 static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
1407 { .irq = 18 + OMAP_INTC_START, },
1411 static struct omap_hwmod omap34xx_sr1_hwmod = {
1412 .name = "smartreflex_mpu_iva",
1413 .class = &omap34xx_smartreflex_hwmod_class,
1414 .main_clk = "sr1_fck",
1418 .module_bit = OMAP3430_EN_SR1_SHIFT,
1419 .module_offs = WKUP_MOD,
1421 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1424 .dev_attr = &sr1_dev_attr,
1425 .mpu_irqs = omap3_smartreflex_mpu_irqs,
1426 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1429 static struct omap_hwmod omap36xx_sr1_hwmod = {
1430 .name = "smartreflex_mpu_iva",
1431 .class = &omap36xx_smartreflex_hwmod_class,
1432 .main_clk = "sr1_fck",
1436 .module_bit = OMAP3430_EN_SR1_SHIFT,
1437 .module_offs = WKUP_MOD,
1439 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1442 .dev_attr = &sr1_dev_attr,
1443 .mpu_irqs = omap3_smartreflex_mpu_irqs,
1447 static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1448 .sensor_voltdm_name = "core",
1451 static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
1452 { .irq = 19 + OMAP_INTC_START, },
1456 static struct omap_hwmod omap34xx_sr2_hwmod = {
1457 .name = "smartreflex_core",
1458 .class = &omap34xx_smartreflex_hwmod_class,
1459 .main_clk = "sr2_fck",
1463 .module_bit = OMAP3430_EN_SR2_SHIFT,
1464 .module_offs = WKUP_MOD,
1466 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1469 .dev_attr = &sr2_dev_attr,
1470 .mpu_irqs = omap3_smartreflex_core_irqs,
1471 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1474 static struct omap_hwmod omap36xx_sr2_hwmod = {
1475 .name = "smartreflex_core",
1476 .class = &omap36xx_smartreflex_hwmod_class,
1477 .main_clk = "sr2_fck",
1481 .module_bit = OMAP3430_EN_SR2_SHIFT,
1482 .module_offs = WKUP_MOD,
1484 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1487 .dev_attr = &sr2_dev_attr,
1488 .mpu_irqs = omap3_smartreflex_core_irqs,
1493 * mailbox module allowing communication between the on-chip processors
1494 * using a queued mailbox-interrupt mechanism.
1497 static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
1501 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1502 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1503 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1504 .sysc_fields = &omap_hwmod_sysc_type1,
1507 static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1509 .sysc = &omap3xxx_mailbox_sysc,
1512 static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
1513 { .irq = 26 + OMAP_INTC_START, },
1517 static struct omap_hwmod omap3xxx_mailbox_hwmod = {
1519 .class = &omap3xxx_mailbox_hwmod_class,
1520 .mpu_irqs = omap3xxx_mailbox_irqs,
1521 .main_clk = "mailboxes_ick",
1525 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
1526 .module_offs = CORE_MOD,
1528 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
1535 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1539 static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
1541 .sysc_offs = 0x0010,
1542 .syss_offs = 0x0014,
1543 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1544 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1545 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1546 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1547 .sysc_fields = &omap_hwmod_sysc_type1,
1550 static struct omap_hwmod_class omap34xx_mcspi_class = {
1552 .sysc = &omap34xx_mcspi_sysc,
1553 .rev = OMAP3_MCSPI_REV,
1557 static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1558 .num_chipselect = 4,
1561 static struct omap_hwmod omap34xx_mcspi1 = {
1563 .mpu_irqs = omap2_mcspi1_mpu_irqs,
1564 .sdma_reqs = omap2_mcspi1_sdma_reqs,
1565 .main_clk = "mcspi1_fck",
1568 .module_offs = CORE_MOD,
1570 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
1572 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
1575 .class = &omap34xx_mcspi_class,
1576 .dev_attr = &omap_mcspi1_dev_attr,
1580 static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1581 .num_chipselect = 2,
1584 static struct omap_hwmod omap34xx_mcspi2 = {
1586 .mpu_irqs = omap2_mcspi2_mpu_irqs,
1587 .sdma_reqs = omap2_mcspi2_sdma_reqs,
1588 .main_clk = "mcspi2_fck",
1591 .module_offs = CORE_MOD,
1593 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
1595 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
1598 .class = &omap34xx_mcspi_class,
1599 .dev_attr = &omap_mcspi2_dev_attr,
1603 static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
1604 { .name = "irq", .irq = 91 + OMAP_INTC_START, }, /* 91 */
1608 static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
1609 { .name = "tx0", .dma_req = 15 },
1610 { .name = "rx0", .dma_req = 16 },
1611 { .name = "tx1", .dma_req = 23 },
1612 { .name = "rx1", .dma_req = 24 },
1616 static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1617 .num_chipselect = 2,
1620 static struct omap_hwmod omap34xx_mcspi3 = {
1622 .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
1623 .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
1624 .main_clk = "mcspi3_fck",
1627 .module_offs = CORE_MOD,
1629 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
1631 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
1634 .class = &omap34xx_mcspi_class,
1635 .dev_attr = &omap_mcspi3_dev_attr,
1639 static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
1640 { .name = "irq", .irq = 48 + OMAP_INTC_START, },
1644 static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
1645 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
1646 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
1650 static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
1651 .num_chipselect = 1,
1654 static struct omap_hwmod omap34xx_mcspi4 = {
1656 .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
1657 .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
1658 .main_clk = "mcspi4_fck",
1661 .module_offs = CORE_MOD,
1663 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
1665 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
1668 .class = &omap34xx_mcspi_class,
1669 .dev_attr = &omap_mcspi4_dev_attr,
1673 static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
1675 .sysc_offs = 0x0404,
1676 .syss_offs = 0x0408,
1677 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1678 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1680 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1681 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1682 .sysc_fields = &omap_hwmod_sysc_type1,
1685 static struct omap_hwmod_class usbotg_class = {
1687 .sysc = &omap3xxx_usbhsotg_sysc,
1691 static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
1693 { .name = "mc", .irq = 92 + OMAP_INTC_START, },
1694 { .name = "dma", .irq = 93 + OMAP_INTC_START, },
1698 static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1699 .name = "usb_otg_hs",
1700 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
1701 .main_clk = "hsotgusb_ick",
1705 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1706 .module_offs = CORE_MOD,
1708 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
1709 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
1712 .class = &usbotg_class,
1715 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1716 * broken when autoidle is enabled
1717 * workaround is to disable the autoidle bit at module level.
1719 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
1720 | HWMOD_SWSUP_MSTANDBY,
1724 static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
1725 { .name = "mc", .irq = 71 + OMAP_INTC_START, },
1729 static struct omap_hwmod_class am35xx_usbotg_class = {
1730 .name = "am35xx_usbotg",
1733 static struct omap_hwmod am35xx_usbhsotg_hwmod = {
1734 .name = "am35x_otg_hs",
1735 .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
1736 .main_clk = "hsotgusb_fck",
1737 .class = &am35xx_usbotg_class,
1738 .flags = HWMOD_NO_IDLEST,
1741 /* MMC/SD/SDIO common */
1742 static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
1746 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1747 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1748 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1749 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1750 .sysc_fields = &omap_hwmod_sysc_type1,
1753 static struct omap_hwmod_class omap34xx_mmc_class = {
1755 .sysc = &omap34xx_mmc_sysc,
1760 static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
1761 { .irq = 83 + OMAP_INTC_START, },
1765 static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
1766 { .name = "tx", .dma_req = 61, },
1767 { .name = "rx", .dma_req = 62, },
1771 static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
1772 { .role = "dbck", .clk = "omap_32k_fck", },
1775 static struct omap_mmc_dev_attr mmc1_dev_attr = {
1776 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1779 /* See 35xx errata 2.1.1.128 in SPRZ278F */
1780 static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
1781 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
1782 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
1785 static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
1787 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
1788 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
1789 .opt_clks = omap34xx_mmc1_opt_clks,
1790 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1791 .main_clk = "mmchs1_fck",
1794 .module_offs = CORE_MOD,
1796 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1798 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1801 .dev_attr = &mmc1_pre_es3_dev_attr,
1802 .class = &omap34xx_mmc_class,
1805 static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1807 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
1808 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
1809 .opt_clks = omap34xx_mmc1_opt_clks,
1810 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1811 .main_clk = "mmchs1_fck",
1814 .module_offs = CORE_MOD,
1816 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1818 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1821 .dev_attr = &mmc1_dev_attr,
1822 .class = &omap34xx_mmc_class,
1827 static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
1828 { .irq = 86 + OMAP_INTC_START, },
1832 static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
1833 { .name = "tx", .dma_req = 47, },
1834 { .name = "rx", .dma_req = 48, },
1838 static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
1839 { .role = "dbck", .clk = "omap_32k_fck", },
1842 /* See 35xx errata 2.1.1.128 in SPRZ278F */
1843 static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
1844 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
1847 static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
1849 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
1850 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
1851 .opt_clks = omap34xx_mmc2_opt_clks,
1852 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1853 .main_clk = "mmchs2_fck",
1856 .module_offs = CORE_MOD,
1858 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1860 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1863 .dev_attr = &mmc2_pre_es3_dev_attr,
1864 .class = &omap34xx_mmc_class,
1867 static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1869 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
1870 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
1871 .opt_clks = omap34xx_mmc2_opt_clks,
1872 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1873 .main_clk = "mmchs2_fck",
1876 .module_offs = CORE_MOD,
1878 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1880 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1883 .class = &omap34xx_mmc_class,
1888 static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
1889 { .irq = 94 + OMAP_INTC_START, },
1893 static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
1894 { .name = "tx", .dma_req = 77, },
1895 { .name = "rx", .dma_req = 78, },
1899 static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
1900 { .role = "dbck", .clk = "omap_32k_fck", },
1903 static struct omap_hwmod omap3xxx_mmc3_hwmod = {
1905 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
1906 .sdma_reqs = omap34xx_mmc3_sdma_reqs,
1907 .opt_clks = omap34xx_mmc3_opt_clks,
1908 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
1909 .main_clk = "mmchs3_fck",
1913 .module_bit = OMAP3430_EN_MMC3_SHIFT,
1915 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
1918 .class = &omap34xx_mmc_class,
1922 * 'usb_host_hs' class
1923 * high-speed multi-port usb host controller
1926 static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
1928 .sysc_offs = 0x0010,
1929 .syss_offs = 0x0014,
1930 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1931 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1932 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1933 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1934 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1935 .sysc_fields = &omap_hwmod_sysc_type1,
1938 static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
1939 .name = "usb_host_hs",
1940 .sysc = &omap3xxx_usb_host_hs_sysc,
1943 static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
1944 { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
1947 static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
1948 { .name = "ohci-irq", .irq = 76 + OMAP_INTC_START, },
1949 { .name = "ehci-irq", .irq = 77 + OMAP_INTC_START, },
1953 static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
1954 .name = "usb_host_hs",
1955 .class = &omap3xxx_usb_host_hs_hwmod_class,
1956 .clkdm_name = "l3_init_clkdm",
1957 .mpu_irqs = omap3xxx_usb_host_hs_irqs,
1958 .main_clk = "usbhost_48m_fck",
1961 .module_offs = OMAP3430ES2_USBHOST_MOD,
1963 .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
1965 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
1966 .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
1969 .opt_clks = omap3xxx_usb_host_hs_opt_clks,
1970 .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
1973 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1977 * In the following configuration :
1978 * - USBHOST module is set to smart-idle mode
1979 * - PRCM asserts idle_req to the USBHOST module ( This typically
1980 * happens when the system is going to a low power mode : all ports
1981 * have been suspended, the master part of the USBHOST module has
1982 * entered the standby state, and SW has cut the functional clocks)
1983 * - an USBHOST interrupt occurs before the module is able to answer
1984 * idle_ack, typically a remote wakeup IRQ.
1985 * Then the USB HOST module will enter a deadlock situation where it
1986 * is no more accessible nor functional.
1989 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1993 * Errata: USB host EHCI may stall when entering smart-standby mode
1997 * When the USBHOST module is set to smart-standby mode, and when it is
1998 * ready to enter the standby state (i.e. all ports are suspended and
1999 * all attached devices are in suspend mode), then it can wrongly assert
2000 * the Mstandby signal too early while there are still some residual OCP
2001 * transactions ongoing. If this condition occurs, the internal state
2002 * machine may go to an undefined state and the USB link may be stuck
2003 * upon the next resume.
2006 * Don't use smart standby; use only force standby,
2007 * hence HWMOD_SWSUP_MSTANDBY
2011 * During system boot; If the hwmod framework resets the module
2012 * the module will have smart idle settings; which can lead to deadlock
2013 * (above Errata Id:i660); so, dont reset the module during boot;
2014 * Use HWMOD_INIT_NO_RESET.
2017 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
2018 HWMOD_INIT_NO_RESET,
2022 * 'usb_tll_hs' class
2023 * usb_tll_hs module is the adapter on the usb_host_hs ports
2025 static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
2027 .sysc_offs = 0x0010,
2028 .syss_offs = 0x0014,
2029 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2030 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2032 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2033 .sysc_fields = &omap_hwmod_sysc_type1,
2036 static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
2037 .name = "usb_tll_hs",
2038 .sysc = &omap3xxx_usb_tll_hs_sysc,
2041 static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
2042 { .name = "tll-irq", .irq = 78 + OMAP_INTC_START, },
2046 static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
2047 .name = "usb_tll_hs",
2048 .class = &omap3xxx_usb_tll_hs_hwmod_class,
2049 .clkdm_name = "l3_init_clkdm",
2050 .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
2051 .main_clk = "usbtll_fck",
2054 .module_offs = CORE_MOD,
2056 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
2058 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
2063 static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
2065 .mpu_irqs = omap2_hdq1w_mpu_irqs,
2066 .main_clk = "hdq_fck",
2069 .module_offs = CORE_MOD,
2071 .module_bit = OMAP3430_EN_HDQ_SHIFT,
2073 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
2076 .class = &omap2_hdq1w_class,
2080 static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = {
2081 { .name = "rst_modem_pwron_sw", .rst_shift = 0 },
2082 { .name = "rst_modem_sw", .rst_shift = 1 },
2085 static struct omap_hwmod_class omap3xxx_sad2d_class = {
2089 static struct omap_hwmod omap3xxx_sad2d_hwmod = {
2091 .rst_lines = omap3xxx_sad2d_resets,
2092 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets),
2093 .main_clk = "sad2d_ick",
2096 .module_offs = CORE_MOD,
2098 .module_bit = OMAP3430_EN_SAD2D_SHIFT,
2100 .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT,
2103 .class = &omap3xxx_sad2d_class,
2107 * '32K sync counter' class
2108 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
2110 static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
2112 .sysc_offs = 0x0004,
2113 .sysc_flags = SYSC_HAS_SIDLEMODE,
2114 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
2115 .sysc_fields = &omap_hwmod_sysc_type1,
2118 static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
2120 .sysc = &omap3xxx_counter_sysc,
2123 static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
2124 .name = "counter_32k",
2125 .class = &omap3xxx_counter_hwmod_class,
2126 .clkdm_name = "wkup_clkdm",
2127 .flags = HWMOD_SWSUP_SIDLE,
2128 .main_clk = "wkup_32k_fck",
2131 .module_offs = WKUP_MOD,
2133 .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
2135 .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
2142 * general purpose memory controller
2145 static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = {
2147 .sysc_offs = 0x0010,
2148 .syss_offs = 0x0014,
2149 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
2150 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2151 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2152 .sysc_fields = &omap_hwmod_sysc_type1,
2155 static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = {
2157 .sysc = &omap3xxx_gpmc_sysc,
2160 static struct omap_hwmod_irq_info omap3xxx_gpmc_irqs[] = {
2165 static struct omap_hwmod omap3xxx_gpmc_hwmod = {
2167 .class = &omap3xxx_gpmc_hwmod_class,
2168 .clkdm_name = "core_l3_clkdm",
2169 .mpu_irqs = omap3xxx_gpmc_irqs,
2170 .main_clk = "gpmc_fck",
2172 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
2173 * block. It is not being added due to any known bugs with
2174 * resetting the GPMC IP block, but rather because any timings
2175 * set by the bootloader are not being correctly programmed by
2176 * the kernel from the board file or DT data.
2177 * HWMOD_INIT_NO_RESET should be removed ASAP.
2179 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
2187 /* L3 -> L4_CORE interface */
2188 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
2189 .master = &omap3xxx_l3_main_hwmod,
2190 .slave = &omap3xxx_l4_core_hwmod,
2191 .user = OCP_USER_MPU | OCP_USER_SDMA,
2194 /* L3 -> L4_PER interface */
2195 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
2196 .master = &omap3xxx_l3_main_hwmod,
2197 .slave = &omap3xxx_l4_per_hwmod,
2198 .user = OCP_USER_MPU | OCP_USER_SDMA,
2201 static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
2203 .pa_start = 0x68000000,
2204 .pa_end = 0x6800ffff,
2205 .flags = ADDR_TYPE_RT,
2210 /* MPU -> L3 interface */
2211 static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
2212 .master = &omap3xxx_mpu_hwmod,
2213 .slave = &omap3xxx_l3_main_hwmod,
2214 .addr = omap3xxx_l3_main_addrs,
2215 .user = OCP_USER_MPU,
2218 static struct omap_hwmod_addr_space omap3xxx_l4_emu_addrs[] = {
2220 .pa_start = 0x54000000,
2221 .pa_end = 0x547fffff,
2222 .flags = ADDR_TYPE_RT,
2228 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = {
2229 .master = &omap3xxx_l3_main_hwmod,
2230 .slave = &omap3xxx_debugss_hwmod,
2231 .addr = omap3xxx_l4_emu_addrs,
2232 .user = OCP_USER_MPU,
2236 static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
2237 .master = &omap3430es1_dss_core_hwmod,
2238 .slave = &omap3xxx_l3_main_hwmod,
2239 .user = OCP_USER_MPU | OCP_USER_SDMA,
2242 static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
2243 .master = &omap3xxx_dss_core_hwmod,
2244 .slave = &omap3xxx_l3_main_hwmod,
2247 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
2248 .flags = OMAP_FIREWALL_L3,
2251 .user = OCP_USER_MPU | OCP_USER_SDMA,
2254 /* l3_core -> usbhsotg interface */
2255 static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
2256 .master = &omap3xxx_usbhsotg_hwmod,
2257 .slave = &omap3xxx_l3_main_hwmod,
2258 .clk = "core_l3_ick",
2259 .user = OCP_USER_MPU,
2262 /* l3_core -> am35xx_usbhsotg interface */
2263 static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
2264 .master = &am35xx_usbhsotg_hwmod,
2265 .slave = &omap3xxx_l3_main_hwmod,
2266 .clk = "hsotgusb_ick",
2267 .user = OCP_USER_MPU,
2270 /* l3_core -> sad2d interface */
2271 static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = {
2272 .master = &omap3xxx_sad2d_hwmod,
2273 .slave = &omap3xxx_l3_main_hwmod,
2274 .clk = "core_l3_ick",
2275 .user = OCP_USER_MPU,
2278 /* L4_CORE -> L4_WKUP interface */
2279 static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
2280 .master = &omap3xxx_l4_core_hwmod,
2281 .slave = &omap3xxx_l4_wkup_hwmod,
2282 .user = OCP_USER_MPU | OCP_USER_SDMA,
2285 /* L4 CORE -> MMC1 interface */
2286 static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
2287 .master = &omap3xxx_l4_core_hwmod,
2288 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
2289 .clk = "mmchs1_ick",
2290 .addr = omap2430_mmc1_addr_space,
2291 .user = OCP_USER_MPU | OCP_USER_SDMA,
2292 .flags = OMAP_FIREWALL_L4
2295 static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
2296 .master = &omap3xxx_l4_core_hwmod,
2297 .slave = &omap3xxx_es3plus_mmc1_hwmod,
2298 .clk = "mmchs1_ick",
2299 .addr = omap2430_mmc1_addr_space,
2300 .user = OCP_USER_MPU | OCP_USER_SDMA,
2301 .flags = OMAP_FIREWALL_L4
2304 /* L4 CORE -> MMC2 interface */
2305 static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
2306 .master = &omap3xxx_l4_core_hwmod,
2307 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
2308 .clk = "mmchs2_ick",
2309 .addr = omap2430_mmc2_addr_space,
2310 .user = OCP_USER_MPU | OCP_USER_SDMA,
2311 .flags = OMAP_FIREWALL_L4
2314 static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
2315 .master = &omap3xxx_l4_core_hwmod,
2316 .slave = &omap3xxx_es3plus_mmc2_hwmod,
2317 .clk = "mmchs2_ick",
2318 .addr = omap2430_mmc2_addr_space,
2319 .user = OCP_USER_MPU | OCP_USER_SDMA,
2320 .flags = OMAP_FIREWALL_L4
2323 /* L4 CORE -> MMC3 interface */
2324 static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
2326 .pa_start = 0x480ad000,
2327 .pa_end = 0x480ad1ff,
2328 .flags = ADDR_TYPE_RT,
2333 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
2334 .master = &omap3xxx_l4_core_hwmod,
2335 .slave = &omap3xxx_mmc3_hwmod,
2336 .clk = "mmchs3_ick",
2337 .addr = omap3xxx_mmc3_addr_space,
2338 .user = OCP_USER_MPU | OCP_USER_SDMA,
2339 .flags = OMAP_FIREWALL_L4
2342 /* L4 CORE -> UART1 interface */
2343 static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
2345 .pa_start = OMAP3_UART1_BASE,
2346 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
2347 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2352 static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
2353 .master = &omap3xxx_l4_core_hwmod,
2354 .slave = &omap3xxx_uart1_hwmod,
2356 .addr = omap3xxx_uart1_addr_space,
2357 .user = OCP_USER_MPU | OCP_USER_SDMA,
2360 /* L4 CORE -> UART2 interface */
2361 static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
2363 .pa_start = OMAP3_UART2_BASE,
2364 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
2365 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2370 static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
2371 .master = &omap3xxx_l4_core_hwmod,
2372 .slave = &omap3xxx_uart2_hwmod,
2374 .addr = omap3xxx_uart2_addr_space,
2375 .user = OCP_USER_MPU | OCP_USER_SDMA,
2378 /* L4 PER -> UART3 interface */
2379 static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
2381 .pa_start = OMAP3_UART3_BASE,
2382 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
2383 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2388 static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
2389 .master = &omap3xxx_l4_per_hwmod,
2390 .slave = &omap3xxx_uart3_hwmod,
2392 .addr = omap3xxx_uart3_addr_space,
2393 .user = OCP_USER_MPU | OCP_USER_SDMA,
2396 /* L4 PER -> UART4 interface */
2397 static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
2399 .pa_start = OMAP3_UART4_BASE,
2400 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
2401 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2406 static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
2407 .master = &omap3xxx_l4_per_hwmod,
2408 .slave = &omap36xx_uart4_hwmod,
2410 .addr = omap36xx_uart4_addr_space,
2411 .user = OCP_USER_MPU | OCP_USER_SDMA,
2414 /* AM35xx: L4 CORE -> UART4 interface */
2415 static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
2417 .pa_start = OMAP3_UART4_AM35XX_BASE,
2418 .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
2419 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2424 static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
2425 .master = &omap3xxx_l4_core_hwmod,
2426 .slave = &am35xx_uart4_hwmod,
2428 .addr = am35xx_uart4_addr_space,
2429 .user = OCP_USER_MPU | OCP_USER_SDMA,
2432 /* L4 CORE -> I2C1 interface */
2433 static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
2434 .master = &omap3xxx_l4_core_hwmod,
2435 .slave = &omap3xxx_i2c1_hwmod,
2437 .addr = omap2_i2c1_addr_space,
2440 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
2442 .flags = OMAP_FIREWALL_L4,
2445 .user = OCP_USER_MPU | OCP_USER_SDMA,
2448 /* L4 CORE -> I2C2 interface */
2449 static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
2450 .master = &omap3xxx_l4_core_hwmod,
2451 .slave = &omap3xxx_i2c2_hwmod,
2453 .addr = omap2_i2c2_addr_space,
2456 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
2458 .flags = OMAP_FIREWALL_L4,
2461 .user = OCP_USER_MPU | OCP_USER_SDMA,
2464 /* L4 CORE -> I2C3 interface */
2465 static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
2467 .pa_start = 0x48060000,
2468 .pa_end = 0x48060000 + SZ_128 - 1,
2469 .flags = ADDR_TYPE_RT,
2474 static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
2475 .master = &omap3xxx_l4_core_hwmod,
2476 .slave = &omap3xxx_i2c3_hwmod,
2478 .addr = omap3xxx_i2c3_addr_space,
2481 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
2483 .flags = OMAP_FIREWALL_L4,
2486 .user = OCP_USER_MPU | OCP_USER_SDMA,
2489 /* L4 CORE -> SR1 interface */
2490 static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
2492 .pa_start = OMAP34XX_SR1_BASE,
2493 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
2494 .flags = ADDR_TYPE_RT,
2499 static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
2500 .master = &omap3xxx_l4_core_hwmod,
2501 .slave = &omap34xx_sr1_hwmod,
2503 .addr = omap3_sr1_addr_space,
2504 .user = OCP_USER_MPU,
2507 static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
2508 .master = &omap3xxx_l4_core_hwmod,
2509 .slave = &omap36xx_sr1_hwmod,
2511 .addr = omap3_sr1_addr_space,
2512 .user = OCP_USER_MPU,
2515 /* L4 CORE -> SR1 interface */
2516 static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
2518 .pa_start = OMAP34XX_SR2_BASE,
2519 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
2520 .flags = ADDR_TYPE_RT,
2525 static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
2526 .master = &omap3xxx_l4_core_hwmod,
2527 .slave = &omap34xx_sr2_hwmod,
2529 .addr = omap3_sr2_addr_space,
2530 .user = OCP_USER_MPU,
2533 static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
2534 .master = &omap3xxx_l4_core_hwmod,
2535 .slave = &omap36xx_sr2_hwmod,
2537 .addr = omap3_sr2_addr_space,
2538 .user = OCP_USER_MPU,
2541 static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
2543 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
2544 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
2545 .flags = ADDR_TYPE_RT
2550 /* l4_core -> usbhsotg */
2551 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
2552 .master = &omap3xxx_l4_core_hwmod,
2553 .slave = &omap3xxx_usbhsotg_hwmod,
2555 .addr = omap3xxx_usbhsotg_addrs,
2556 .user = OCP_USER_MPU,
2559 static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
2561 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
2562 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
2563 .flags = ADDR_TYPE_RT
2568 /* l4_core -> usbhsotg */
2569 static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2570 .master = &omap3xxx_l4_core_hwmod,
2571 .slave = &am35xx_usbhsotg_hwmod,
2572 .clk = "hsotgusb_ick",
2573 .addr = am35xx_usbhsotg_addrs,
2574 .user = OCP_USER_MPU,
2577 /* L4_WKUP -> L4_SEC interface */
2578 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2579 .master = &omap3xxx_l4_wkup_hwmod,
2580 .slave = &omap3xxx_l4_sec_hwmod,
2581 .user = OCP_USER_MPU | OCP_USER_SDMA,
2584 /* IVA2 <- L3 interface */
2585 static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2586 .master = &omap3xxx_l3_main_hwmod,
2587 .slave = &omap3xxx_iva_hwmod,
2588 .clk = "core_l3_ick",
2589 .user = OCP_USER_MPU | OCP_USER_SDMA,
2592 static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
2594 .pa_start = 0x48318000,
2595 .pa_end = 0x48318000 + SZ_1K - 1,
2596 .flags = ADDR_TYPE_RT
2601 /* l4_wkup -> timer1 */
2602 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2603 .master = &omap3xxx_l4_wkup_hwmod,
2604 .slave = &omap3xxx_timer1_hwmod,
2606 .addr = omap3xxx_timer1_addrs,
2607 .user = OCP_USER_MPU | OCP_USER_SDMA,
2610 static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
2612 .pa_start = 0x49032000,
2613 .pa_end = 0x49032000 + SZ_1K - 1,
2614 .flags = ADDR_TYPE_RT
2619 /* l4_per -> timer2 */
2620 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2621 .master = &omap3xxx_l4_per_hwmod,
2622 .slave = &omap3xxx_timer2_hwmod,
2624 .addr = omap3xxx_timer2_addrs,
2625 .user = OCP_USER_MPU | OCP_USER_SDMA,
2628 static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
2630 .pa_start = 0x49034000,
2631 .pa_end = 0x49034000 + SZ_1K - 1,
2632 .flags = ADDR_TYPE_RT
2637 /* l4_per -> timer3 */
2638 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
2639 .master = &omap3xxx_l4_per_hwmod,
2640 .slave = &omap3xxx_timer3_hwmod,
2642 .addr = omap3xxx_timer3_addrs,
2643 .user = OCP_USER_MPU | OCP_USER_SDMA,
2646 static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
2648 .pa_start = 0x49036000,
2649 .pa_end = 0x49036000 + SZ_1K - 1,
2650 .flags = ADDR_TYPE_RT
2655 /* l4_per -> timer4 */
2656 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2657 .master = &omap3xxx_l4_per_hwmod,
2658 .slave = &omap3xxx_timer4_hwmod,
2660 .addr = omap3xxx_timer4_addrs,
2661 .user = OCP_USER_MPU | OCP_USER_SDMA,
2664 static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
2666 .pa_start = 0x49038000,
2667 .pa_end = 0x49038000 + SZ_1K - 1,
2668 .flags = ADDR_TYPE_RT
2673 /* l4_per -> timer5 */
2674 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2675 .master = &omap3xxx_l4_per_hwmod,
2676 .slave = &omap3xxx_timer5_hwmod,
2678 .addr = omap3xxx_timer5_addrs,
2679 .user = OCP_USER_MPU | OCP_USER_SDMA,
2682 static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
2684 .pa_start = 0x4903A000,
2685 .pa_end = 0x4903A000 + SZ_1K - 1,
2686 .flags = ADDR_TYPE_RT
2691 /* l4_per -> timer6 */
2692 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2693 .master = &omap3xxx_l4_per_hwmod,
2694 .slave = &omap3xxx_timer6_hwmod,
2696 .addr = omap3xxx_timer6_addrs,
2697 .user = OCP_USER_MPU | OCP_USER_SDMA,
2700 static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
2702 .pa_start = 0x4903C000,
2703 .pa_end = 0x4903C000 + SZ_1K - 1,
2704 .flags = ADDR_TYPE_RT
2709 /* l4_per -> timer7 */
2710 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2711 .master = &omap3xxx_l4_per_hwmod,
2712 .slave = &omap3xxx_timer7_hwmod,
2714 .addr = omap3xxx_timer7_addrs,
2715 .user = OCP_USER_MPU | OCP_USER_SDMA,
2718 static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
2720 .pa_start = 0x4903E000,
2721 .pa_end = 0x4903E000 + SZ_1K - 1,
2722 .flags = ADDR_TYPE_RT
2727 /* l4_per -> timer8 */
2728 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2729 .master = &omap3xxx_l4_per_hwmod,
2730 .slave = &omap3xxx_timer8_hwmod,
2732 .addr = omap3xxx_timer8_addrs,
2733 .user = OCP_USER_MPU | OCP_USER_SDMA,
2736 static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
2738 .pa_start = 0x49040000,
2739 .pa_end = 0x49040000 + SZ_1K - 1,
2740 .flags = ADDR_TYPE_RT
2745 /* l4_per -> timer9 */
2746 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2747 .master = &omap3xxx_l4_per_hwmod,
2748 .slave = &omap3xxx_timer9_hwmod,
2750 .addr = omap3xxx_timer9_addrs,
2751 .user = OCP_USER_MPU | OCP_USER_SDMA,
2754 /* l4_core -> timer10 */
2755 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2756 .master = &omap3xxx_l4_core_hwmod,
2757 .slave = &omap3xxx_timer10_hwmod,
2759 .addr = omap2_timer10_addrs,
2760 .user = OCP_USER_MPU | OCP_USER_SDMA,
2763 /* l4_core -> timer11 */
2764 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2765 .master = &omap3xxx_l4_core_hwmod,
2766 .slave = &omap3xxx_timer11_hwmod,
2768 .addr = omap2_timer11_addrs,
2769 .user = OCP_USER_MPU | OCP_USER_SDMA,
2772 static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
2774 .pa_start = 0x48304000,
2775 .pa_end = 0x48304000 + SZ_1K - 1,
2776 .flags = ADDR_TYPE_RT
2781 /* l4_core -> timer12 */
2782 static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2783 .master = &omap3xxx_l4_sec_hwmod,
2784 .slave = &omap3xxx_timer12_hwmod,
2786 .addr = omap3xxx_timer12_addrs,
2787 .user = OCP_USER_MPU | OCP_USER_SDMA,
2790 /* l4_wkup -> wd_timer2 */
2791 static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
2793 .pa_start = 0x48314000,
2794 .pa_end = 0x4831407f,
2795 .flags = ADDR_TYPE_RT
2800 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2801 .master = &omap3xxx_l4_wkup_hwmod,
2802 .slave = &omap3xxx_wd_timer2_hwmod,
2804 .addr = omap3xxx_wd_timer2_addrs,
2805 .user = OCP_USER_MPU | OCP_USER_SDMA,
2808 /* l4_core -> dss */
2809 static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
2810 .master = &omap3xxx_l4_core_hwmod,
2811 .slave = &omap3430es1_dss_core_hwmod,
2813 .addr = omap2_dss_addrs,
2816 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2817 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2818 .flags = OMAP_FIREWALL_L4,
2821 .user = OCP_USER_MPU | OCP_USER_SDMA,
2824 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
2825 .master = &omap3xxx_l4_core_hwmod,
2826 .slave = &omap3xxx_dss_core_hwmod,
2828 .addr = omap2_dss_addrs,
2831 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2832 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2833 .flags = OMAP_FIREWALL_L4,
2836 .user = OCP_USER_MPU | OCP_USER_SDMA,
2839 /* l4_core -> dss_dispc */
2840 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
2841 .master = &omap3xxx_l4_core_hwmod,
2842 .slave = &omap3xxx_dss_dispc_hwmod,
2844 .addr = omap2_dss_dispc_addrs,
2847 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2848 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2849 .flags = OMAP_FIREWALL_L4,
2852 .user = OCP_USER_MPU | OCP_USER_SDMA,
2855 static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
2857 .pa_start = 0x4804FC00,
2858 .pa_end = 0x4804FFFF,
2859 .flags = ADDR_TYPE_RT
2864 /* l4_core -> dss_dsi1 */
2865 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
2866 .master = &omap3xxx_l4_core_hwmod,
2867 .slave = &omap3xxx_dss_dsi1_hwmod,
2869 .addr = omap3xxx_dss_dsi1_addrs,
2872 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2873 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2874 .flags = OMAP_FIREWALL_L4,
2877 .user = OCP_USER_MPU | OCP_USER_SDMA,
2880 /* l4_core -> dss_rfbi */
2881 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2882 .master = &omap3xxx_l4_core_hwmod,
2883 .slave = &omap3xxx_dss_rfbi_hwmod,
2885 .addr = omap2_dss_rfbi_addrs,
2888 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2889 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2890 .flags = OMAP_FIREWALL_L4,
2893 .user = OCP_USER_MPU | OCP_USER_SDMA,
2896 /* l4_core -> dss_venc */
2897 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2898 .master = &omap3xxx_l4_core_hwmod,
2899 .slave = &omap3xxx_dss_venc_hwmod,
2901 .addr = omap2_dss_venc_addrs,
2904 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2905 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2906 .flags = OMAP_FIREWALL_L4,
2909 .flags = OCPIF_SWSUP_IDLE,
2910 .user = OCP_USER_MPU | OCP_USER_SDMA,
2913 /* l4_wkup -> gpio1 */
2914 static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
2916 .pa_start = 0x48310000,
2917 .pa_end = 0x483101ff,
2918 .flags = ADDR_TYPE_RT
2923 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2924 .master = &omap3xxx_l4_wkup_hwmod,
2925 .slave = &omap3xxx_gpio1_hwmod,
2926 .addr = omap3xxx_gpio1_addrs,
2927 .user = OCP_USER_MPU | OCP_USER_SDMA,
2930 /* l4_per -> gpio2 */
2931 static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
2933 .pa_start = 0x49050000,
2934 .pa_end = 0x490501ff,
2935 .flags = ADDR_TYPE_RT
2940 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2941 .master = &omap3xxx_l4_per_hwmod,
2942 .slave = &omap3xxx_gpio2_hwmod,
2943 .addr = omap3xxx_gpio2_addrs,
2944 .user = OCP_USER_MPU | OCP_USER_SDMA,
2947 /* l4_per -> gpio3 */
2948 static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
2950 .pa_start = 0x49052000,
2951 .pa_end = 0x490521ff,
2952 .flags = ADDR_TYPE_RT
2957 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2958 .master = &omap3xxx_l4_per_hwmod,
2959 .slave = &omap3xxx_gpio3_hwmod,
2960 .addr = omap3xxx_gpio3_addrs,
2961 .user = OCP_USER_MPU | OCP_USER_SDMA,
2966 * The memory management unit performs virtual to physical address translation
2967 * for its requestors.
2970 static struct omap_hwmod_class_sysconfig mmu_sysc = {
2974 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2975 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2976 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2977 .sysc_fields = &omap_hwmod_sysc_type1,
2980 static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = {
2987 static struct omap_mmu_dev_attr mmu_isp_dev_attr = {
2989 .da_end = 0xfffff000,
2990 .nr_tlb_entries = 8,
2993 static struct omap_hwmod omap3xxx_mmu_isp_hwmod;
2994 static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = {
2999 static struct omap_hwmod_addr_space omap3xxx_mmu_isp_addrs[] = {
3001 .pa_start = 0x480bd400,
3002 .pa_end = 0x480bd47f,
3003 .flags = ADDR_TYPE_RT,
3008 /* l4_core -> mmu isp */
3009 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = {
3010 .master = &omap3xxx_l4_core_hwmod,
3011 .slave = &omap3xxx_mmu_isp_hwmod,
3012 .addr = omap3xxx_mmu_isp_addrs,
3013 .user = OCP_USER_MPU | OCP_USER_SDMA,
3016 static struct omap_hwmod omap3xxx_mmu_isp_hwmod = {
3018 .class = &omap3xxx_mmu_hwmod_class,
3019 .mpu_irqs = omap3xxx_mmu_isp_irqs,
3020 .main_clk = "cam_ick",
3021 .dev_attr = &mmu_isp_dev_attr,
3022 .flags = HWMOD_NO_IDLEST,
3025 #ifdef CONFIG_OMAP_IOMMU_IVA2
3029 static struct omap_mmu_dev_attr mmu_iva_dev_attr = {
3030 .da_start = 0x11000000,
3031 .da_end = 0xfffff000,
3032 .nr_tlb_entries = 32,
3035 static struct omap_hwmod omap3xxx_mmu_iva_hwmod;
3036 static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = {
3041 static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = {
3042 { .name = "mmu", .rst_shift = 1, .st_shift = 9 },
3045 static struct omap_hwmod_addr_space omap3xxx_mmu_iva_addrs[] = {
3047 .pa_start = 0x5d000000,
3048 .pa_end = 0x5d00007f,
3049 .flags = ADDR_TYPE_RT,
3054 /* l3_main -> iva mmu */
3055 static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = {
3056 .master = &omap3xxx_l3_main_hwmod,
3057 .slave = &omap3xxx_mmu_iva_hwmod,
3058 .addr = omap3xxx_mmu_iva_addrs,
3059 .user = OCP_USER_MPU | OCP_USER_SDMA,
3062 static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
3064 .class = &omap3xxx_mmu_hwmod_class,
3065 .mpu_irqs = omap3xxx_mmu_iva_irqs,
3066 .rst_lines = omap3xxx_mmu_iva_resets,
3067 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets),
3068 .main_clk = "iva2_ck",
3071 .module_offs = OMAP3430_IVA2_MOD,
3074 .dev_attr = &mmu_iva_dev_attr,
3075 .flags = HWMOD_NO_IDLEST,
3080 /* l4_per -> gpio4 */
3081 static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
3083 .pa_start = 0x49054000,
3084 .pa_end = 0x490541ff,
3085 .flags = ADDR_TYPE_RT
3090 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
3091 .master = &omap3xxx_l4_per_hwmod,
3092 .slave = &omap3xxx_gpio4_hwmod,
3093 .addr = omap3xxx_gpio4_addrs,
3094 .user = OCP_USER_MPU | OCP_USER_SDMA,
3097 /* l4_per -> gpio5 */
3098 static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
3100 .pa_start = 0x49056000,
3101 .pa_end = 0x490561ff,
3102 .flags = ADDR_TYPE_RT
3107 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
3108 .master = &omap3xxx_l4_per_hwmod,
3109 .slave = &omap3xxx_gpio5_hwmod,
3110 .addr = omap3xxx_gpio5_addrs,
3111 .user = OCP_USER_MPU | OCP_USER_SDMA,
3114 /* l4_per -> gpio6 */
3115 static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
3117 .pa_start = 0x49058000,
3118 .pa_end = 0x490581ff,
3119 .flags = ADDR_TYPE_RT
3124 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
3125 .master = &omap3xxx_l4_per_hwmod,
3126 .slave = &omap3xxx_gpio6_hwmod,
3127 .addr = omap3xxx_gpio6_addrs,
3128 .user = OCP_USER_MPU | OCP_USER_SDMA,
3131 /* dma_system -> L3 */
3132 static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
3133 .master = &omap3xxx_dma_system_hwmod,
3134 .slave = &omap3xxx_l3_main_hwmod,
3135 .clk = "core_l3_ick",
3136 .user = OCP_USER_MPU | OCP_USER_SDMA,
3139 static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
3141 .pa_start = 0x48056000,
3142 .pa_end = 0x48056fff,
3143 .flags = ADDR_TYPE_RT
3148 /* l4_cfg -> dma_system */
3149 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
3150 .master = &omap3xxx_l4_core_hwmod,
3151 .slave = &omap3xxx_dma_system_hwmod,
3152 .clk = "core_l4_ick",
3153 .addr = omap3xxx_dma_system_addrs,
3154 .user = OCP_USER_MPU | OCP_USER_SDMA,
3157 static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
3160 .pa_start = 0x48074000,
3161 .pa_end = 0x480740ff,
3162 .flags = ADDR_TYPE_RT
3167 /* l4_core -> mcbsp1 */
3168 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
3169 .master = &omap3xxx_l4_core_hwmod,
3170 .slave = &omap3xxx_mcbsp1_hwmod,
3171 .clk = "mcbsp1_ick",
3172 .addr = omap3xxx_mcbsp1_addrs,
3173 .user = OCP_USER_MPU | OCP_USER_SDMA,
3176 static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
3179 .pa_start = 0x49022000,
3180 .pa_end = 0x490220ff,
3181 .flags = ADDR_TYPE_RT
3186 /* l4_per -> mcbsp2 */
3187 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
3188 .master = &omap3xxx_l4_per_hwmod,
3189 .slave = &omap3xxx_mcbsp2_hwmod,
3190 .clk = "mcbsp2_ick",
3191 .addr = omap3xxx_mcbsp2_addrs,
3192 .user = OCP_USER_MPU | OCP_USER_SDMA,
3195 static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
3198 .pa_start = 0x49024000,
3199 .pa_end = 0x490240ff,
3200 .flags = ADDR_TYPE_RT
3205 /* l4_per -> mcbsp3 */
3206 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
3207 .master = &omap3xxx_l4_per_hwmod,
3208 .slave = &omap3xxx_mcbsp3_hwmod,
3209 .clk = "mcbsp3_ick",
3210 .addr = omap3xxx_mcbsp3_addrs,
3211 .user = OCP_USER_MPU | OCP_USER_SDMA,
3214 static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
3217 .pa_start = 0x49026000,
3218 .pa_end = 0x490260ff,
3219 .flags = ADDR_TYPE_RT
3224 /* l4_per -> mcbsp4 */
3225 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
3226 .master = &omap3xxx_l4_per_hwmod,
3227 .slave = &omap3xxx_mcbsp4_hwmod,
3228 .clk = "mcbsp4_ick",
3229 .addr = omap3xxx_mcbsp4_addrs,
3230 .user = OCP_USER_MPU | OCP_USER_SDMA,
3233 static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
3236 .pa_start = 0x48096000,
3237 .pa_end = 0x480960ff,
3238 .flags = ADDR_TYPE_RT
3243 /* l4_core -> mcbsp5 */
3244 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
3245 .master = &omap3xxx_l4_core_hwmod,
3246 .slave = &omap3xxx_mcbsp5_hwmod,
3247 .clk = "mcbsp5_ick",
3248 .addr = omap3xxx_mcbsp5_addrs,
3249 .user = OCP_USER_MPU | OCP_USER_SDMA,
3252 static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
3255 .pa_start = 0x49028000,
3256 .pa_end = 0x490280ff,
3257 .flags = ADDR_TYPE_RT
3262 /* l4_per -> mcbsp2_sidetone */
3263 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
3264 .master = &omap3xxx_l4_per_hwmod,
3265 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
3266 .clk = "mcbsp2_ick",
3267 .addr = omap3xxx_mcbsp2_sidetone_addrs,
3268 .user = OCP_USER_MPU,
3271 static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
3274 .pa_start = 0x4902A000,
3275 .pa_end = 0x4902A0ff,
3276 .flags = ADDR_TYPE_RT
3281 /* l4_per -> mcbsp3_sidetone */
3282 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
3283 .master = &omap3xxx_l4_per_hwmod,
3284 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
3285 .clk = "mcbsp3_ick",
3286 .addr = omap3xxx_mcbsp3_sidetone_addrs,
3287 .user = OCP_USER_MPU,
3290 static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
3292 .pa_start = 0x48094000,
3293 .pa_end = 0x480941ff,
3294 .flags = ADDR_TYPE_RT,
3299 /* l4_core -> mailbox */
3300 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
3301 .master = &omap3xxx_l4_core_hwmod,
3302 .slave = &omap3xxx_mailbox_hwmod,
3303 .addr = omap3xxx_mailbox_addrs,
3304 .user = OCP_USER_MPU | OCP_USER_SDMA,
3307 /* l4 core -> mcspi1 interface */
3308 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
3309 .master = &omap3xxx_l4_core_hwmod,
3310 .slave = &omap34xx_mcspi1,
3311 .clk = "mcspi1_ick",
3312 .addr = omap2_mcspi1_addr_space,
3313 .user = OCP_USER_MPU | OCP_USER_SDMA,
3316 /* l4 core -> mcspi2 interface */
3317 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
3318 .master = &omap3xxx_l4_core_hwmod,
3319 .slave = &omap34xx_mcspi2,
3320 .clk = "mcspi2_ick",
3321 .addr = omap2_mcspi2_addr_space,
3322 .user = OCP_USER_MPU | OCP_USER_SDMA,
3325 /* l4 core -> mcspi3 interface */
3326 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
3327 .master = &omap3xxx_l4_core_hwmod,
3328 .slave = &omap34xx_mcspi3,
3329 .clk = "mcspi3_ick",
3330 .addr = omap2430_mcspi3_addr_space,
3331 .user = OCP_USER_MPU | OCP_USER_SDMA,
3334 /* l4 core -> mcspi4 interface */
3335 static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
3337 .pa_start = 0x480ba000,
3338 .pa_end = 0x480ba0ff,
3339 .flags = ADDR_TYPE_RT,
3344 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
3345 .master = &omap3xxx_l4_core_hwmod,
3346 .slave = &omap34xx_mcspi4,
3347 .clk = "mcspi4_ick",
3348 .addr = omap34xx_mcspi4_addr_space,
3349 .user = OCP_USER_MPU | OCP_USER_SDMA,
3352 static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
3353 .master = &omap3xxx_usb_host_hs_hwmod,
3354 .slave = &omap3xxx_l3_main_hwmod,
3355 .clk = "core_l3_ick",
3356 .user = OCP_USER_MPU,
3359 static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
3362 .pa_start = 0x48064000,
3363 .pa_end = 0x480643ff,
3364 .flags = ADDR_TYPE_RT
3368 .pa_start = 0x48064400,
3369 .pa_end = 0x480647ff,
3373 .pa_start = 0x48064800,
3374 .pa_end = 0x48064cff,
3379 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
3380 .master = &omap3xxx_l4_core_hwmod,
3381 .slave = &omap3xxx_usb_host_hs_hwmod,
3382 .clk = "usbhost_ick",
3383 .addr = omap3xxx_usb_host_hs_addrs,
3384 .user = OCP_USER_MPU | OCP_USER_SDMA,
3387 static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
3390 .pa_start = 0x48062000,
3391 .pa_end = 0x48062fff,
3392 .flags = ADDR_TYPE_RT
3397 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
3398 .master = &omap3xxx_l4_core_hwmod,
3399 .slave = &omap3xxx_usb_tll_hs_hwmod,
3400 .clk = "usbtll_ick",
3401 .addr = omap3xxx_usb_tll_hs_addrs,
3402 .user = OCP_USER_MPU | OCP_USER_SDMA,
3405 /* l4_core -> hdq1w interface */
3406 static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
3407 .master = &omap3xxx_l4_core_hwmod,
3408 .slave = &omap3xxx_hdq1w_hwmod,
3410 .addr = omap2_hdq1w_addr_space,
3411 .user = OCP_USER_MPU | OCP_USER_SDMA,
3412 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
3415 /* l4_wkup -> 32ksync_counter */
3416 static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
3418 .pa_start = 0x48320000,
3419 .pa_end = 0x4832001f,
3420 .flags = ADDR_TYPE_RT
3425 static struct omap_hwmod_addr_space omap3xxx_gpmc_addrs[] = {
3427 .pa_start = 0x6e000000,
3428 .pa_end = 0x6e000fff,
3429 .flags = ADDR_TYPE_RT
3434 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
3435 .master = &omap3xxx_l4_wkup_hwmod,
3436 .slave = &omap3xxx_counter_32k_hwmod,
3437 .clk = "omap_32ksync_ick",
3438 .addr = omap3xxx_counter_32k_addrs,
3439 .user = OCP_USER_MPU | OCP_USER_SDMA,
3442 /* am35xx has Davinci MDIO & EMAC */
3443 static struct omap_hwmod_class am35xx_mdio_class = {
3444 .name = "davinci_mdio",
3447 static struct omap_hwmod am35xx_mdio_hwmod = {
3448 .name = "davinci_mdio",
3449 .class = &am35xx_mdio_class,
3450 .flags = HWMOD_NO_IDLEST,
3454 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
3455 * but this will probably require some additional hwmod core support,
3456 * so is left as a future to-do item.
3458 static struct omap_hwmod_ocp_if am35xx_mdio__l3 = {
3459 .master = &am35xx_mdio_hwmod,
3460 .slave = &omap3xxx_l3_main_hwmod,
3462 .user = OCP_USER_MPU,
3465 static struct omap_hwmod_addr_space am35xx_mdio_addrs[] = {
3467 .pa_start = AM35XX_IPSS_MDIO_BASE,
3468 .pa_end = AM35XX_IPSS_MDIO_BASE + SZ_4K - 1,
3469 .flags = ADDR_TYPE_RT,
3474 /* l4_core -> davinci mdio */
3476 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
3477 * but this will probably require some additional hwmod core support,
3478 * so is left as a future to-do item.
3480 static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
3481 .master = &omap3xxx_l4_core_hwmod,
3482 .slave = &am35xx_mdio_hwmod,
3484 .addr = am35xx_mdio_addrs,
3485 .user = OCP_USER_MPU,
3488 static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = {
3489 { .name = "rxthresh", .irq = 67 + OMAP_INTC_START, },
3490 { .name = "rx_pulse", .irq = 68 + OMAP_INTC_START, },
3491 { .name = "tx_pulse", .irq = 69 + OMAP_INTC_START },
3492 { .name = "misc_pulse", .irq = 70 + OMAP_INTC_START },
3496 static struct omap_hwmod_class am35xx_emac_class = {
3497 .name = "davinci_emac",
3500 static struct omap_hwmod am35xx_emac_hwmod = {
3501 .name = "davinci_emac",
3502 .mpu_irqs = am35xx_emac_mpu_irqs,
3503 .class = &am35xx_emac_class,
3504 .flags = HWMOD_NO_IDLEST,
3507 /* l3_core -> davinci emac interface */
3509 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
3510 * but this will probably require some additional hwmod core support,
3511 * so is left as a future to-do item.
3513 static struct omap_hwmod_ocp_if am35xx_emac__l3 = {
3514 .master = &am35xx_emac_hwmod,
3515 .slave = &omap3xxx_l3_main_hwmod,
3517 .user = OCP_USER_MPU,
3520 static struct omap_hwmod_addr_space am35xx_emac_addrs[] = {
3522 .pa_start = AM35XX_IPSS_EMAC_BASE,
3523 .pa_end = AM35XX_IPSS_EMAC_BASE + 0x30000 - 1,
3524 .flags = ADDR_TYPE_RT,
3529 /* l4_core -> davinci emac */
3531 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
3532 * but this will probably require some additional hwmod core support,
3533 * so is left as a future to-do item.
3535 static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
3536 .master = &omap3xxx_l4_core_hwmod,
3537 .slave = &am35xx_emac_hwmod,
3539 .addr = am35xx_emac_addrs,
3540 .user = OCP_USER_MPU,
3543 static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
3544 .master = &omap3xxx_l3_main_hwmod,
3545 .slave = &omap3xxx_gpmc_hwmod,
3546 .clk = "core_l3_ick",
3547 .addr = omap3xxx_gpmc_addrs,
3548 .user = OCP_USER_MPU | OCP_USER_SDMA,
3551 static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3552 &omap3xxx_l3_main__l4_core,
3553 &omap3xxx_l3_main__l4_per,
3554 &omap3xxx_mpu__l3_main,
3555 &omap3xxx_l3_main__l4_debugss,
3556 &omap3xxx_l4_core__l4_wkup,
3557 &omap3xxx_l4_core__mmc3,
3558 &omap3_l4_core__uart1,
3559 &omap3_l4_core__uart2,
3560 &omap3_l4_per__uart3,
3561 &omap3_l4_core__i2c1,
3562 &omap3_l4_core__i2c2,
3563 &omap3_l4_core__i2c3,
3564 &omap3xxx_l4_wkup__l4_sec,
3565 &omap3xxx_l4_wkup__timer1,
3566 &omap3xxx_l4_per__timer2,
3567 &omap3xxx_l4_per__timer3,
3568 &omap3xxx_l4_per__timer4,
3569 &omap3xxx_l4_per__timer5,
3570 &omap3xxx_l4_per__timer6,
3571 &omap3xxx_l4_per__timer7,
3572 &omap3xxx_l4_per__timer8,
3573 &omap3xxx_l4_per__timer9,
3574 &omap3xxx_l4_core__timer10,
3575 &omap3xxx_l4_core__timer11,
3576 &omap3xxx_l4_wkup__wd_timer2,
3577 &omap3xxx_l4_wkup__gpio1,
3578 &omap3xxx_l4_per__gpio2,
3579 &omap3xxx_l4_per__gpio3,
3580 &omap3xxx_l4_per__gpio4,
3581 &omap3xxx_l4_per__gpio5,
3582 &omap3xxx_l4_per__gpio6,
3583 &omap3xxx_dma_system__l3,
3584 &omap3xxx_l4_core__dma_system,
3585 &omap3xxx_l4_core__mcbsp1,
3586 &omap3xxx_l4_per__mcbsp2,
3587 &omap3xxx_l4_per__mcbsp3,
3588 &omap3xxx_l4_per__mcbsp4,
3589 &omap3xxx_l4_core__mcbsp5,
3590 &omap3xxx_l4_per__mcbsp2_sidetone,
3591 &omap3xxx_l4_per__mcbsp3_sidetone,
3592 &omap34xx_l4_core__mcspi1,
3593 &omap34xx_l4_core__mcspi2,
3594 &omap34xx_l4_core__mcspi3,
3595 &omap34xx_l4_core__mcspi4,
3596 &omap3xxx_l4_wkup__counter_32k,
3597 &omap3xxx_l3_main__gpmc,
3601 /* GP-only hwmod links */
3602 static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
3603 &omap3xxx_l4_sec__timer12,
3607 /* 3430ES1-only hwmod links */
3608 static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
3609 &omap3430es1_dss__l3,
3610 &omap3430es1_l4_core__dss,
3614 /* 3430ES2+-only hwmod links */
3615 static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
3617 &omap3xxx_l4_core__dss,
3618 &omap3xxx_usbhsotg__l3,
3619 &omap3xxx_l4_core__usbhsotg,
3620 &omap3xxx_usb_host_hs__l3_main_2,
3621 &omap3xxx_l4_core__usb_host_hs,
3622 &omap3xxx_l4_core__usb_tll_hs,
3626 /* <= 3430ES3-only hwmod links */
3627 static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
3628 &omap3xxx_l4_core__pre_es3_mmc1,
3629 &omap3xxx_l4_core__pre_es3_mmc2,
3633 /* 3430ES3+-only hwmod links */
3634 static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
3635 &omap3xxx_l4_core__es3plus_mmc1,
3636 &omap3xxx_l4_core__es3plus_mmc2,
3640 /* 34xx-only hwmod links (all ES revisions) */
3641 static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3643 &omap34xx_l4_core__sr1,
3644 &omap34xx_l4_core__sr2,
3645 &omap3xxx_l4_core__mailbox,
3646 &omap3xxx_l4_core__hdq1w,
3647 &omap3xxx_sad2d__l3,
3648 &omap3xxx_l4_core__mmu_isp,
3649 #ifdef CONFIG_OMAP_IOMMU_IVA2
3650 &omap3xxx_l3_main__mmu_iva,
3655 /* 36xx-only hwmod links (all ES revisions) */
3656 static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3658 &omap36xx_l4_per__uart4,
3660 &omap3xxx_l4_core__dss,
3661 &omap36xx_l4_core__sr1,
3662 &omap36xx_l4_core__sr2,
3663 &omap3xxx_usbhsotg__l3,
3664 &omap3xxx_l4_core__usbhsotg,
3665 &omap3xxx_l4_core__mailbox,
3666 &omap3xxx_usb_host_hs__l3_main_2,
3667 &omap3xxx_l4_core__usb_host_hs,
3668 &omap3xxx_l4_core__usb_tll_hs,
3669 &omap3xxx_l4_core__es3plus_mmc1,
3670 &omap3xxx_l4_core__es3plus_mmc2,
3671 &omap3xxx_l4_core__hdq1w,
3672 &omap3xxx_sad2d__l3,
3673 &omap3xxx_l4_core__mmu_isp,
3674 #ifdef CONFIG_OMAP_IOMMU_IVA2
3675 &omap3xxx_l3_main__mmu_iva,
3680 static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
3682 &omap3xxx_l4_core__dss,
3683 &am35xx_usbhsotg__l3,
3684 &am35xx_l4_core__usbhsotg,
3685 &am35xx_l4_core__uart4,
3686 &omap3xxx_usb_host_hs__l3_main_2,
3687 &omap3xxx_l4_core__usb_host_hs,
3688 &omap3xxx_l4_core__usb_tll_hs,
3689 &omap3xxx_l4_core__es3plus_mmc1,
3690 &omap3xxx_l4_core__es3plus_mmc2,
3691 &omap3xxx_l4_core__hdq1w,
3693 &am35xx_l4_core__mdio,
3695 &am35xx_l4_core__emac,
3699 static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
3700 &omap3xxx_l4_core__dss_dispc,
3701 &omap3xxx_l4_core__dss_dsi1,
3702 &omap3xxx_l4_core__dss_rfbi,
3703 &omap3xxx_l4_core__dss_venc,
3707 int __init omap3xxx_hwmod_init(void)
3710 struct omap_hwmod_ocp_if **h = NULL;
3715 /* Register hwmod links common to all OMAP3 */
3716 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
3720 /* Register GP-only hwmod links. */
3721 if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
3722 r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs);
3730 * Register hwmod links common to individual OMAP3 families, all
3731 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3732 * All possible revisions should be included in this conditional.
3734 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3735 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3736 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
3737 h = omap34xx_hwmod_ocp_ifs;
3738 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
3739 h = am35xx_hwmod_ocp_ifs;
3740 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3741 rev == OMAP3630_REV_ES1_2) {
3742 h = omap36xx_hwmod_ocp_ifs;
3744 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3748 r = omap_hwmod_register_links(h);
3753 * Register hwmod links specific to certain ES levels of a
3754 * particular family of silicon (e.g., 34xx ES1.0)
3757 if (rev == OMAP3430_REV_ES1_0) {
3758 h = omap3430es1_hwmod_ocp_ifs;
3759 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3760 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3761 rev == OMAP3430_REV_ES3_1_2) {
3762 h = omap3430es2plus_hwmod_ocp_ifs;
3766 r = omap_hwmod_register_links(h);
3772 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3773 rev == OMAP3430_REV_ES2_1) {
3774 h = omap3430_pre_es3_hwmod_ocp_ifs;
3775 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3776 rev == OMAP3430_REV_ES3_1_2) {
3777 h = omap3430_es3plus_hwmod_ocp_ifs;
3781 r = omap_hwmod_register_links(h);
3786 * DSS code presumes that dss_core hwmod is handled first,
3787 * _before_ any other DSS related hwmods so register common
3788 * DSS hwmod links last to ensure that dss_core is already
3789 * registered. Otherwise some change things may happen, for
3790 * ex. if dispc is handled before dss_core and DSS is enabled
3791 * in bootloader DISPC will be reset with outputs enabled
3792 * which sometimes leads to unrecoverable L3 error. XXX The
3793 * long-term fix to this is to ensure hwmods are set up in
3794 * dependency order in the hwmod core code.
3796 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);