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>
21 #include <linux/platform_data/hsmmc-omap.h>
23 #include <linux/omap-dma.h>
26 #include <linux/platform_data/asoc-ti-mcbsp.h>
27 #include <linux/platform_data/spi-omap2-mcspi.h>
28 #include <plat/dmtimer.h>
31 #include "omap_hwmod.h"
32 #include "omap_hwmod_common_data.h"
33 #include "prm-regbits-34xx.h"
34 #include "cm-regbits-34xx.h"
41 * OMAP3xxx hardware module integration data
43 * All of the data in this section should be autogeneratable from the
44 * TI hardware database or other technical documentation. Data that
45 * is driver-specific or driver-kernel integration-specific belongs
49 #define AM35XX_IPSS_USBOTGSS_BASE 0x5C040000
57 static struct omap_hwmod omap3xxx_l3_main_hwmod = {
59 .class = &l3_hwmod_class,
60 .flags = HWMOD_NO_IDLEST,
64 static struct omap_hwmod omap3xxx_l4_core_hwmod = {
66 .class = &l4_hwmod_class,
67 .flags = HWMOD_NO_IDLEST,
71 static struct omap_hwmod omap3xxx_l4_per_hwmod = {
73 .class = &l4_hwmod_class,
74 .flags = HWMOD_NO_IDLEST,
78 static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
80 .class = &l4_hwmod_class,
81 .flags = HWMOD_NO_IDLEST,
85 static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
87 .class = &l4_hwmod_class,
88 .flags = HWMOD_NO_IDLEST,
93 static struct omap_hwmod omap3xxx_mpu_hwmod = {
95 .class = &mpu_hwmod_class,
96 .main_clk = "arm_fck",
100 static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
101 { .name = "logic", .rst_shift = 0, .st_shift = 8 },
102 { .name = "seq0", .rst_shift = 1, .st_shift = 9 },
103 { .name = "seq1", .rst_shift = 2, .st_shift = 10 },
106 static struct omap_hwmod omap3xxx_iva_hwmod = {
108 .class = &iva_hwmod_class,
109 .clkdm_name = "iva2_clkdm",
110 .rst_lines = omap3xxx_iva_resets,
111 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
112 .main_clk = "iva2_ck",
115 .module_offs = OMAP3430_IVA2_MOD,
117 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
124 * debug and emulation sub system
127 static struct omap_hwmod_class omap3xxx_debugss_hwmod_class = {
132 static struct omap_hwmod omap3xxx_debugss_hwmod = {
134 .class = &omap3xxx_debugss_hwmod_class,
135 .clkdm_name = "emu_clkdm",
136 .main_clk = "emu_src_ck",
137 .flags = HWMOD_NO_IDLEST,
141 static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
145 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
146 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
147 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
148 SYSS_HAS_RESET_STATUS),
149 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
150 .sysc_fields = &omap_hwmod_sysc_type1,
153 static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
155 .sysc = &omap3xxx_timer_sysc,
158 /* secure timers dev attribute */
159 static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
160 .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
163 /* always-on timers dev attribute */
164 static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
165 .timer_capability = OMAP_TIMER_ALWON,
168 /* pwm timers dev attribute */
169 static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
170 .timer_capability = OMAP_TIMER_HAS_PWM,
173 /* timers with DSP interrupt dev attribute */
174 static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
175 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
178 /* pwm timers with DSP interrupt dev attribute */
179 static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = {
180 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM,
184 static struct omap_hwmod omap3xxx_timer1_hwmod = {
186 .main_clk = "gpt1_fck",
189 .module_offs = WKUP_MOD,
191 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
194 .dev_attr = &capability_alwon_dev_attr,
195 .class = &omap3xxx_timer_hwmod_class,
196 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
200 static struct omap_hwmod omap3xxx_timer2_hwmod = {
202 .main_clk = "gpt2_fck",
205 .module_offs = OMAP3430_PER_MOD,
207 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
210 .class = &omap3xxx_timer_hwmod_class,
211 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
215 static struct omap_hwmod omap3xxx_timer3_hwmod = {
217 .main_clk = "gpt3_fck",
220 .module_offs = OMAP3430_PER_MOD,
222 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
225 .class = &omap3xxx_timer_hwmod_class,
226 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
230 static struct omap_hwmod omap3xxx_timer4_hwmod = {
232 .main_clk = "gpt4_fck",
235 .module_offs = OMAP3430_PER_MOD,
237 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
240 .class = &omap3xxx_timer_hwmod_class,
241 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
245 static struct omap_hwmod omap3xxx_timer5_hwmod = {
247 .main_clk = "gpt5_fck",
250 .module_offs = OMAP3430_PER_MOD,
252 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
255 .dev_attr = &capability_dsp_dev_attr,
256 .class = &omap3xxx_timer_hwmod_class,
257 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
261 static struct omap_hwmod omap3xxx_timer6_hwmod = {
263 .main_clk = "gpt6_fck",
266 .module_offs = OMAP3430_PER_MOD,
268 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
271 .dev_attr = &capability_dsp_dev_attr,
272 .class = &omap3xxx_timer_hwmod_class,
273 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
277 static struct omap_hwmod omap3xxx_timer7_hwmod = {
279 .main_clk = "gpt7_fck",
282 .module_offs = OMAP3430_PER_MOD,
284 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
287 .dev_attr = &capability_dsp_dev_attr,
288 .class = &omap3xxx_timer_hwmod_class,
289 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
293 static struct omap_hwmod omap3xxx_timer8_hwmod = {
295 .main_clk = "gpt8_fck",
298 .module_offs = OMAP3430_PER_MOD,
300 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
303 .dev_attr = &capability_dsp_pwm_dev_attr,
304 .class = &omap3xxx_timer_hwmod_class,
305 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
309 static struct omap_hwmod omap3xxx_timer9_hwmod = {
311 .main_clk = "gpt9_fck",
314 .module_offs = OMAP3430_PER_MOD,
316 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
319 .dev_attr = &capability_pwm_dev_attr,
320 .class = &omap3xxx_timer_hwmod_class,
321 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
325 static struct omap_hwmod omap3xxx_timer10_hwmod = {
327 .main_clk = "gpt10_fck",
330 .module_offs = CORE_MOD,
332 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
335 .dev_attr = &capability_pwm_dev_attr,
336 .class = &omap3xxx_timer_hwmod_class,
337 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
341 static struct omap_hwmod omap3xxx_timer11_hwmod = {
343 .main_clk = "gpt11_fck",
346 .module_offs = CORE_MOD,
348 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
351 .dev_attr = &capability_pwm_dev_attr,
352 .class = &omap3xxx_timer_hwmod_class,
353 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
358 static struct omap_hwmod omap3xxx_timer12_hwmod = {
360 .main_clk = "gpt12_fck",
363 .module_offs = WKUP_MOD,
365 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
368 .dev_attr = &capability_secure_dev_attr,
369 .class = &omap3xxx_timer_hwmod_class,
370 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
375 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
379 static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
383 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
384 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
385 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
386 SYSS_HAS_RESET_STATUS),
387 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
388 .sysc_fields = &omap_hwmod_sysc_type1,
392 static struct omap_hwmod_class_sysconfig i2c_sysc = {
396 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
397 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
398 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
399 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
400 .sysc_fields = &omap_hwmod_sysc_type1,
403 static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
405 .sysc = &omap3xxx_wd_timer_sysc,
406 .pre_shutdown = &omap2_wd_timer_disable,
407 .reset = &omap2_wd_timer_reset,
410 static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
412 .class = &omap3xxx_wd_timer_hwmod_class,
413 .main_clk = "wdt2_fck",
416 .module_offs = WKUP_MOD,
418 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
422 * XXX: Use software supervised mode, HW supervised smartidle seems to
423 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
425 .flags = HWMOD_SWSUP_SIDLE,
429 static struct omap_hwmod omap3xxx_uart1_hwmod = {
431 .main_clk = "uart1_fck",
432 .flags = DEBUG_TI81XXUART1_FLAGS | HWMOD_SWSUP_SIDLE,
435 .module_offs = CORE_MOD,
437 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
440 .class = &omap2_uart_class,
444 static struct omap_hwmod omap3xxx_uart2_hwmod = {
446 .main_clk = "uart2_fck",
447 .flags = DEBUG_TI81XXUART2_FLAGS | HWMOD_SWSUP_SIDLE,
450 .module_offs = CORE_MOD,
452 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
455 .class = &omap2_uart_class,
459 static struct omap_hwmod omap3xxx_uart3_hwmod = {
461 .main_clk = "uart3_fck",
462 .flags = DEBUG_OMAP3UART3_FLAGS | DEBUG_TI81XXUART3_FLAGS |
466 .module_offs = OMAP3430_PER_MOD,
468 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
471 .class = &omap2_uart_class,
477 static struct omap_hwmod omap36xx_uart4_hwmod = {
479 .main_clk = "uart4_fck",
480 .flags = DEBUG_OMAP3UART4_FLAGS | HWMOD_SWSUP_SIDLE,
483 .module_offs = OMAP3430_PER_MOD,
485 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
488 .class = &omap2_uart_class,
494 * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
495 * uart2_fck being enabled. So we add uart1_fck as an optional clock,
496 * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
497 * should not be needed. The functional clock structure of the AM35xx
498 * UART4 is extremely unclear and opaque; it is unclear what the role
499 * of uart1/2_fck is for the UART4. Any clarification from either
500 * empirical testing or the AM3505/3517 hardware designers would be
503 static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks[] = {
504 { .role = "softreset_uart1_fck", .clk = "uart1_fck" },
507 static struct omap_hwmod am35xx_uart4_hwmod = {
509 .main_clk = "uart4_fck",
512 .module_offs = CORE_MOD,
514 .idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
517 .opt_clks = am35xx_uart4_opt_clks,
518 .opt_clks_cnt = ARRAY_SIZE(am35xx_uart4_opt_clks),
519 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
520 .class = &omap2_uart_class,
523 static struct omap_hwmod_class i2c_class = {
526 .rev = OMAP_I2C_IP_VERSION_1,
527 .reset = &omap_i2c_reset,
531 static struct omap_hwmod_opt_clk dss_opt_clks[] = {
533 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
534 * driver does not use these clocks.
536 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
537 { .role = "tv_clk", .clk = "dss_tv_fck" },
538 /* required only on OMAP3430 */
539 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
542 static struct omap_hwmod omap3430es1_dss_core_hwmod = {
544 .class = &omap2_dss_hwmod_class,
545 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
548 .module_offs = OMAP3430_DSS_MOD,
552 .opt_clks = dss_opt_clks,
553 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
554 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
557 static struct omap_hwmod omap3xxx_dss_core_hwmod = {
559 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
560 .class = &omap2_dss_hwmod_class,
561 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
564 .module_offs = OMAP3430_DSS_MOD,
566 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
569 .opt_clks = dss_opt_clks,
570 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
578 static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
582 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
583 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
585 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
586 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
587 .sysc_fields = &omap_hwmod_sysc_type1,
590 static struct omap_hwmod_class omap3_dispc_hwmod_class = {
592 .sysc = &omap3_dispc_sysc,
595 static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
597 .class = &omap3_dispc_hwmod_class,
598 .main_clk = "dss1_alwon_fck",
601 .module_offs = OMAP3430_DSS_MOD,
604 .flags = HWMOD_NO_IDLEST,
605 .dev_attr = &omap2_3_dss_dispc_dev_attr,
610 * display serial interface controller
613 static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc = {
617 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
618 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
619 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
620 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
621 .sysc_fields = &omap_hwmod_sysc_type1,
624 static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
626 .sysc = &omap3xxx_dsi_sysc,
630 static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
631 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
634 static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
636 .class = &omap3xxx_dsi_hwmod_class,
637 .main_clk = "dss1_alwon_fck",
640 .module_offs = OMAP3430_DSS_MOD,
643 .opt_clks = dss_dsi1_opt_clks,
644 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
645 .flags = HWMOD_NO_IDLEST,
648 static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
649 { .role = "ick", .clk = "dss_ick" },
652 static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
654 .class = &omap2_rfbi_hwmod_class,
655 .main_clk = "dss1_alwon_fck",
658 .module_offs = OMAP3430_DSS_MOD,
661 .opt_clks = dss_rfbi_opt_clks,
662 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
663 .flags = HWMOD_NO_IDLEST,
666 static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
667 /* required only on OMAP3430 */
668 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
671 static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
673 .class = &omap2_venc_hwmod_class,
674 .main_clk = "dss_tv_fck",
677 .module_offs = OMAP3430_DSS_MOD,
680 .opt_clks = dss_venc_opt_clks,
681 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
682 .flags = HWMOD_NO_IDLEST,
686 static struct omap_i2c_dev_attr i2c1_dev_attr = {
687 .fifo_depth = 8, /* bytes */
688 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
691 static struct omap_hwmod omap3xxx_i2c1_hwmod = {
693 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
694 .main_clk = "i2c1_fck",
697 .module_offs = CORE_MOD,
699 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
703 .dev_attr = &i2c1_dev_attr,
707 static struct omap_i2c_dev_attr i2c2_dev_attr = {
708 .fifo_depth = 8, /* bytes */
709 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
712 static struct omap_hwmod omap3xxx_i2c2_hwmod = {
714 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
715 .main_clk = "i2c2_fck",
718 .module_offs = CORE_MOD,
720 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
724 .dev_attr = &i2c2_dev_attr,
728 static struct omap_i2c_dev_attr i2c3_dev_attr = {
729 .fifo_depth = 64, /* bytes */
730 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
735 static struct omap_hwmod omap3xxx_i2c3_hwmod = {
737 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
738 .main_clk = "i2c3_fck",
741 .module_offs = CORE_MOD,
743 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
747 .dev_attr = &i2c3_dev_attr,
752 * general purpose io module
755 static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
759 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
760 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
761 SYSS_HAS_RESET_STATUS),
762 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
763 .sysc_fields = &omap_hwmod_sysc_type1,
766 static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
768 .sysc = &omap3xxx_gpio_sysc,
773 static struct omap_gpio_dev_attr gpio_dev_attr = {
779 static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
780 { .role = "dbclk", .clk = "gpio1_dbck", },
783 static struct omap_hwmod omap3xxx_gpio1_hwmod = {
785 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
786 .main_clk = "gpio1_ick",
787 .opt_clks = gpio1_opt_clks,
788 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
791 .module_offs = WKUP_MOD,
793 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
796 .class = &omap3xxx_gpio_hwmod_class,
797 .dev_attr = &gpio_dev_attr,
801 static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
802 { .role = "dbclk", .clk = "gpio2_dbck", },
805 static struct omap_hwmod omap3xxx_gpio2_hwmod = {
807 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
808 .main_clk = "gpio2_ick",
809 .opt_clks = gpio2_opt_clks,
810 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
813 .module_offs = OMAP3430_PER_MOD,
815 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
818 .class = &omap3xxx_gpio_hwmod_class,
819 .dev_attr = &gpio_dev_attr,
823 static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
824 { .role = "dbclk", .clk = "gpio3_dbck", },
827 static struct omap_hwmod omap3xxx_gpio3_hwmod = {
829 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
830 .main_clk = "gpio3_ick",
831 .opt_clks = gpio3_opt_clks,
832 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
835 .module_offs = OMAP3430_PER_MOD,
837 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
840 .class = &omap3xxx_gpio_hwmod_class,
841 .dev_attr = &gpio_dev_attr,
845 static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
846 { .role = "dbclk", .clk = "gpio4_dbck", },
849 static struct omap_hwmod omap3xxx_gpio4_hwmod = {
851 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
852 .main_clk = "gpio4_ick",
853 .opt_clks = gpio4_opt_clks,
854 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
857 .module_offs = OMAP3430_PER_MOD,
859 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
862 .class = &omap3xxx_gpio_hwmod_class,
863 .dev_attr = &gpio_dev_attr,
868 static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
869 { .role = "dbclk", .clk = "gpio5_dbck", },
872 static struct omap_hwmod omap3xxx_gpio5_hwmod = {
874 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
875 .main_clk = "gpio5_ick",
876 .opt_clks = gpio5_opt_clks,
877 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
880 .module_offs = OMAP3430_PER_MOD,
882 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
885 .class = &omap3xxx_gpio_hwmod_class,
886 .dev_attr = &gpio_dev_attr,
891 static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
892 { .role = "dbclk", .clk = "gpio6_dbck", },
895 static struct omap_hwmod omap3xxx_gpio6_hwmod = {
897 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
898 .main_clk = "gpio6_ick",
899 .opt_clks = gpio6_opt_clks,
900 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
903 .module_offs = OMAP3430_PER_MOD,
905 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
908 .class = &omap3xxx_gpio_hwmod_class,
909 .dev_attr = &gpio_dev_attr,
913 static struct omap_dma_dev_attr dma_dev_attr = {
914 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
915 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
919 static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
923 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
924 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
925 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
926 SYSS_HAS_RESET_STATUS),
927 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
928 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
929 .sysc_fields = &omap_hwmod_sysc_type1,
932 static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
934 .sysc = &omap3xxx_dma_sysc,
938 static struct omap_hwmod omap3xxx_dma_system_hwmod = {
940 .class = &omap3xxx_dma_hwmod_class,
941 .main_clk = "core_l3_ick",
944 .module_offs = CORE_MOD,
946 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
949 .dev_attr = &dma_dev_attr,
950 .flags = HWMOD_NO_IDLEST,
955 * multi channel buffered serial port controller
958 static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
960 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
961 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
962 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
963 .sysc_fields = &omap_hwmod_sysc_type1,
966 static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
968 .sysc = &omap3xxx_mcbsp_sysc,
969 .rev = MCBSP_CONFIG_TYPE3,
972 /* McBSP functional clock mapping */
973 static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = {
974 { .role = "pad_fck", .clk = "mcbsp_clks" },
975 { .role = "prcm_fck", .clk = "core_96m_fck" },
978 static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
979 { .role = "pad_fck", .clk = "mcbsp_clks" },
980 { .role = "prcm_fck", .clk = "per_96m_fck" },
985 static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
987 .class = &omap3xxx_mcbsp_hwmod_class,
988 .main_clk = "mcbsp1_fck",
991 .module_offs = CORE_MOD,
993 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
996 .opt_clks = mcbsp15_opt_clks,
997 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
1002 static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
1003 .sidetone = "mcbsp2_sidetone",
1006 static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1008 .class = &omap3xxx_mcbsp_hwmod_class,
1009 .main_clk = "mcbsp2_fck",
1012 .module_offs = OMAP3430_PER_MOD,
1014 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1017 .opt_clks = mcbsp234_opt_clks,
1018 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
1019 .dev_attr = &omap34xx_mcbsp2_dev_attr,
1024 static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
1025 .sidetone = "mcbsp3_sidetone",
1028 static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1030 .class = &omap3xxx_mcbsp_hwmod_class,
1031 .main_clk = "mcbsp3_fck",
1034 .module_offs = OMAP3430_PER_MOD,
1036 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1039 .opt_clks = mcbsp234_opt_clks,
1040 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
1041 .dev_attr = &omap34xx_mcbsp3_dev_attr,
1047 static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1049 .class = &omap3xxx_mcbsp_hwmod_class,
1050 .main_clk = "mcbsp4_fck",
1053 .module_offs = OMAP3430_PER_MOD,
1055 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
1058 .opt_clks = mcbsp234_opt_clks,
1059 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
1065 static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
1067 .class = &omap3xxx_mcbsp_hwmod_class,
1068 .main_clk = "mcbsp5_fck",
1071 .module_offs = CORE_MOD,
1073 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
1076 .opt_clks = mcbsp15_opt_clks,
1077 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
1080 /* 'mcbsp sidetone' class */
1081 static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
1082 .sysc_offs = 0x0010,
1083 .sysc_flags = SYSC_HAS_AUTOIDLE,
1084 .sysc_fields = &omap_hwmod_sysc_type1,
1087 static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1088 .name = "mcbsp_sidetone",
1089 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
1092 /* mcbsp2_sidetone */
1094 static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1095 .name = "mcbsp2_sidetone",
1096 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1097 .main_clk = "mcbsp2_ick",
1098 .flags = HWMOD_NO_IDLEST,
1101 /* mcbsp3_sidetone */
1103 static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
1104 .name = "mcbsp3_sidetone",
1105 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1106 .main_clk = "mcbsp3_ick",
1107 .flags = HWMOD_NO_IDLEST,
1111 static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
1113 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
1114 .sysc_fields = &omap34xx_sr_sysc_fields,
1117 static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
1118 .name = "smartreflex",
1119 .sysc = &omap34xx_sr_sysc,
1123 static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
1125 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1126 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1128 .sysc_fields = &omap36xx_sr_sysc_fields,
1131 static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
1132 .name = "smartreflex",
1133 .sysc = &omap36xx_sr_sysc,
1138 static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1139 .sensor_voltdm_name = "mpu_iva",
1143 static struct omap_hwmod omap34xx_sr1_hwmod = {
1144 .name = "smartreflex_mpu_iva",
1145 .class = &omap34xx_smartreflex_hwmod_class,
1146 .main_clk = "sr1_fck",
1149 .module_offs = WKUP_MOD,
1151 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1154 .dev_attr = &sr1_dev_attr,
1155 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1158 static struct omap_hwmod omap36xx_sr1_hwmod = {
1159 .name = "smartreflex_mpu_iva",
1160 .class = &omap36xx_smartreflex_hwmod_class,
1161 .main_clk = "sr1_fck",
1164 .module_offs = WKUP_MOD,
1166 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1169 .dev_attr = &sr1_dev_attr,
1173 static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1174 .sensor_voltdm_name = "core",
1178 static struct omap_hwmod omap34xx_sr2_hwmod = {
1179 .name = "smartreflex_core",
1180 .class = &omap34xx_smartreflex_hwmod_class,
1181 .main_clk = "sr2_fck",
1184 .module_offs = WKUP_MOD,
1186 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1189 .dev_attr = &sr2_dev_attr,
1190 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1193 static struct omap_hwmod omap36xx_sr2_hwmod = {
1194 .name = "smartreflex_core",
1195 .class = &omap36xx_smartreflex_hwmod_class,
1196 .main_clk = "sr2_fck",
1199 .module_offs = WKUP_MOD,
1201 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1204 .dev_attr = &sr2_dev_attr,
1209 * mailbox module allowing communication between the on-chip processors
1210 * using a queued mailbox-interrupt mechanism.
1213 static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
1217 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1218 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1219 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1220 .sysc_fields = &omap_hwmod_sysc_type1,
1223 static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1225 .sysc = &omap3xxx_mailbox_sysc,
1228 static struct omap_hwmod omap3xxx_mailbox_hwmod = {
1230 .class = &omap3xxx_mailbox_hwmod_class,
1231 .main_clk = "mailboxes_ick",
1234 .module_offs = CORE_MOD,
1236 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
1243 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1247 static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
1249 .sysc_offs = 0x0010,
1250 .syss_offs = 0x0014,
1251 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1252 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1253 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1254 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1255 .sysc_fields = &omap_hwmod_sysc_type1,
1258 static struct omap_hwmod_class omap34xx_mcspi_class = {
1260 .sysc = &omap34xx_mcspi_sysc,
1261 .rev = OMAP3_MCSPI_REV,
1265 static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1266 .num_chipselect = 4,
1269 static struct omap_hwmod omap34xx_mcspi1 = {
1271 .main_clk = "mcspi1_fck",
1274 .module_offs = CORE_MOD,
1276 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
1279 .class = &omap34xx_mcspi_class,
1280 .dev_attr = &omap_mcspi1_dev_attr,
1284 static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1285 .num_chipselect = 2,
1288 static struct omap_hwmod omap34xx_mcspi2 = {
1290 .main_clk = "mcspi2_fck",
1293 .module_offs = CORE_MOD,
1295 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
1298 .class = &omap34xx_mcspi_class,
1299 .dev_attr = &omap_mcspi2_dev_attr,
1305 static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1306 .num_chipselect = 2,
1309 static struct omap_hwmod omap34xx_mcspi3 = {
1311 .main_clk = "mcspi3_fck",
1314 .module_offs = CORE_MOD,
1316 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
1319 .class = &omap34xx_mcspi_class,
1320 .dev_attr = &omap_mcspi3_dev_attr,
1326 static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
1327 .num_chipselect = 1,
1330 static struct omap_hwmod omap34xx_mcspi4 = {
1332 .main_clk = "mcspi4_fck",
1335 .module_offs = CORE_MOD,
1337 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
1340 .class = &omap34xx_mcspi_class,
1341 .dev_attr = &omap_mcspi4_dev_attr,
1345 static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
1347 .sysc_offs = 0x0404,
1348 .syss_offs = 0x0408,
1349 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1350 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1352 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1353 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1354 .sysc_fields = &omap_hwmod_sysc_type1,
1357 static struct omap_hwmod_class usbotg_class = {
1359 .sysc = &omap3xxx_usbhsotg_sysc,
1364 static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1365 .name = "usb_otg_hs",
1366 .main_clk = "hsotgusb_ick",
1369 .module_offs = CORE_MOD,
1371 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
1374 .class = &usbotg_class,
1377 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1378 * broken when autoidle is enabled
1379 * workaround is to disable the autoidle bit at module level.
1381 * Enabling the device in any other MIDLEMODE setting but force-idle
1382 * causes core_pwrdm not enter idle states at least on OMAP3630.
1383 * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY
1384 * signal when MIDLEMODE is set to force-idle.
1386 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE |
1387 HWMOD_FORCE_MSTANDBY | HWMOD_RECONFIG_IO_CHAIN,
1392 static struct omap_hwmod_class am35xx_usbotg_class = {
1393 .name = "am35xx_usbotg",
1396 static struct omap_hwmod am35xx_usbhsotg_hwmod = {
1397 .name = "am35x_otg_hs",
1398 .main_clk = "hsotgusb_fck",
1399 .class = &am35xx_usbotg_class,
1400 .flags = HWMOD_NO_IDLEST,
1403 /* MMC/SD/SDIO common */
1404 static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
1408 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1409 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1410 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1411 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1412 .sysc_fields = &omap_hwmod_sysc_type1,
1415 static struct omap_hwmod_class omap34xx_mmc_class = {
1417 .sysc = &omap34xx_mmc_sysc,
1424 static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
1425 { .role = "dbck", .clk = "omap_32k_fck", },
1428 static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
1429 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1432 /* See 35xx errata 2.1.1.128 in SPRZ278F */
1433 static struct omap_hsmmc_dev_attr mmc1_pre_es3_dev_attr = {
1434 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
1435 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
1438 static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
1440 .opt_clks = omap34xx_mmc1_opt_clks,
1441 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1442 .main_clk = "mmchs1_fck",
1445 .module_offs = CORE_MOD,
1447 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1450 .dev_attr = &mmc1_pre_es3_dev_attr,
1451 .class = &omap34xx_mmc_class,
1454 static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1456 .opt_clks = omap34xx_mmc1_opt_clks,
1457 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1458 .main_clk = "mmchs1_fck",
1461 .module_offs = CORE_MOD,
1463 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1466 .dev_attr = &mmc1_dev_attr,
1467 .class = &omap34xx_mmc_class,
1474 static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
1475 { .role = "dbck", .clk = "omap_32k_fck", },
1478 /* See 35xx errata 2.1.1.128 in SPRZ278F */
1479 static struct omap_hsmmc_dev_attr mmc2_pre_es3_dev_attr = {
1480 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
1483 static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
1485 .opt_clks = omap34xx_mmc2_opt_clks,
1486 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1487 .main_clk = "mmchs2_fck",
1490 .module_offs = CORE_MOD,
1492 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1495 .dev_attr = &mmc2_pre_es3_dev_attr,
1496 .class = &omap34xx_mmc_class,
1499 static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1501 .opt_clks = omap34xx_mmc2_opt_clks,
1502 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1503 .main_clk = "mmchs2_fck",
1506 .module_offs = CORE_MOD,
1508 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1511 .class = &omap34xx_mmc_class,
1518 static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
1519 { .role = "dbck", .clk = "omap_32k_fck", },
1522 static struct omap_hwmod omap3xxx_mmc3_hwmod = {
1524 .opt_clks = omap34xx_mmc3_opt_clks,
1525 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
1526 .main_clk = "mmchs3_fck",
1529 .module_offs = CORE_MOD,
1531 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
1534 .class = &omap34xx_mmc_class,
1538 * 'usb_host_hs' class
1539 * high-speed multi-port usb host controller
1542 static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
1544 .sysc_offs = 0x0010,
1545 .syss_offs = 0x0014,
1546 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1547 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1548 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1549 SYSS_HAS_RESET_STATUS),
1550 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1551 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1552 .sysc_fields = &omap_hwmod_sysc_type1,
1555 static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
1556 .name = "usb_host_hs",
1557 .sysc = &omap3xxx_usb_host_hs_sysc,
1561 static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
1562 .name = "usb_host_hs",
1563 .class = &omap3xxx_usb_host_hs_hwmod_class,
1564 .clkdm_name = "usbhost_clkdm",
1565 .main_clk = "usbhost_48m_fck",
1568 .module_offs = OMAP3430ES2_USBHOST_MOD,
1570 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
1575 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1579 * In the following configuration :
1580 * - USBHOST module is set to smart-idle mode
1581 * - PRCM asserts idle_req to the USBHOST module ( This typically
1582 * happens when the system is going to a low power mode : all ports
1583 * have been suspended, the master part of the USBHOST module has
1584 * entered the standby state, and SW has cut the functional clocks)
1585 * - an USBHOST interrupt occurs before the module is able to answer
1586 * idle_ack, typically a remote wakeup IRQ.
1587 * Then the USB HOST module will enter a deadlock situation where it
1588 * is no more accessible nor functional.
1591 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1595 * Errata: USB host EHCI may stall when entering smart-standby mode
1599 * When the USBHOST module is set to smart-standby mode, and when it is
1600 * ready to enter the standby state (i.e. all ports are suspended and
1601 * all attached devices are in suspend mode), then it can wrongly assert
1602 * the Mstandby signal too early while there are still some residual OCP
1603 * transactions ongoing. If this condition occurs, the internal state
1604 * machine may go to an undefined state and the USB link may be stuck
1605 * upon the next resume.
1608 * Don't use smart standby; use only force standby,
1609 * hence HWMOD_SWSUP_MSTANDBY
1612 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1616 * 'usb_tll_hs' class
1617 * usb_tll_hs module is the adapter on the usb_host_hs ports
1619 static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
1621 .sysc_offs = 0x0010,
1622 .syss_offs = 0x0014,
1623 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1624 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1626 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1627 .sysc_fields = &omap_hwmod_sysc_type1,
1630 static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
1631 .name = "usb_tll_hs",
1632 .sysc = &omap3xxx_usb_tll_hs_sysc,
1636 static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
1637 .name = "usb_tll_hs",
1638 .class = &omap3xxx_usb_tll_hs_hwmod_class,
1639 .clkdm_name = "core_l4_clkdm",
1640 .main_clk = "usbtll_fck",
1643 .module_offs = CORE_MOD,
1645 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
1650 static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
1652 .main_clk = "hdq_fck",
1655 .module_offs = CORE_MOD,
1657 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
1660 .class = &omap2_hdq1w_class,
1664 static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = {
1665 { .name = "rst_modem_pwron_sw", .rst_shift = 0 },
1666 { .name = "rst_modem_sw", .rst_shift = 1 },
1669 static struct omap_hwmod_class omap3xxx_sad2d_class = {
1673 static struct omap_hwmod omap3xxx_sad2d_hwmod = {
1675 .rst_lines = omap3xxx_sad2d_resets,
1676 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets),
1677 .main_clk = "sad2d_ick",
1680 .module_offs = CORE_MOD,
1682 .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT,
1685 .class = &omap3xxx_sad2d_class,
1689 * '32K sync counter' class
1690 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
1692 static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
1694 .sysc_offs = 0x0004,
1695 .sysc_flags = SYSC_HAS_SIDLEMODE,
1696 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
1697 .sysc_fields = &omap_hwmod_sysc_type1,
1700 static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
1702 .sysc = &omap3xxx_counter_sysc,
1705 static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
1706 .name = "counter_32k",
1707 .class = &omap3xxx_counter_hwmod_class,
1708 .clkdm_name = "wkup_clkdm",
1709 .flags = HWMOD_SWSUP_SIDLE,
1710 .main_clk = "wkup_32k_fck",
1713 .module_offs = WKUP_MOD,
1715 .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
1722 * general purpose memory controller
1725 static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = {
1727 .sysc_offs = 0x0010,
1728 .syss_offs = 0x0014,
1729 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1730 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1731 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1732 .sysc_fields = &omap_hwmod_sysc_type1,
1735 static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = {
1737 .sysc = &omap3xxx_gpmc_sysc,
1740 static struct omap_hwmod omap3xxx_gpmc_hwmod = {
1742 .class = &omap3xxx_gpmc_hwmod_class,
1743 .clkdm_name = "core_l3_clkdm",
1744 .main_clk = "gpmc_fck",
1745 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
1746 .flags = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
1753 /* L3 -> L4_CORE interface */
1754 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
1755 .master = &omap3xxx_l3_main_hwmod,
1756 .slave = &omap3xxx_l4_core_hwmod,
1757 .user = OCP_USER_MPU | OCP_USER_SDMA,
1760 /* L3 -> L4_PER interface */
1761 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
1762 .master = &omap3xxx_l3_main_hwmod,
1763 .slave = &omap3xxx_l4_per_hwmod,
1764 .user = OCP_USER_MPU | OCP_USER_SDMA,
1768 /* MPU -> L3 interface */
1769 static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
1770 .master = &omap3xxx_mpu_hwmod,
1771 .slave = &omap3xxx_l3_main_hwmod,
1772 .user = OCP_USER_MPU,
1777 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = {
1778 .master = &omap3xxx_l3_main_hwmod,
1779 .slave = &omap3xxx_debugss_hwmod,
1780 .user = OCP_USER_MPU,
1784 static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
1785 .master = &omap3430es1_dss_core_hwmod,
1786 .slave = &omap3xxx_l3_main_hwmod,
1787 .user = OCP_USER_MPU | OCP_USER_SDMA,
1790 static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
1791 .master = &omap3xxx_dss_core_hwmod,
1792 .slave = &omap3xxx_l3_main_hwmod,
1795 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
1796 .flags = OMAP_FIREWALL_L3,
1799 .user = OCP_USER_MPU | OCP_USER_SDMA,
1802 /* l3_core -> usbhsotg interface */
1803 static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
1804 .master = &omap3xxx_usbhsotg_hwmod,
1805 .slave = &omap3xxx_l3_main_hwmod,
1806 .clk = "core_l3_ick",
1807 .user = OCP_USER_MPU,
1810 /* l3_core -> am35xx_usbhsotg interface */
1811 static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
1812 .master = &am35xx_usbhsotg_hwmod,
1813 .slave = &omap3xxx_l3_main_hwmod,
1814 .clk = "hsotgusb_ick",
1815 .user = OCP_USER_MPU,
1818 /* l3_core -> sad2d interface */
1819 static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = {
1820 .master = &omap3xxx_sad2d_hwmod,
1821 .slave = &omap3xxx_l3_main_hwmod,
1822 .clk = "core_l3_ick",
1823 .user = OCP_USER_MPU,
1826 /* L4_CORE -> L4_WKUP interface */
1827 static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
1828 .master = &omap3xxx_l4_core_hwmod,
1829 .slave = &omap3xxx_l4_wkup_hwmod,
1830 .user = OCP_USER_MPU | OCP_USER_SDMA,
1833 /* L4 CORE -> MMC1 interface */
1834 static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
1835 .master = &omap3xxx_l4_core_hwmod,
1836 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
1837 .clk = "mmchs1_ick",
1838 .user = OCP_USER_MPU | OCP_USER_SDMA,
1839 .flags = OMAP_FIREWALL_L4,
1842 static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
1843 .master = &omap3xxx_l4_core_hwmod,
1844 .slave = &omap3xxx_es3plus_mmc1_hwmod,
1845 .clk = "mmchs1_ick",
1846 .user = OCP_USER_MPU | OCP_USER_SDMA,
1847 .flags = OMAP_FIREWALL_L4,
1850 /* L4 CORE -> MMC2 interface */
1851 static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
1852 .master = &omap3xxx_l4_core_hwmod,
1853 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
1854 .clk = "mmchs2_ick",
1855 .user = OCP_USER_MPU | OCP_USER_SDMA,
1856 .flags = OMAP_FIREWALL_L4,
1859 static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
1860 .master = &omap3xxx_l4_core_hwmod,
1861 .slave = &omap3xxx_es3plus_mmc2_hwmod,
1862 .clk = "mmchs2_ick",
1863 .user = OCP_USER_MPU | OCP_USER_SDMA,
1864 .flags = OMAP_FIREWALL_L4,
1867 /* L4 CORE -> MMC3 interface */
1869 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
1870 .master = &omap3xxx_l4_core_hwmod,
1871 .slave = &omap3xxx_mmc3_hwmod,
1872 .clk = "mmchs3_ick",
1873 .user = OCP_USER_MPU | OCP_USER_SDMA,
1874 .flags = OMAP_FIREWALL_L4,
1877 /* L4 CORE -> UART1 interface */
1879 static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
1880 .master = &omap3xxx_l4_core_hwmod,
1881 .slave = &omap3xxx_uart1_hwmod,
1883 .user = OCP_USER_MPU | OCP_USER_SDMA,
1886 /* L4 CORE -> UART2 interface */
1888 static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
1889 .master = &omap3xxx_l4_core_hwmod,
1890 .slave = &omap3xxx_uart2_hwmod,
1892 .user = OCP_USER_MPU | OCP_USER_SDMA,
1895 /* L4 PER -> UART3 interface */
1897 static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
1898 .master = &omap3xxx_l4_per_hwmod,
1899 .slave = &omap3xxx_uart3_hwmod,
1901 .user = OCP_USER_MPU | OCP_USER_SDMA,
1904 /* L4 PER -> UART4 interface */
1906 static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
1907 .master = &omap3xxx_l4_per_hwmod,
1908 .slave = &omap36xx_uart4_hwmod,
1910 .user = OCP_USER_MPU | OCP_USER_SDMA,
1913 /* AM35xx: L4 CORE -> UART4 interface */
1915 static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
1916 .master = &omap3xxx_l4_core_hwmod,
1917 .slave = &am35xx_uart4_hwmod,
1919 .user = OCP_USER_MPU | OCP_USER_SDMA,
1922 /* L4 CORE -> I2C1 interface */
1923 static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
1924 .master = &omap3xxx_l4_core_hwmod,
1925 .slave = &omap3xxx_i2c1_hwmod,
1929 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
1931 .flags = OMAP_FIREWALL_L4,
1934 .user = OCP_USER_MPU | OCP_USER_SDMA,
1937 /* L4 CORE -> I2C2 interface */
1938 static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
1939 .master = &omap3xxx_l4_core_hwmod,
1940 .slave = &omap3xxx_i2c2_hwmod,
1944 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
1946 .flags = OMAP_FIREWALL_L4,
1949 .user = OCP_USER_MPU | OCP_USER_SDMA,
1952 /* L4 CORE -> I2C3 interface */
1954 static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
1955 .master = &omap3xxx_l4_core_hwmod,
1956 .slave = &omap3xxx_i2c3_hwmod,
1960 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
1962 .flags = OMAP_FIREWALL_L4,
1965 .user = OCP_USER_MPU | OCP_USER_SDMA,
1968 /* L4 CORE -> SR1 interface */
1969 static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
1970 .master = &omap3xxx_l4_core_hwmod,
1971 .slave = &omap34xx_sr1_hwmod,
1973 .user = OCP_USER_MPU,
1976 static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
1977 .master = &omap3xxx_l4_core_hwmod,
1978 .slave = &omap36xx_sr1_hwmod,
1980 .user = OCP_USER_MPU,
1983 /* L4 CORE -> SR2 interface */
1985 static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
1986 .master = &omap3xxx_l4_core_hwmod,
1987 .slave = &omap34xx_sr2_hwmod,
1989 .user = OCP_USER_MPU,
1992 static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
1993 .master = &omap3xxx_l4_core_hwmod,
1994 .slave = &omap36xx_sr2_hwmod,
1996 .user = OCP_USER_MPU,
2000 /* l4_core -> usbhsotg */
2001 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
2002 .master = &omap3xxx_l4_core_hwmod,
2003 .slave = &omap3xxx_usbhsotg_hwmod,
2005 .user = OCP_USER_MPU,
2009 /* l4_core -> usbhsotg */
2010 static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2011 .master = &omap3xxx_l4_core_hwmod,
2012 .slave = &am35xx_usbhsotg_hwmod,
2013 .clk = "hsotgusb_ick",
2014 .user = OCP_USER_MPU,
2017 /* L4_WKUP -> L4_SEC interface */
2018 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2019 .master = &omap3xxx_l4_wkup_hwmod,
2020 .slave = &omap3xxx_l4_sec_hwmod,
2021 .user = OCP_USER_MPU | OCP_USER_SDMA,
2024 /* IVA2 <- L3 interface */
2025 static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2026 .master = &omap3xxx_l3_main_hwmod,
2027 .slave = &omap3xxx_iva_hwmod,
2028 .clk = "core_l3_ick",
2029 .user = OCP_USER_MPU | OCP_USER_SDMA,
2033 /* l4_wkup -> timer1 */
2034 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2035 .master = &omap3xxx_l4_wkup_hwmod,
2036 .slave = &omap3xxx_timer1_hwmod,
2038 .user = OCP_USER_MPU | OCP_USER_SDMA,
2042 /* l4_per -> timer2 */
2043 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2044 .master = &omap3xxx_l4_per_hwmod,
2045 .slave = &omap3xxx_timer2_hwmod,
2047 .user = OCP_USER_MPU | OCP_USER_SDMA,
2051 /* l4_per -> timer3 */
2052 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
2053 .master = &omap3xxx_l4_per_hwmod,
2054 .slave = &omap3xxx_timer3_hwmod,
2056 .user = OCP_USER_MPU | OCP_USER_SDMA,
2060 /* l4_per -> timer4 */
2061 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2062 .master = &omap3xxx_l4_per_hwmod,
2063 .slave = &omap3xxx_timer4_hwmod,
2065 .user = OCP_USER_MPU | OCP_USER_SDMA,
2069 /* l4_per -> timer5 */
2070 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2071 .master = &omap3xxx_l4_per_hwmod,
2072 .slave = &omap3xxx_timer5_hwmod,
2074 .user = OCP_USER_MPU | OCP_USER_SDMA,
2078 /* l4_per -> timer6 */
2079 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2080 .master = &omap3xxx_l4_per_hwmod,
2081 .slave = &omap3xxx_timer6_hwmod,
2083 .user = OCP_USER_MPU | OCP_USER_SDMA,
2087 /* l4_per -> timer7 */
2088 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2089 .master = &omap3xxx_l4_per_hwmod,
2090 .slave = &omap3xxx_timer7_hwmod,
2092 .user = OCP_USER_MPU | OCP_USER_SDMA,
2096 /* l4_per -> timer8 */
2097 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2098 .master = &omap3xxx_l4_per_hwmod,
2099 .slave = &omap3xxx_timer8_hwmod,
2101 .user = OCP_USER_MPU | OCP_USER_SDMA,
2105 /* l4_per -> timer9 */
2106 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2107 .master = &omap3xxx_l4_per_hwmod,
2108 .slave = &omap3xxx_timer9_hwmod,
2110 .user = OCP_USER_MPU | OCP_USER_SDMA,
2113 /* l4_core -> timer10 */
2114 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2115 .master = &omap3xxx_l4_core_hwmod,
2116 .slave = &omap3xxx_timer10_hwmod,
2118 .user = OCP_USER_MPU | OCP_USER_SDMA,
2121 /* l4_core -> timer11 */
2122 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2123 .master = &omap3xxx_l4_core_hwmod,
2124 .slave = &omap3xxx_timer11_hwmod,
2126 .user = OCP_USER_MPU | OCP_USER_SDMA,
2130 /* l4_core -> timer12 */
2131 static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2132 .master = &omap3xxx_l4_sec_hwmod,
2133 .slave = &omap3xxx_timer12_hwmod,
2135 .user = OCP_USER_MPU | OCP_USER_SDMA,
2138 /* l4_wkup -> wd_timer2 */
2140 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2141 .master = &omap3xxx_l4_wkup_hwmod,
2142 .slave = &omap3xxx_wd_timer2_hwmod,
2144 .user = OCP_USER_MPU | OCP_USER_SDMA,
2147 /* l4_core -> dss */
2148 static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
2149 .master = &omap3xxx_l4_core_hwmod,
2150 .slave = &omap3430es1_dss_core_hwmod,
2154 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2155 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2156 .flags = OMAP_FIREWALL_L4,
2159 .user = OCP_USER_MPU | OCP_USER_SDMA,
2162 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
2163 .master = &omap3xxx_l4_core_hwmod,
2164 .slave = &omap3xxx_dss_core_hwmod,
2168 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2169 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2170 .flags = OMAP_FIREWALL_L4,
2173 .user = OCP_USER_MPU | OCP_USER_SDMA,
2176 /* l4_core -> dss_dispc */
2177 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
2178 .master = &omap3xxx_l4_core_hwmod,
2179 .slave = &omap3xxx_dss_dispc_hwmod,
2183 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2184 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2185 .flags = OMAP_FIREWALL_L4,
2188 .user = OCP_USER_MPU | OCP_USER_SDMA,
2191 /* l4_core -> dss_dsi1 */
2192 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
2193 .master = &omap3xxx_l4_core_hwmod,
2194 .slave = &omap3xxx_dss_dsi1_hwmod,
2198 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2199 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2200 .flags = OMAP_FIREWALL_L4,
2203 .user = OCP_USER_MPU | OCP_USER_SDMA,
2206 /* l4_core -> dss_rfbi */
2207 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2208 .master = &omap3xxx_l4_core_hwmod,
2209 .slave = &omap3xxx_dss_rfbi_hwmod,
2213 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2214 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2215 .flags = OMAP_FIREWALL_L4,
2218 .user = OCP_USER_MPU | OCP_USER_SDMA,
2221 /* l4_core -> dss_venc */
2222 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2223 .master = &omap3xxx_l4_core_hwmod,
2224 .slave = &omap3xxx_dss_venc_hwmod,
2228 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2229 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2230 .flags = OMAP_FIREWALL_L4,
2233 .flags = OCPIF_SWSUP_IDLE,
2234 .user = OCP_USER_MPU | OCP_USER_SDMA,
2237 /* l4_wkup -> gpio1 */
2239 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2240 .master = &omap3xxx_l4_wkup_hwmod,
2241 .slave = &omap3xxx_gpio1_hwmod,
2242 .user = OCP_USER_MPU | OCP_USER_SDMA,
2245 /* l4_per -> gpio2 */
2247 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2248 .master = &omap3xxx_l4_per_hwmod,
2249 .slave = &omap3xxx_gpio2_hwmod,
2250 .user = OCP_USER_MPU | OCP_USER_SDMA,
2253 /* l4_per -> gpio3 */
2255 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2256 .master = &omap3xxx_l4_per_hwmod,
2257 .slave = &omap3xxx_gpio3_hwmod,
2258 .user = OCP_USER_MPU | OCP_USER_SDMA,
2263 * The memory management unit performs virtual to physical address translation
2264 * for its requestors.
2267 static struct omap_hwmod_class_sysconfig mmu_sysc = {
2271 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2272 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2273 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2274 .sysc_fields = &omap_hwmod_sysc_type1,
2277 static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = {
2283 static struct omap_hwmod omap3xxx_mmu_isp_hwmod;
2285 /* l4_core -> mmu isp */
2286 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = {
2287 .master = &omap3xxx_l4_core_hwmod,
2288 .slave = &omap3xxx_mmu_isp_hwmod,
2289 .user = OCP_USER_MPU | OCP_USER_SDMA,
2292 static struct omap_hwmod omap3xxx_mmu_isp_hwmod = {
2294 .class = &omap3xxx_mmu_hwmod_class,
2295 .main_clk = "cam_ick",
2296 .flags = HWMOD_NO_IDLEST,
2301 static struct omap_hwmod omap3xxx_mmu_iva_hwmod;
2303 static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = {
2304 { .name = "mmu", .rst_shift = 1, .st_shift = 9 },
2307 /* l3_main -> iva mmu */
2308 static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = {
2309 .master = &omap3xxx_l3_main_hwmod,
2310 .slave = &omap3xxx_mmu_iva_hwmod,
2311 .user = OCP_USER_MPU | OCP_USER_SDMA,
2314 static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
2316 .class = &omap3xxx_mmu_hwmod_class,
2317 .clkdm_name = "iva2_clkdm",
2318 .rst_lines = omap3xxx_mmu_iva_resets,
2319 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets),
2320 .main_clk = "iva2_ck",
2323 .module_offs = OMAP3430_IVA2_MOD,
2325 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
2328 .flags = HWMOD_NO_IDLEST,
2331 /* l4_per -> gpio4 */
2333 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
2334 .master = &omap3xxx_l4_per_hwmod,
2335 .slave = &omap3xxx_gpio4_hwmod,
2336 .user = OCP_USER_MPU | OCP_USER_SDMA,
2339 /* l4_per -> gpio5 */
2341 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
2342 .master = &omap3xxx_l4_per_hwmod,
2343 .slave = &omap3xxx_gpio5_hwmod,
2344 .user = OCP_USER_MPU | OCP_USER_SDMA,
2347 /* l4_per -> gpio6 */
2349 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2350 .master = &omap3xxx_l4_per_hwmod,
2351 .slave = &omap3xxx_gpio6_hwmod,
2352 .user = OCP_USER_MPU | OCP_USER_SDMA,
2355 /* dma_system -> L3 */
2356 static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2357 .master = &omap3xxx_dma_system_hwmod,
2358 .slave = &omap3xxx_l3_main_hwmod,
2359 .clk = "core_l3_ick",
2360 .user = OCP_USER_MPU | OCP_USER_SDMA,
2363 /* l4_cfg -> dma_system */
2364 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2365 .master = &omap3xxx_l4_core_hwmod,
2366 .slave = &omap3xxx_dma_system_hwmod,
2367 .clk = "core_l4_ick",
2368 .user = OCP_USER_MPU | OCP_USER_SDMA,
2372 /* l4_core -> mcbsp1 */
2373 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2374 .master = &omap3xxx_l4_core_hwmod,
2375 .slave = &omap3xxx_mcbsp1_hwmod,
2376 .clk = "mcbsp1_ick",
2377 .user = OCP_USER_MPU | OCP_USER_SDMA,
2381 /* l4_per -> mcbsp2 */
2382 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2383 .master = &omap3xxx_l4_per_hwmod,
2384 .slave = &omap3xxx_mcbsp2_hwmod,
2385 .clk = "mcbsp2_ick",
2386 .user = OCP_USER_MPU | OCP_USER_SDMA,
2390 /* l4_per -> mcbsp3 */
2391 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2392 .master = &omap3xxx_l4_per_hwmod,
2393 .slave = &omap3xxx_mcbsp3_hwmod,
2394 .clk = "mcbsp3_ick",
2395 .user = OCP_USER_MPU | OCP_USER_SDMA,
2399 /* l4_per -> mcbsp4 */
2400 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2401 .master = &omap3xxx_l4_per_hwmod,
2402 .slave = &omap3xxx_mcbsp4_hwmod,
2403 .clk = "mcbsp4_ick",
2404 .user = OCP_USER_MPU | OCP_USER_SDMA,
2408 /* l4_core -> mcbsp5 */
2409 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2410 .master = &omap3xxx_l4_core_hwmod,
2411 .slave = &omap3xxx_mcbsp5_hwmod,
2412 .clk = "mcbsp5_ick",
2413 .user = OCP_USER_MPU | OCP_USER_SDMA,
2417 /* l4_per -> mcbsp2_sidetone */
2418 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2419 .master = &omap3xxx_l4_per_hwmod,
2420 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2421 .clk = "mcbsp2_ick",
2422 .user = OCP_USER_MPU,
2426 /* l4_per -> mcbsp3_sidetone */
2427 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2428 .master = &omap3xxx_l4_per_hwmod,
2429 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2430 .clk = "mcbsp3_ick",
2431 .user = OCP_USER_MPU,
2434 /* l4_core -> mailbox */
2435 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2436 .master = &omap3xxx_l4_core_hwmod,
2437 .slave = &omap3xxx_mailbox_hwmod,
2438 .user = OCP_USER_MPU | OCP_USER_SDMA,
2441 /* l4 core -> mcspi1 interface */
2442 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2443 .master = &omap3xxx_l4_core_hwmod,
2444 .slave = &omap34xx_mcspi1,
2445 .clk = "mcspi1_ick",
2446 .user = OCP_USER_MPU | OCP_USER_SDMA,
2449 /* l4 core -> mcspi2 interface */
2450 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2451 .master = &omap3xxx_l4_core_hwmod,
2452 .slave = &omap34xx_mcspi2,
2453 .clk = "mcspi2_ick",
2454 .user = OCP_USER_MPU | OCP_USER_SDMA,
2457 /* l4 core -> mcspi3 interface */
2458 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2459 .master = &omap3xxx_l4_core_hwmod,
2460 .slave = &omap34xx_mcspi3,
2461 .clk = "mcspi3_ick",
2462 .user = OCP_USER_MPU | OCP_USER_SDMA,
2465 /* l4 core -> mcspi4 interface */
2467 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
2468 .master = &omap3xxx_l4_core_hwmod,
2469 .slave = &omap34xx_mcspi4,
2470 .clk = "mcspi4_ick",
2471 .user = OCP_USER_MPU | OCP_USER_SDMA,
2474 static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
2475 .master = &omap3xxx_usb_host_hs_hwmod,
2476 .slave = &omap3xxx_l3_main_hwmod,
2477 .clk = "core_l3_ick",
2478 .user = OCP_USER_MPU,
2482 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
2483 .master = &omap3xxx_l4_core_hwmod,
2484 .slave = &omap3xxx_usb_host_hs_hwmod,
2485 .clk = "usbhost_ick",
2486 .user = OCP_USER_MPU | OCP_USER_SDMA,
2490 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
2491 .master = &omap3xxx_l4_core_hwmod,
2492 .slave = &omap3xxx_usb_tll_hs_hwmod,
2493 .clk = "usbtll_ick",
2494 .user = OCP_USER_MPU | OCP_USER_SDMA,
2497 /* l4_core -> hdq1w interface */
2498 static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
2499 .master = &omap3xxx_l4_core_hwmod,
2500 .slave = &omap3xxx_hdq1w_hwmod,
2502 .user = OCP_USER_MPU | OCP_USER_SDMA,
2503 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
2506 /* l4_wkup -> 32ksync_counter */
2509 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
2510 .master = &omap3xxx_l4_wkup_hwmod,
2511 .slave = &omap3xxx_counter_32k_hwmod,
2512 .clk = "omap_32ksync_ick",
2513 .user = OCP_USER_MPU | OCP_USER_SDMA,
2516 /* am35xx has Davinci MDIO & EMAC */
2517 static struct omap_hwmod_class am35xx_mdio_class = {
2518 .name = "davinci_mdio",
2521 static struct omap_hwmod am35xx_mdio_hwmod = {
2522 .name = "davinci_mdio",
2523 .class = &am35xx_mdio_class,
2524 .flags = HWMOD_NO_IDLEST,
2528 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2529 * but this will probably require some additional hwmod core support,
2530 * so is left as a future to-do item.
2532 static struct omap_hwmod_ocp_if am35xx_mdio__l3 = {
2533 .master = &am35xx_mdio_hwmod,
2534 .slave = &omap3xxx_l3_main_hwmod,
2536 .user = OCP_USER_MPU,
2539 /* l4_core -> davinci mdio */
2541 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2542 * but this will probably require some additional hwmod core support,
2543 * so is left as a future to-do item.
2545 static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
2546 .master = &omap3xxx_l4_core_hwmod,
2547 .slave = &am35xx_mdio_hwmod,
2549 .user = OCP_USER_MPU,
2552 static struct omap_hwmod_class am35xx_emac_class = {
2553 .name = "davinci_emac",
2556 static struct omap_hwmod am35xx_emac_hwmod = {
2557 .name = "davinci_emac",
2558 .class = &am35xx_emac_class,
2560 * According to Mark Greer, the MPU will not return from WFI
2561 * when the EMAC signals an interrupt.
2562 * http://www.spinics.net/lists/arm-kernel/msg174734.html
2564 .flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI),
2567 /* l3_core -> davinci emac interface */
2569 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2570 * but this will probably require some additional hwmod core support,
2571 * so is left as a future to-do item.
2573 static struct omap_hwmod_ocp_if am35xx_emac__l3 = {
2574 .master = &am35xx_emac_hwmod,
2575 .slave = &omap3xxx_l3_main_hwmod,
2577 .user = OCP_USER_MPU,
2580 /* l4_core -> davinci emac */
2582 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2583 * but this will probably require some additional hwmod core support,
2584 * so is left as a future to-do item.
2586 static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
2587 .master = &omap3xxx_l4_core_hwmod,
2588 .slave = &am35xx_emac_hwmod,
2590 .user = OCP_USER_MPU,
2593 static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
2594 .master = &omap3xxx_l3_main_hwmod,
2595 .slave = &omap3xxx_gpmc_hwmod,
2596 .clk = "core_l3_ick",
2597 .user = OCP_USER_MPU | OCP_USER_SDMA,
2600 /* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */
2601 static struct omap_hwmod_class_sysconfig omap3_sham_sysc = {
2605 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2606 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2607 .sysc_fields = &omap3_sham_sysc_fields,
2610 static struct omap_hwmod_class omap3xxx_sham_class = {
2612 .sysc = &omap3_sham_sysc,
2617 static struct omap_hwmod omap3xxx_sham_hwmod = {
2619 .main_clk = "sha12_ick",
2622 .module_offs = CORE_MOD,
2624 .idlest_idle_bit = OMAP3430_ST_SHA12_SHIFT,
2627 .class = &omap3xxx_sham_class,
2631 static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham = {
2632 .master = &omap3xxx_l4_core_hwmod,
2633 .slave = &omap3xxx_sham_hwmod,
2635 .user = OCP_USER_MPU | OCP_USER_SDMA,
2638 /* l4_core -> AES */
2639 static struct omap_hwmod_class_sysconfig omap3_aes_sysc = {
2643 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2644 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2645 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2646 .sysc_fields = &omap3xxx_aes_sysc_fields,
2649 static struct omap_hwmod_class omap3xxx_aes_class = {
2651 .sysc = &omap3_aes_sysc,
2655 static struct omap_hwmod omap3xxx_aes_hwmod = {
2657 .main_clk = "aes2_ick",
2660 .module_offs = CORE_MOD,
2662 .idlest_idle_bit = OMAP3430_ST_AES2_SHIFT,
2665 .class = &omap3xxx_aes_class,
2669 static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes = {
2670 .master = &omap3xxx_l4_core_hwmod,
2671 .slave = &omap3xxx_aes_hwmod,
2673 .user = OCP_USER_MPU | OCP_USER_SDMA,
2678 * synchronous serial interface (multichannel and full-duplex serial if)
2681 static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = {
2683 .sysc_offs = 0x0010,
2684 .syss_offs = 0x0014,
2685 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_MIDLEMODE |
2686 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2687 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2688 .sysc_fields = &omap_hwmod_sysc_type1,
2691 static struct omap_hwmod_class omap3xxx_ssi_hwmod_class = {
2693 .sysc = &omap34xx_ssi_sysc,
2696 static struct omap_hwmod omap3xxx_ssi_hwmod = {
2698 .class = &omap3xxx_ssi_hwmod_class,
2699 .clkdm_name = "core_l4_clkdm",
2700 .main_clk = "ssi_ssr_fck",
2703 .module_offs = CORE_MOD,
2705 .idlest_idle_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT,
2710 /* L4 CORE -> SSI */
2711 static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi = {
2712 .master = &omap3xxx_l4_core_hwmod,
2713 .slave = &omap3xxx_ssi_hwmod,
2715 .user = OCP_USER_MPU | OCP_USER_SDMA,
2718 static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
2719 &omap3xxx_l3_main__l4_core,
2720 &omap3xxx_l3_main__l4_per,
2721 &omap3xxx_mpu__l3_main,
2722 &omap3xxx_l3_main__l4_debugss,
2723 &omap3xxx_l4_core__l4_wkup,
2724 &omap3xxx_l4_core__mmc3,
2725 &omap3_l4_core__uart1,
2726 &omap3_l4_core__uart2,
2727 &omap3_l4_per__uart3,
2728 &omap3_l4_core__i2c1,
2729 &omap3_l4_core__i2c2,
2730 &omap3_l4_core__i2c3,
2731 &omap3xxx_l4_wkup__l4_sec,
2732 &omap3xxx_l4_wkup__timer1,
2733 &omap3xxx_l4_per__timer2,
2734 &omap3xxx_l4_per__timer3,
2735 &omap3xxx_l4_per__timer4,
2736 &omap3xxx_l4_per__timer5,
2737 &omap3xxx_l4_per__timer6,
2738 &omap3xxx_l4_per__timer7,
2739 &omap3xxx_l4_per__timer8,
2740 &omap3xxx_l4_per__timer9,
2741 &omap3xxx_l4_core__timer10,
2742 &omap3xxx_l4_core__timer11,
2743 &omap3xxx_l4_wkup__wd_timer2,
2744 &omap3xxx_l4_wkup__gpio1,
2745 &omap3xxx_l4_per__gpio2,
2746 &omap3xxx_l4_per__gpio3,
2747 &omap3xxx_l4_per__gpio4,
2748 &omap3xxx_l4_per__gpio5,
2749 &omap3xxx_l4_per__gpio6,
2750 &omap3xxx_dma_system__l3,
2751 &omap3xxx_l4_core__dma_system,
2752 &omap3xxx_l4_core__mcbsp1,
2753 &omap3xxx_l4_per__mcbsp2,
2754 &omap3xxx_l4_per__mcbsp3,
2755 &omap3xxx_l4_per__mcbsp4,
2756 &omap3xxx_l4_core__mcbsp5,
2757 &omap3xxx_l4_per__mcbsp2_sidetone,
2758 &omap3xxx_l4_per__mcbsp3_sidetone,
2759 &omap34xx_l4_core__mcspi1,
2760 &omap34xx_l4_core__mcspi2,
2761 &omap34xx_l4_core__mcspi3,
2762 &omap34xx_l4_core__mcspi4,
2763 &omap3xxx_l4_wkup__counter_32k,
2764 &omap3xxx_l3_main__gpmc,
2768 /* GP-only hwmod links */
2769 static struct omap_hwmod_ocp_if *omap34xx_gp_hwmod_ocp_ifs[] __initdata = {
2770 &omap3xxx_l4_sec__timer12,
2774 static struct omap_hwmod_ocp_if *omap36xx_gp_hwmod_ocp_ifs[] __initdata = {
2775 &omap3xxx_l4_sec__timer12,
2779 static struct omap_hwmod_ocp_if *am35xx_gp_hwmod_ocp_ifs[] __initdata = {
2780 &omap3xxx_l4_sec__timer12,
2784 /* crypto hwmod links */
2785 static struct omap_hwmod_ocp_if *omap34xx_sham_hwmod_ocp_ifs[] __initdata = {
2786 &omap3xxx_l4_core__sham,
2790 static struct omap_hwmod_ocp_if *omap34xx_aes_hwmod_ocp_ifs[] __initdata = {
2791 &omap3xxx_l4_core__aes,
2795 static struct omap_hwmod_ocp_if *omap36xx_sham_hwmod_ocp_ifs[] __initdata = {
2796 &omap3xxx_l4_core__sham,
2800 static struct omap_hwmod_ocp_if *omap36xx_aes_hwmod_ocp_ifs[] __initdata = {
2801 &omap3xxx_l4_core__aes,
2806 * Apparently the SHA/MD5 and AES accelerator IP blocks are
2807 * only present on some AM35xx chips, and no one knows which
2809 * http://www.spinics.net/lists/arm-kernel/msg215466.html So
2810 * if you need these IP blocks on an AM35xx, try uncommenting
2811 * the following lines.
2813 static struct omap_hwmod_ocp_if *am35xx_sham_hwmod_ocp_ifs[] __initdata = {
2814 /* &omap3xxx_l4_core__sham, */
2818 static struct omap_hwmod_ocp_if *am35xx_aes_hwmod_ocp_ifs[] __initdata = {
2819 /* &omap3xxx_l4_core__aes, */
2823 /* 3430ES1-only hwmod links */
2824 static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
2825 &omap3430es1_dss__l3,
2826 &omap3430es1_l4_core__dss,
2830 /* 3430ES2+-only hwmod links */
2831 static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
2833 &omap3xxx_l4_core__dss,
2834 &omap3xxx_usbhsotg__l3,
2835 &omap3xxx_l4_core__usbhsotg,
2836 &omap3xxx_usb_host_hs__l3_main_2,
2837 &omap3xxx_l4_core__usb_host_hs,
2838 &omap3xxx_l4_core__usb_tll_hs,
2842 /* <= 3430ES3-only hwmod links */
2843 static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
2844 &omap3xxx_l4_core__pre_es3_mmc1,
2845 &omap3xxx_l4_core__pre_es3_mmc2,
2849 /* 3430ES3+-only hwmod links */
2850 static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
2851 &omap3xxx_l4_core__es3plus_mmc1,
2852 &omap3xxx_l4_core__es3plus_mmc2,
2856 /* 34xx-only hwmod links (all ES revisions) */
2857 static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
2859 &omap34xx_l4_core__sr1,
2860 &omap34xx_l4_core__sr2,
2861 &omap3xxx_l4_core__mailbox,
2862 &omap3xxx_l4_core__hdq1w,
2863 &omap3xxx_sad2d__l3,
2864 &omap3xxx_l4_core__mmu_isp,
2865 &omap3xxx_l3_main__mmu_iva,
2866 &omap3xxx_l4_core__ssi,
2870 /* 36xx-only hwmod links (all ES revisions) */
2871 static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
2873 &omap36xx_l4_per__uart4,
2875 &omap3xxx_l4_core__dss,
2876 &omap36xx_l4_core__sr1,
2877 &omap36xx_l4_core__sr2,
2878 &omap3xxx_usbhsotg__l3,
2879 &omap3xxx_l4_core__usbhsotg,
2880 &omap3xxx_l4_core__mailbox,
2881 &omap3xxx_usb_host_hs__l3_main_2,
2882 &omap3xxx_l4_core__usb_host_hs,
2883 &omap3xxx_l4_core__usb_tll_hs,
2884 &omap3xxx_l4_core__es3plus_mmc1,
2885 &omap3xxx_l4_core__es3plus_mmc2,
2886 &omap3xxx_l4_core__hdq1w,
2887 &omap3xxx_sad2d__l3,
2888 &omap3xxx_l4_core__mmu_isp,
2889 &omap3xxx_l3_main__mmu_iva,
2890 &omap3xxx_l4_core__ssi,
2894 static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
2896 &omap3xxx_l4_core__dss,
2897 &am35xx_usbhsotg__l3,
2898 &am35xx_l4_core__usbhsotg,
2899 &am35xx_l4_core__uart4,
2900 &omap3xxx_usb_host_hs__l3_main_2,
2901 &omap3xxx_l4_core__usb_host_hs,
2902 &omap3xxx_l4_core__usb_tll_hs,
2903 &omap3xxx_l4_core__es3plus_mmc1,
2904 &omap3xxx_l4_core__es3plus_mmc2,
2905 &omap3xxx_l4_core__hdq1w,
2907 &am35xx_l4_core__mdio,
2909 &am35xx_l4_core__emac,
2913 static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
2914 &omap3xxx_l4_core__dss_dispc,
2915 &omap3xxx_l4_core__dss_dsi1,
2916 &omap3xxx_l4_core__dss_rfbi,
2917 &omap3xxx_l4_core__dss_venc,
2922 * omap3xxx_hwmod_is_hs_ip_block_usable - is a security IP block accessible?
2923 * @bus: struct device_node * for the top-level OMAP DT data
2924 * @dev_name: device name used in the DT file
2926 * Determine whether a "secure" IP block @dev_name is usable by Linux.
2927 * There doesn't appear to be a 100% reliable way to determine this,
2928 * so we rely on heuristics. If @bus is null, meaning there's no DT
2929 * data, then we only assume the IP block is accessible if the OMAP is
2930 * fused as a 'general-purpose' SoC. If however DT data is present,
2931 * test to see if the IP block is described in the DT data and set to
2932 * 'status = "okay"'. If so then we assume the ODM has configured the
2933 * OMAP firewalls to allow access to the IP block.
2935 * Return: 0 if device named @dev_name is not likely to be accessible,
2936 * or 1 if it is likely to be accessible.
2938 static bool __init omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node *bus,
2939 const char *dev_name)
2941 struct device_node *node;
2945 return omap_type() == OMAP2_DEVICE_TYPE_GP;
2947 node = of_get_child_by_name(bus, dev_name);
2948 available = of_device_is_available(node);
2954 int __init omap3xxx_hwmod_init(void)
2957 struct omap_hwmod_ocp_if **h = NULL, **h_gp = NULL, **h_sham = NULL;
2958 struct omap_hwmod_ocp_if **h_aes = NULL;
2959 struct device_node *bus;
2964 /* Register hwmod links common to all OMAP3 */
2965 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
2972 * Register hwmod links common to individual OMAP3 families, all
2973 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
2974 * All possible revisions should be included in this conditional.
2976 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
2977 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
2978 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
2979 h = omap34xx_hwmod_ocp_ifs;
2980 h_gp = omap34xx_gp_hwmod_ocp_ifs;
2981 h_sham = omap34xx_sham_hwmod_ocp_ifs;
2982 h_aes = omap34xx_aes_hwmod_ocp_ifs;
2983 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
2984 h = am35xx_hwmod_ocp_ifs;
2985 h_gp = am35xx_gp_hwmod_ocp_ifs;
2986 h_sham = am35xx_sham_hwmod_ocp_ifs;
2987 h_aes = am35xx_aes_hwmod_ocp_ifs;
2988 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
2989 rev == OMAP3630_REV_ES1_2) {
2990 h = omap36xx_hwmod_ocp_ifs;
2991 h_gp = omap36xx_gp_hwmod_ocp_ifs;
2992 h_sham = omap36xx_sham_hwmod_ocp_ifs;
2993 h_aes = omap36xx_aes_hwmod_ocp_ifs;
2995 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
2999 r = omap_hwmod_register_links(h);
3003 /* Register GP-only hwmod links. */
3004 if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
3005 r = omap_hwmod_register_links(h_gp);
3011 * Register crypto hwmod links only if they are not disabled in DT.
3012 * If DT information is missing, enable them only for GP devices.
3015 bus = of_find_node_by_name(NULL, "ocp");
3017 if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
3018 r = omap_hwmod_register_links(h_sham);
3023 if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
3024 r = omap_hwmod_register_links(h_aes);
3031 * Register hwmod links specific to certain ES levels of a
3032 * particular family of silicon (e.g., 34xx ES1.0)
3035 if (rev == OMAP3430_REV_ES1_0) {
3036 h = omap3430es1_hwmod_ocp_ifs;
3037 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3038 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3039 rev == OMAP3430_REV_ES3_1_2) {
3040 h = omap3430es2plus_hwmod_ocp_ifs;
3044 r = omap_hwmod_register_links(h);
3050 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3051 rev == OMAP3430_REV_ES2_1) {
3052 h = omap3430_pre_es3_hwmod_ocp_ifs;
3053 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3054 rev == OMAP3430_REV_ES3_1_2) {
3055 h = omap3430_es3plus_hwmod_ocp_ifs;
3059 r = omap_hwmod_register_links(h);
3064 * DSS code presumes that dss_core hwmod is handled first,
3065 * _before_ any other DSS related hwmods so register common
3066 * DSS hwmod links last to ensure that dss_core is already
3067 * registered. Otherwise some change things may happen, for
3068 * ex. if dispc is handled before dss_core and DSS is enabled
3069 * in bootloader DISPC will be reset with outputs enabled
3070 * which sometimes leads to unrecoverable L3 error. XXX The
3071 * long-term fix to this is to ensure hwmods are set up in
3072 * dependency order in the hwmod core code.
3074 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);