1 // SPDX-License-Identifier: GPL-2.0-only
3 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
5 * Copyright (C) 2009-2011 Nokia Corporation
6 * Copyright (C) 2012 Texas Instruments, Inc.
9 * The data in this file should be completely autogeneratable from
10 * the TI hardware database or other technical documentation.
12 * XXX these should be marked initdata for multi-OMAP kernels
15 #include <linux/platform_data/i2c-omap.h>
16 #include <linux/power/smartreflex.h>
17 #include <linux/platform_data/hsmmc-omap.h>
23 #include "omap_hwmod.h"
24 #include "omap_hwmod_common_data.h"
25 #include "prm-regbits-34xx.h"
26 #include "cm-regbits-34xx.h"
33 * OMAP3xxx hardware module integration data
35 * All of the data in this section should be autogeneratable from the
36 * TI hardware database or other technical documentation. Data that
37 * is driver-specific or driver-kernel integration-specific belongs
41 #define AM35XX_IPSS_USBOTGSS_BASE 0x5C040000
49 static struct omap_hwmod omap3xxx_l3_main_hwmod
= {
51 .class = &l3_hwmod_class
,
52 .flags
= HWMOD_NO_IDLEST
,
56 static struct omap_hwmod omap3xxx_l4_core_hwmod
= {
58 .class = &l4_hwmod_class
,
59 .flags
= HWMOD_NO_IDLEST
,
63 static struct omap_hwmod omap3xxx_l4_per_hwmod
= {
65 .class = &l4_hwmod_class
,
66 .flags
= HWMOD_NO_IDLEST
,
70 static struct omap_hwmod omap3xxx_l4_wkup_hwmod
= {
72 .class = &l4_hwmod_class
,
73 .flags
= HWMOD_NO_IDLEST
,
77 static struct omap_hwmod omap3xxx_l4_sec_hwmod
= {
79 .class = &l4_hwmod_class
,
80 .flags
= HWMOD_NO_IDLEST
,
85 static struct omap_hwmod omap3xxx_mpu_hwmod
= {
87 .class = &mpu_hwmod_class
,
88 .main_clk
= "arm_fck",
92 static struct omap_hwmod_rst_info omap3xxx_iva_resets
[] = {
93 { .name
= "logic", .rst_shift
= 0, .st_shift
= 8 },
94 { .name
= "seq0", .rst_shift
= 1, .st_shift
= 9 },
95 { .name
= "seq1", .rst_shift
= 2, .st_shift
= 10 },
98 static struct omap_hwmod omap3xxx_iva_hwmod
= {
100 .class = &iva_hwmod_class
,
101 .clkdm_name
= "iva2_clkdm",
102 .rst_lines
= omap3xxx_iva_resets
,
103 .rst_lines_cnt
= ARRAY_SIZE(omap3xxx_iva_resets
),
104 .main_clk
= "iva2_ck",
107 .module_offs
= OMAP3430_IVA2_MOD
,
109 .idlest_idle_bit
= OMAP3430_ST_IVA2_SHIFT
,
116 * debug and emulation sub system
119 static struct omap_hwmod_class omap3xxx_debugss_hwmod_class
= {
124 static struct omap_hwmod omap3xxx_debugss_hwmod
= {
126 .class = &omap3xxx_debugss_hwmod_class
,
127 .clkdm_name
= "emu_clkdm",
128 .main_clk
= "emu_src_ck",
129 .flags
= HWMOD_NO_IDLEST
,
133 static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc
= {
137 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_CLOCKACTIVITY
|
138 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
139 SYSC_HAS_EMUFREE
| SYSC_HAS_AUTOIDLE
|
140 SYSS_HAS_RESET_STATUS
),
141 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
142 .sysc_fields
= &omap_hwmod_sysc_type1
,
145 static struct omap_hwmod_class omap3xxx_timer_hwmod_class
= {
147 .sysc
= &omap3xxx_timer_sysc
,
151 static struct omap_hwmod omap3xxx_timer1_hwmod
= {
153 .main_clk
= "gpt1_fck",
156 .module_offs
= WKUP_MOD
,
158 .idlest_idle_bit
= OMAP3430_ST_GPT1_SHIFT
,
161 .class = &omap3xxx_timer_hwmod_class
,
162 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
166 static struct omap_hwmod omap3xxx_timer2_hwmod
= {
168 .main_clk
= "gpt2_fck",
171 .module_offs
= OMAP3430_PER_MOD
,
173 .idlest_idle_bit
= OMAP3430_ST_GPT2_SHIFT
,
176 .class = &omap3xxx_timer_hwmod_class
,
177 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
181 static struct omap_hwmod omap3xxx_timer3_hwmod
= {
183 .main_clk
= "gpt3_fck",
186 .module_offs
= OMAP3430_PER_MOD
,
188 .idlest_idle_bit
= OMAP3430_ST_GPT3_SHIFT
,
191 .class = &omap3xxx_timer_hwmod_class
,
192 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
196 static struct omap_hwmod omap3xxx_timer4_hwmod
= {
198 .main_clk
= "gpt4_fck",
201 .module_offs
= OMAP3430_PER_MOD
,
203 .idlest_idle_bit
= OMAP3430_ST_GPT4_SHIFT
,
206 .class = &omap3xxx_timer_hwmod_class
,
207 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
211 static struct omap_hwmod omap3xxx_timer5_hwmod
= {
213 .main_clk
= "gpt5_fck",
216 .module_offs
= OMAP3430_PER_MOD
,
218 .idlest_idle_bit
= OMAP3430_ST_GPT5_SHIFT
,
221 .class = &omap3xxx_timer_hwmod_class
,
222 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
226 static struct omap_hwmod omap3xxx_timer6_hwmod
= {
228 .main_clk
= "gpt6_fck",
231 .module_offs
= OMAP3430_PER_MOD
,
233 .idlest_idle_bit
= OMAP3430_ST_GPT6_SHIFT
,
236 .class = &omap3xxx_timer_hwmod_class
,
237 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
241 static struct omap_hwmod omap3xxx_timer7_hwmod
= {
243 .main_clk
= "gpt7_fck",
246 .module_offs
= OMAP3430_PER_MOD
,
248 .idlest_idle_bit
= OMAP3430_ST_GPT7_SHIFT
,
251 .class = &omap3xxx_timer_hwmod_class
,
252 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
256 static struct omap_hwmod omap3xxx_timer8_hwmod
= {
258 .main_clk
= "gpt8_fck",
261 .module_offs
= OMAP3430_PER_MOD
,
263 .idlest_idle_bit
= OMAP3430_ST_GPT8_SHIFT
,
266 .class = &omap3xxx_timer_hwmod_class
,
267 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
271 static struct omap_hwmod omap3xxx_timer9_hwmod
= {
273 .main_clk
= "gpt9_fck",
276 .module_offs
= OMAP3430_PER_MOD
,
278 .idlest_idle_bit
= OMAP3430_ST_GPT9_SHIFT
,
281 .class = &omap3xxx_timer_hwmod_class
,
282 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
286 static struct omap_hwmod omap3xxx_timer10_hwmod
= {
288 .main_clk
= "gpt10_fck",
291 .module_offs
= CORE_MOD
,
293 .idlest_idle_bit
= OMAP3430_ST_GPT10_SHIFT
,
296 .class = &omap3xxx_timer_hwmod_class
,
297 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
301 static struct omap_hwmod omap3xxx_timer11_hwmod
= {
303 .main_clk
= "gpt11_fck",
306 .module_offs
= CORE_MOD
,
308 .idlest_idle_bit
= OMAP3430_ST_GPT11_SHIFT
,
311 .class = &omap3xxx_timer_hwmod_class
,
312 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
316 static struct omap_hwmod omap3xxx_timer12_hwmod
= {
318 .main_clk
= "gpt12_fck",
321 .module_offs
= WKUP_MOD
,
323 .idlest_idle_bit
= OMAP3430_ST_GPT12_SHIFT
,
326 .class = &omap3xxx_timer_hwmod_class
,
327 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
332 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
336 static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc
= {
340 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_EMUFREE
|
341 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
342 SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
343 SYSS_HAS_RESET_STATUS
),
344 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
345 .sysc_fields
= &omap_hwmod_sysc_type1
,
349 static struct omap_hwmod_class_sysconfig i2c_sysc
= {
353 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
354 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
355 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
356 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
357 .sysc_fields
= &omap_hwmod_sysc_type1
,
360 static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class
= {
362 .sysc
= &omap3xxx_wd_timer_sysc
,
363 .pre_shutdown
= &omap2_wd_timer_disable
,
364 .reset
= &omap2_wd_timer_reset
,
367 static struct omap_hwmod omap3xxx_wd_timer2_hwmod
= {
369 .class = &omap3xxx_wd_timer_hwmod_class
,
370 .main_clk
= "wdt2_fck",
373 .module_offs
= WKUP_MOD
,
375 .idlest_idle_bit
= OMAP3430_ST_WDT2_SHIFT
,
379 * XXX: Use software supervised mode, HW supervised smartidle seems to
380 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
382 .flags
= HWMOD_SWSUP_SIDLE
,
386 static struct omap_hwmod omap3xxx_uart1_hwmod
= {
388 .main_clk
= "uart1_fck",
389 .flags
= DEBUG_TI81XXUART1_FLAGS
| HWMOD_SWSUP_SIDLE
,
392 .module_offs
= CORE_MOD
,
394 .idlest_idle_bit
= OMAP3430_EN_UART1_SHIFT
,
397 .class = &omap2_uart_class
,
401 static struct omap_hwmod omap3xxx_uart2_hwmod
= {
403 .main_clk
= "uart2_fck",
404 .flags
= DEBUG_TI81XXUART2_FLAGS
| HWMOD_SWSUP_SIDLE
,
407 .module_offs
= CORE_MOD
,
409 .idlest_idle_bit
= OMAP3430_EN_UART2_SHIFT
,
412 .class = &omap2_uart_class
,
416 static struct omap_hwmod omap3xxx_uart3_hwmod
= {
418 .main_clk
= "uart3_fck",
419 .flags
= DEBUG_OMAP3UART3_FLAGS
| DEBUG_TI81XXUART3_FLAGS
|
423 .module_offs
= OMAP3430_PER_MOD
,
425 .idlest_idle_bit
= OMAP3430_EN_UART3_SHIFT
,
428 .class = &omap2_uart_class
,
434 static struct omap_hwmod omap36xx_uart4_hwmod
= {
436 .main_clk
= "uart4_fck",
437 .flags
= DEBUG_OMAP3UART4_FLAGS
| HWMOD_SWSUP_SIDLE
,
440 .module_offs
= OMAP3430_PER_MOD
,
442 .idlest_idle_bit
= OMAP3630_EN_UART4_SHIFT
,
445 .class = &omap2_uart_class
,
451 * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
452 * uart2_fck being enabled. So we add uart1_fck as an optional clock,
453 * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
454 * should not be needed. The functional clock structure of the AM35xx
455 * UART4 is extremely unclear and opaque; it is unclear what the role
456 * of uart1/2_fck is for the UART4. Any clarification from either
457 * empirical testing or the AM3505/3517 hardware designers would be
460 static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks
[] = {
461 { .role
= "softreset_uart1_fck", .clk
= "uart1_fck" },
464 static struct omap_hwmod am35xx_uart4_hwmod
= {
466 .main_clk
= "uart4_fck",
469 .module_offs
= CORE_MOD
,
471 .idlest_idle_bit
= AM35XX_ST_UART4_SHIFT
,
474 .opt_clks
= am35xx_uart4_opt_clks
,
475 .opt_clks_cnt
= ARRAY_SIZE(am35xx_uart4_opt_clks
),
476 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
477 .class = &omap2_uart_class
,
480 static struct omap_hwmod_class i2c_class
= {
483 .reset
= &omap_i2c_reset
,
487 static struct omap_hwmod_opt_clk dss_opt_clks
[] = {
489 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
490 * driver does not use these clocks.
492 { .role
= "sys_clk", .clk
= "dss2_alwon_fck" },
493 { .role
= "tv_clk", .clk
= "dss_tv_fck" },
494 /* required only on OMAP3430 */
495 { .role
= "tv_dac_clk", .clk
= "dss_96m_fck" },
498 static struct omap_hwmod omap3430es1_dss_core_hwmod
= {
500 .class = &omap2_dss_hwmod_class
,
501 .main_clk
= "dss1_alwon_fck", /* instead of dss_fck */
504 .module_offs
= OMAP3430_DSS_MOD
,
508 .opt_clks
= dss_opt_clks
,
509 .opt_clks_cnt
= ARRAY_SIZE(dss_opt_clks
),
510 .flags
= HWMOD_NO_IDLEST
| HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
513 static struct omap_hwmod omap3xxx_dss_core_hwmod
= {
515 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
516 .class = &omap2_dss_hwmod_class
,
517 .main_clk
= "dss1_alwon_fck", /* instead of dss_fck */
520 .module_offs
= OMAP3430_DSS_MOD
,
522 .idlest_idle_bit
= OMAP3430ES2_ST_DSS_IDLE_SHIFT
,
525 .opt_clks
= dss_opt_clks
,
526 .opt_clks_cnt
= ARRAY_SIZE(dss_opt_clks
),
534 static struct omap_hwmod_class_sysconfig omap3_dispc_sysc
= {
538 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
|
539 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
541 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
542 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
543 .sysc_fields
= &omap_hwmod_sysc_type1
,
546 static struct omap_hwmod_class omap3_dispc_hwmod_class
= {
548 .sysc
= &omap3_dispc_sysc
,
551 static struct omap_hwmod omap3xxx_dss_dispc_hwmod
= {
553 .class = &omap3_dispc_hwmod_class
,
554 .main_clk
= "dss1_alwon_fck",
557 .module_offs
= OMAP3430_DSS_MOD
,
560 .flags
= HWMOD_NO_IDLEST
,
561 .dev_attr
= &omap2_3_dss_dispc_dev_attr
,
566 * display serial interface controller
569 static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc
= {
573 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
574 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
|
575 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
576 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
577 .sysc_fields
= &omap_hwmod_sysc_type1
,
580 static struct omap_hwmod_class omap3xxx_dsi_hwmod_class
= {
582 .sysc
= &omap3xxx_dsi_sysc
,
586 static struct omap_hwmod_opt_clk dss_dsi1_opt_clks
[] = {
587 { .role
= "sys_clk", .clk
= "dss2_alwon_fck" },
590 static struct omap_hwmod omap3xxx_dss_dsi1_hwmod
= {
592 .class = &omap3xxx_dsi_hwmod_class
,
593 .main_clk
= "dss1_alwon_fck",
596 .module_offs
= OMAP3430_DSS_MOD
,
599 .opt_clks
= dss_dsi1_opt_clks
,
600 .opt_clks_cnt
= ARRAY_SIZE(dss_dsi1_opt_clks
),
601 .flags
= HWMOD_NO_IDLEST
,
604 static struct omap_hwmod_opt_clk dss_rfbi_opt_clks
[] = {
605 { .role
= "ick", .clk
= "dss_ick" },
608 static struct omap_hwmod omap3xxx_dss_rfbi_hwmod
= {
610 .class = &omap2_rfbi_hwmod_class
,
611 .main_clk
= "dss1_alwon_fck",
614 .module_offs
= OMAP3430_DSS_MOD
,
617 .opt_clks
= dss_rfbi_opt_clks
,
618 .opt_clks_cnt
= ARRAY_SIZE(dss_rfbi_opt_clks
),
619 .flags
= HWMOD_NO_IDLEST
,
622 static struct omap_hwmod_opt_clk dss_venc_opt_clks
[] = {
623 /* required only on OMAP3430 */
624 { .role
= "tv_dac_clk", .clk
= "dss_96m_fck" },
627 static struct omap_hwmod omap3xxx_dss_venc_hwmod
= {
629 .class = &omap2_venc_hwmod_class
,
630 .main_clk
= "dss_tv_fck",
633 .module_offs
= OMAP3430_DSS_MOD
,
636 .opt_clks
= dss_venc_opt_clks
,
637 .opt_clks_cnt
= ARRAY_SIZE(dss_venc_opt_clks
),
638 .flags
= HWMOD_NO_IDLEST
,
642 static struct omap_hwmod omap3xxx_i2c1_hwmod
= {
644 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
645 .main_clk
= "i2c1_fck",
648 .module_offs
= CORE_MOD
,
650 .idlest_idle_bit
= OMAP3430_ST_I2C1_SHIFT
,
657 static struct omap_hwmod omap3xxx_i2c2_hwmod
= {
659 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
660 .main_clk
= "i2c2_fck",
663 .module_offs
= CORE_MOD
,
665 .idlest_idle_bit
= OMAP3430_ST_I2C2_SHIFT
,
672 static struct omap_hwmod omap3xxx_i2c3_hwmod
= {
674 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
675 .main_clk
= "i2c3_fck",
678 .module_offs
= CORE_MOD
,
680 .idlest_idle_bit
= OMAP3430_ST_I2C3_SHIFT
,
688 * general purpose io module
691 static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc
= {
695 .sysc_flags
= (SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
|
696 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
697 SYSS_HAS_RESET_STATUS
),
698 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
699 .sysc_fields
= &omap_hwmod_sysc_type1
,
702 static struct omap_hwmod_class omap3xxx_gpio_hwmod_class
= {
704 .sysc
= &omap3xxx_gpio_sysc
,
708 static struct omap_hwmod_opt_clk gpio1_opt_clks
[] = {
709 { .role
= "dbclk", .clk
= "gpio1_dbck", },
712 static struct omap_hwmod omap3xxx_gpio1_hwmod
= {
714 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
715 .main_clk
= "gpio1_ick",
716 .opt_clks
= gpio1_opt_clks
,
717 .opt_clks_cnt
= ARRAY_SIZE(gpio1_opt_clks
),
720 .module_offs
= WKUP_MOD
,
722 .idlest_idle_bit
= OMAP3430_ST_GPIO1_SHIFT
,
725 .class = &omap3xxx_gpio_hwmod_class
,
729 static struct omap_hwmod_opt_clk gpio2_opt_clks
[] = {
730 { .role
= "dbclk", .clk
= "gpio2_dbck", },
733 static struct omap_hwmod omap3xxx_gpio2_hwmod
= {
735 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
736 .main_clk
= "gpio2_ick",
737 .opt_clks
= gpio2_opt_clks
,
738 .opt_clks_cnt
= ARRAY_SIZE(gpio2_opt_clks
),
741 .module_offs
= OMAP3430_PER_MOD
,
743 .idlest_idle_bit
= OMAP3430_ST_GPIO2_SHIFT
,
746 .class = &omap3xxx_gpio_hwmod_class
,
750 static struct omap_hwmod_opt_clk gpio3_opt_clks
[] = {
751 { .role
= "dbclk", .clk
= "gpio3_dbck", },
754 static struct omap_hwmod omap3xxx_gpio3_hwmod
= {
756 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
757 .main_clk
= "gpio3_ick",
758 .opt_clks
= gpio3_opt_clks
,
759 .opt_clks_cnt
= ARRAY_SIZE(gpio3_opt_clks
),
762 .module_offs
= OMAP3430_PER_MOD
,
764 .idlest_idle_bit
= OMAP3430_ST_GPIO3_SHIFT
,
767 .class = &omap3xxx_gpio_hwmod_class
,
771 static struct omap_hwmod_opt_clk gpio4_opt_clks
[] = {
772 { .role
= "dbclk", .clk
= "gpio4_dbck", },
775 static struct omap_hwmod omap3xxx_gpio4_hwmod
= {
777 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
778 .main_clk
= "gpio4_ick",
779 .opt_clks
= gpio4_opt_clks
,
780 .opt_clks_cnt
= ARRAY_SIZE(gpio4_opt_clks
),
783 .module_offs
= OMAP3430_PER_MOD
,
785 .idlest_idle_bit
= OMAP3430_ST_GPIO4_SHIFT
,
788 .class = &omap3xxx_gpio_hwmod_class
,
793 static struct omap_hwmod_opt_clk gpio5_opt_clks
[] = {
794 { .role
= "dbclk", .clk
= "gpio5_dbck", },
797 static struct omap_hwmod omap3xxx_gpio5_hwmod
= {
799 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
800 .main_clk
= "gpio5_ick",
801 .opt_clks
= gpio5_opt_clks
,
802 .opt_clks_cnt
= ARRAY_SIZE(gpio5_opt_clks
),
805 .module_offs
= OMAP3430_PER_MOD
,
807 .idlest_idle_bit
= OMAP3430_ST_GPIO5_SHIFT
,
810 .class = &omap3xxx_gpio_hwmod_class
,
815 static struct omap_hwmod_opt_clk gpio6_opt_clks
[] = {
816 { .role
= "dbclk", .clk
= "gpio6_dbck", },
819 static struct omap_hwmod omap3xxx_gpio6_hwmod
= {
821 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
822 .main_clk
= "gpio6_ick",
823 .opt_clks
= gpio6_opt_clks
,
824 .opt_clks_cnt
= ARRAY_SIZE(gpio6_opt_clks
),
827 .module_offs
= OMAP3430_PER_MOD
,
829 .idlest_idle_bit
= OMAP3430_ST_GPIO6_SHIFT
,
832 .class = &omap3xxx_gpio_hwmod_class
,
837 * multi channel buffered serial port controller
840 static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc
= {
843 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_ENAWAKEUP
|
844 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
),
845 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
846 .sysc_fields
= &omap_hwmod_sysc_type1
,
849 static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class
= {
851 .sysc
= &omap3xxx_mcbsp_sysc
,
854 /* McBSP functional clock mapping */
855 static struct omap_hwmod_opt_clk mcbsp15_opt_clks
[] = {
856 { .role
= "pad_fck", .clk
= "mcbsp_clks" },
857 { .role
= "prcm_fck", .clk
= "core_96m_fck" },
860 static struct omap_hwmod_opt_clk mcbsp234_opt_clks
[] = {
861 { .role
= "pad_fck", .clk
= "mcbsp_clks" },
862 { .role
= "prcm_fck", .clk
= "per_96m_fck" },
866 static struct omap_hwmod omap3xxx_mcbsp1_hwmod
= {
868 .class = &omap3xxx_mcbsp_hwmod_class
,
869 .main_clk
= "mcbsp1_fck",
872 .module_offs
= CORE_MOD
,
874 .idlest_idle_bit
= OMAP3430_ST_MCBSP1_SHIFT
,
877 .opt_clks
= mcbsp15_opt_clks
,
878 .opt_clks_cnt
= ARRAY_SIZE(mcbsp15_opt_clks
),
882 static struct omap_hwmod omap3xxx_mcbsp2_hwmod
= {
884 .class = &omap3xxx_mcbsp_hwmod_class
,
885 .main_clk
= "mcbsp2_fck",
888 .module_offs
= OMAP3430_PER_MOD
,
890 .idlest_idle_bit
= OMAP3430_ST_MCBSP2_SHIFT
,
893 .opt_clks
= mcbsp234_opt_clks
,
894 .opt_clks_cnt
= ARRAY_SIZE(mcbsp234_opt_clks
),
898 static struct omap_hwmod omap3xxx_mcbsp3_hwmod
= {
900 .class = &omap3xxx_mcbsp_hwmod_class
,
901 .main_clk
= "mcbsp3_fck",
904 .module_offs
= OMAP3430_PER_MOD
,
906 .idlest_idle_bit
= OMAP3430_ST_MCBSP3_SHIFT
,
909 .opt_clks
= mcbsp234_opt_clks
,
910 .opt_clks_cnt
= ARRAY_SIZE(mcbsp234_opt_clks
),
914 static struct omap_hwmod omap3xxx_mcbsp4_hwmod
= {
916 .class = &omap3xxx_mcbsp_hwmod_class
,
917 .main_clk
= "mcbsp4_fck",
920 .module_offs
= OMAP3430_PER_MOD
,
922 .idlest_idle_bit
= OMAP3430_ST_MCBSP4_SHIFT
,
925 .opt_clks
= mcbsp234_opt_clks
,
926 .opt_clks_cnt
= ARRAY_SIZE(mcbsp234_opt_clks
),
930 static struct omap_hwmod omap3xxx_mcbsp5_hwmod
= {
932 .class = &omap3xxx_mcbsp_hwmod_class
,
933 .main_clk
= "mcbsp5_fck",
936 .module_offs
= CORE_MOD
,
938 .idlest_idle_bit
= OMAP3430_ST_MCBSP5_SHIFT
,
941 .opt_clks
= mcbsp15_opt_clks
,
942 .opt_clks_cnt
= ARRAY_SIZE(mcbsp15_opt_clks
),
945 /* 'mcbsp sidetone' class */
946 static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc
= {
949 .sysc_flags
= SYSC_HAS_AUTOIDLE
,
950 .sysc_fields
= &omap_hwmod_sysc_type1
,
953 static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class
= {
954 .name
= "mcbsp_sidetone",
955 .sysc
= &omap3xxx_mcbsp_sidetone_sysc
,
958 /* mcbsp2_sidetone */
959 static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod
= {
960 .name
= "mcbsp2_sidetone",
961 .class = &omap3xxx_mcbsp_sidetone_hwmod_class
,
962 .main_clk
= "mcbsp2_ick",
963 .flags
= HWMOD_NO_IDLEST
,
966 /* mcbsp3_sidetone */
967 static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod
= {
968 .name
= "mcbsp3_sidetone",
969 .class = &omap3xxx_mcbsp_sidetone_hwmod_class
,
970 .main_clk
= "mcbsp3_ick",
971 .flags
= HWMOD_NO_IDLEST
,
975 static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc
= {
978 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_NO_CACHE
),
979 .sysc_fields
= &omap34xx_sr_sysc_fields
,
982 static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class
= {
983 .name
= "smartreflex",
984 .sysc
= &omap34xx_sr_sysc
,
987 static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc
= {
990 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
991 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_ENAWAKEUP
|
993 .sysc_fields
= &omap36xx_sr_sysc_fields
,
996 static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class
= {
997 .name
= "smartreflex",
998 .sysc
= &omap36xx_sr_sysc
,
1002 static struct omap_smartreflex_dev_attr sr1_dev_attr
= {
1003 .sensor_voltdm_name
= "mpu_iva",
1007 static struct omap_hwmod omap34xx_sr1_hwmod
= {
1008 .name
= "smartreflex_mpu_iva",
1009 .class = &omap34xx_smartreflex_hwmod_class
,
1010 .main_clk
= "sr1_fck",
1013 .module_offs
= WKUP_MOD
,
1015 .idlest_idle_bit
= OMAP3430_EN_SR1_SHIFT
,
1018 .dev_attr
= &sr1_dev_attr
,
1019 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
1022 static struct omap_hwmod omap36xx_sr1_hwmod
= {
1023 .name
= "smartreflex_mpu_iva",
1024 .class = &omap36xx_smartreflex_hwmod_class
,
1025 .main_clk
= "sr1_fck",
1028 .module_offs
= WKUP_MOD
,
1030 .idlest_idle_bit
= OMAP3430_EN_SR1_SHIFT
,
1033 .dev_attr
= &sr1_dev_attr
,
1037 static struct omap_smartreflex_dev_attr sr2_dev_attr
= {
1038 .sensor_voltdm_name
= "core",
1042 static struct omap_hwmod omap34xx_sr2_hwmod
= {
1043 .name
= "smartreflex_core",
1044 .class = &omap34xx_smartreflex_hwmod_class
,
1045 .main_clk
= "sr2_fck",
1048 .module_offs
= WKUP_MOD
,
1050 .idlest_idle_bit
= OMAP3430_EN_SR2_SHIFT
,
1053 .dev_attr
= &sr2_dev_attr
,
1054 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
1057 static struct omap_hwmod omap36xx_sr2_hwmod
= {
1058 .name
= "smartreflex_core",
1059 .class = &omap36xx_smartreflex_hwmod_class
,
1060 .main_clk
= "sr2_fck",
1063 .module_offs
= WKUP_MOD
,
1065 .idlest_idle_bit
= OMAP3430_EN_SR2_SHIFT
,
1068 .dev_attr
= &sr2_dev_attr
,
1073 * mailbox module allowing communication between the on-chip processors
1074 * using a queued mailbox-interrupt mechanism.
1077 static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc
= {
1081 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1082 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
),
1083 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1084 .sysc_fields
= &omap_hwmod_sysc_type1
,
1087 static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class
= {
1089 .sysc
= &omap3xxx_mailbox_sysc
,
1092 static struct omap_hwmod omap3xxx_mailbox_hwmod
= {
1094 .class = &omap3xxx_mailbox_hwmod_class
,
1095 .main_clk
= "mailboxes_ick",
1098 .module_offs
= CORE_MOD
,
1100 .idlest_idle_bit
= OMAP3430_ST_MAILBOXES_SHIFT
,
1107 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1111 static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc
= {
1113 .sysc_offs
= 0x0010,
1114 .syss_offs
= 0x0014,
1115 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1116 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1117 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
1118 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1119 .sysc_fields
= &omap_hwmod_sysc_type1
,
1122 static struct omap_hwmod_class omap34xx_mcspi_class
= {
1124 .sysc
= &omap34xx_mcspi_sysc
,
1128 static struct omap_hwmod omap34xx_mcspi1
= {
1130 .main_clk
= "mcspi1_fck",
1133 .module_offs
= CORE_MOD
,
1135 .idlest_idle_bit
= OMAP3430_ST_MCSPI1_SHIFT
,
1138 .class = &omap34xx_mcspi_class
,
1142 static struct omap_hwmod omap34xx_mcspi2
= {
1144 .main_clk
= "mcspi2_fck",
1147 .module_offs
= CORE_MOD
,
1149 .idlest_idle_bit
= OMAP3430_ST_MCSPI2_SHIFT
,
1152 .class = &omap34xx_mcspi_class
,
1156 static struct omap_hwmod omap34xx_mcspi3
= {
1158 .main_clk
= "mcspi3_fck",
1161 .module_offs
= CORE_MOD
,
1163 .idlest_idle_bit
= OMAP3430_ST_MCSPI3_SHIFT
,
1166 .class = &omap34xx_mcspi_class
,
1170 static struct omap_hwmod omap34xx_mcspi4
= {
1172 .main_clk
= "mcspi4_fck",
1175 .module_offs
= CORE_MOD
,
1177 .idlest_idle_bit
= OMAP3430_ST_MCSPI4_SHIFT
,
1180 .class = &omap34xx_mcspi_class
,
1184 static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc
= {
1186 .sysc_offs
= 0x0404,
1187 .syss_offs
= 0x0408,
1188 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
|
1189 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1191 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1192 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
1193 .sysc_fields
= &omap_hwmod_sysc_type1
,
1196 static struct omap_hwmod_class usbotg_class
= {
1198 .sysc
= &omap3xxx_usbhsotg_sysc
,
1203 static struct omap_hwmod omap3xxx_usbhsotg_hwmod
= {
1204 .name
= "usb_otg_hs",
1205 .main_clk
= "hsotgusb_ick",
1208 .module_offs
= CORE_MOD
,
1210 .idlest_idle_bit
= OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT
,
1213 .class = &usbotg_class
,
1216 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1217 * broken when autoidle is enabled
1218 * workaround is to disable the autoidle bit at module level.
1220 * Enabling the device in any other MIDLEMODE setting but force-idle
1221 * causes core_pwrdm not enter idle states at least on OMAP3630.
1222 * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY
1223 * signal when MIDLEMODE is set to force-idle.
1225 .flags
= HWMOD_NO_OCP_AUTOIDLE
| HWMOD_SWSUP_SIDLE
|
1226 HWMOD_FORCE_MSTANDBY
| HWMOD_RECONFIG_IO_CHAIN
,
1231 static struct omap_hwmod_class am35xx_usbotg_class
= {
1232 .name
= "am35xx_usbotg",
1235 static struct omap_hwmod am35xx_usbhsotg_hwmod
= {
1236 .name
= "am35x_otg_hs",
1237 .main_clk
= "hsotgusb_fck",
1238 .class = &am35xx_usbotg_class
,
1239 .flags
= HWMOD_NO_IDLEST
,
1242 /* MMC/SD/SDIO common */
1243 static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc
= {
1247 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1248 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1249 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
1250 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1251 .sysc_fields
= &omap_hwmod_sysc_type1
,
1254 static struct omap_hwmod_class omap34xx_mmc_class
= {
1256 .sysc
= &omap34xx_mmc_sysc
,
1263 static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks
[] = {
1264 { .role
= "dbck", .clk
= "omap_32k_fck", },
1267 static struct omap_hsmmc_dev_attr mmc1_dev_attr
= {
1268 .flags
= OMAP_HSMMC_SUPPORTS_DUAL_VOLT
,
1271 /* See 35xx errata 2.1.1.128 in SPRZ278F */
1272 static struct omap_hsmmc_dev_attr mmc1_pre_es3_dev_attr
= {
1273 .flags
= (OMAP_HSMMC_SUPPORTS_DUAL_VOLT
|
1274 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ
),
1277 static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod
= {
1279 .opt_clks
= omap34xx_mmc1_opt_clks
,
1280 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc1_opt_clks
),
1281 .main_clk
= "mmchs1_fck",
1284 .module_offs
= CORE_MOD
,
1286 .idlest_idle_bit
= OMAP3430_ST_MMC1_SHIFT
,
1289 .dev_attr
= &mmc1_pre_es3_dev_attr
,
1290 .class = &omap34xx_mmc_class
,
1293 static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod
= {
1295 .opt_clks
= omap34xx_mmc1_opt_clks
,
1296 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc1_opt_clks
),
1297 .main_clk
= "mmchs1_fck",
1300 .module_offs
= CORE_MOD
,
1302 .idlest_idle_bit
= OMAP3430_ST_MMC1_SHIFT
,
1305 .dev_attr
= &mmc1_dev_attr
,
1306 .class = &omap34xx_mmc_class
,
1313 static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks
[] = {
1314 { .role
= "dbck", .clk
= "omap_32k_fck", },
1317 /* See 35xx errata 2.1.1.128 in SPRZ278F */
1318 static struct omap_hsmmc_dev_attr mmc2_pre_es3_dev_attr
= {
1319 .flags
= OMAP_HSMMC_BROKEN_MULTIBLOCK_READ
,
1322 static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod
= {
1324 .opt_clks
= omap34xx_mmc2_opt_clks
,
1325 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc2_opt_clks
),
1326 .main_clk
= "mmchs2_fck",
1329 .module_offs
= CORE_MOD
,
1331 .idlest_idle_bit
= OMAP3430_ST_MMC2_SHIFT
,
1334 .dev_attr
= &mmc2_pre_es3_dev_attr
,
1335 .class = &omap34xx_mmc_class
,
1338 static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod
= {
1340 .opt_clks
= omap34xx_mmc2_opt_clks
,
1341 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc2_opt_clks
),
1342 .main_clk
= "mmchs2_fck",
1345 .module_offs
= CORE_MOD
,
1347 .idlest_idle_bit
= OMAP3430_ST_MMC2_SHIFT
,
1350 .class = &omap34xx_mmc_class
,
1357 static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks
[] = {
1358 { .role
= "dbck", .clk
= "omap_32k_fck", },
1361 static struct omap_hwmod omap3xxx_mmc3_hwmod
= {
1363 .opt_clks
= omap34xx_mmc3_opt_clks
,
1364 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc3_opt_clks
),
1365 .main_clk
= "mmchs3_fck",
1368 .module_offs
= CORE_MOD
,
1370 .idlest_idle_bit
= OMAP3430_ST_MMC3_SHIFT
,
1373 .class = &omap34xx_mmc_class
,
1377 * 'usb_host_hs' class
1378 * high-speed multi-port usb host controller
1381 static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc
= {
1383 .sysc_offs
= 0x0010,
1384 .syss_offs
= 0x0014,
1385 .sysc_flags
= (SYSC_HAS_MIDLEMODE
| SYSC_HAS_CLOCKACTIVITY
|
1386 SYSC_HAS_SIDLEMODE
| SYSC_HAS_ENAWAKEUP
|
1387 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
1388 SYSS_HAS_RESET_STATUS
),
1389 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1390 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
1391 .sysc_fields
= &omap_hwmod_sysc_type1
,
1394 static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class
= {
1395 .name
= "usb_host_hs",
1396 .sysc
= &omap3xxx_usb_host_hs_sysc
,
1400 static struct omap_hwmod omap3xxx_usb_host_hs_hwmod
= {
1401 .name
= "usb_host_hs",
1402 .class = &omap3xxx_usb_host_hs_hwmod_class
,
1403 .clkdm_name
= "usbhost_clkdm",
1404 .main_clk
= "usbhost_48m_fck",
1407 .module_offs
= OMAP3430ES2_USBHOST_MOD
,
1409 .idlest_idle_bit
= OMAP3430ES2_ST_USBHOST_IDLE_SHIFT
,
1414 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1418 * In the following configuration :
1419 * - USBHOST module is set to smart-idle mode
1420 * - PRCM asserts idle_req to the USBHOST module ( This typically
1421 * happens when the system is going to a low power mode : all ports
1422 * have been suspended, the master part of the USBHOST module has
1423 * entered the standby state, and SW has cut the functional clocks)
1424 * - an USBHOST interrupt occurs before the module is able to answer
1425 * idle_ack, typically a remote wakeup IRQ.
1426 * Then the USB HOST module will enter a deadlock situation where it
1427 * is no more accessible nor functional.
1430 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1434 * Errata: USB host EHCI may stall when entering smart-standby mode
1438 * When the USBHOST module is set to smart-standby mode, and when it is
1439 * ready to enter the standby state (i.e. all ports are suspended and
1440 * all attached devices are in suspend mode), then it can wrongly assert
1441 * the Mstandby signal too early while there are still some residual OCP
1442 * transactions ongoing. If this condition occurs, the internal state
1443 * machine may go to an undefined state and the USB link may be stuck
1444 * upon the next resume.
1447 * Don't use smart standby; use only force standby,
1448 * hence HWMOD_SWSUP_MSTANDBY
1451 .flags
= HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
,
1455 * 'usb_tll_hs' class
1456 * usb_tll_hs module is the adapter on the usb_host_hs ports
1458 static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc
= {
1460 .sysc_offs
= 0x0010,
1461 .syss_offs
= 0x0014,
1462 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1463 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1465 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1466 .sysc_fields
= &omap_hwmod_sysc_type1
,
1469 static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class
= {
1470 .name
= "usb_tll_hs",
1471 .sysc
= &omap3xxx_usb_tll_hs_sysc
,
1475 static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod
= {
1476 .name
= "usb_tll_hs",
1477 .class = &omap3xxx_usb_tll_hs_hwmod_class
,
1478 .clkdm_name
= "core_l4_clkdm",
1479 .main_clk
= "usbtll_fck",
1482 .module_offs
= CORE_MOD
,
1484 .idlest_idle_bit
= OMAP3430ES2_ST_USBTLL_SHIFT
,
1489 static struct omap_hwmod omap3xxx_hdq1w_hwmod
= {
1491 .main_clk
= "hdq_fck",
1494 .module_offs
= CORE_MOD
,
1496 .idlest_idle_bit
= OMAP3430_ST_HDQ_SHIFT
,
1499 .class = &omap2_hdq1w_class
,
1503 static struct omap_hwmod_rst_info omap3xxx_sad2d_resets
[] = {
1504 { .name
= "rst_modem_pwron_sw", .rst_shift
= 0 },
1505 { .name
= "rst_modem_sw", .rst_shift
= 1 },
1508 static struct omap_hwmod_class omap3xxx_sad2d_class
= {
1512 static struct omap_hwmod omap3xxx_sad2d_hwmod
= {
1514 .rst_lines
= omap3xxx_sad2d_resets
,
1515 .rst_lines_cnt
= ARRAY_SIZE(omap3xxx_sad2d_resets
),
1516 .main_clk
= "sad2d_ick",
1519 .module_offs
= CORE_MOD
,
1521 .idlest_idle_bit
= OMAP3430_ST_SAD2D_SHIFT
,
1524 .class = &omap3xxx_sad2d_class
,
1528 * '32K sync counter' class
1529 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
1531 static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc
= {
1533 .sysc_offs
= 0x0004,
1534 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
1535 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
),
1536 .sysc_fields
= &omap_hwmod_sysc_type1
,
1539 static struct omap_hwmod_class omap3xxx_counter_hwmod_class
= {
1541 .sysc
= &omap3xxx_counter_sysc
,
1544 static struct omap_hwmod omap3xxx_counter_32k_hwmod
= {
1545 .name
= "counter_32k",
1546 .class = &omap3xxx_counter_hwmod_class
,
1547 .clkdm_name
= "wkup_clkdm",
1548 .flags
= HWMOD_SWSUP_SIDLE
,
1549 .main_clk
= "wkup_32k_fck",
1552 .module_offs
= WKUP_MOD
,
1554 .idlest_idle_bit
= OMAP3430_ST_32KSYNC_SHIFT
,
1561 * general purpose memory controller
1564 static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc
= {
1566 .sysc_offs
= 0x0010,
1567 .syss_offs
= 0x0014,
1568 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_SIDLEMODE
|
1569 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
1570 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1571 .sysc_fields
= &omap_hwmod_sysc_type1
,
1574 static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class
= {
1576 .sysc
= &omap3xxx_gpmc_sysc
,
1579 static struct omap_hwmod omap3xxx_gpmc_hwmod
= {
1581 .class = &omap3xxx_gpmc_hwmod_class
,
1582 .clkdm_name
= "core_l3_clkdm",
1583 .main_clk
= "gpmc_fck",
1584 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
1585 .flags
= HWMOD_NO_IDLEST
| DEBUG_OMAP_GPMC_HWMOD_FLAGS
,
1592 /* L3 -> L4_CORE interface */
1593 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core
= {
1594 .master
= &omap3xxx_l3_main_hwmod
,
1595 .slave
= &omap3xxx_l4_core_hwmod
,
1596 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1599 /* L3 -> L4_PER interface */
1600 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per
= {
1601 .master
= &omap3xxx_l3_main_hwmod
,
1602 .slave
= &omap3xxx_l4_per_hwmod
,
1603 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1607 /* MPU -> L3 interface */
1608 static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main
= {
1609 .master
= &omap3xxx_mpu_hwmod
,
1610 .slave
= &omap3xxx_l3_main_hwmod
,
1611 .user
= OCP_USER_MPU
,
1616 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss
= {
1617 .master
= &omap3xxx_l3_main_hwmod
,
1618 .slave
= &omap3xxx_debugss_hwmod
,
1619 .user
= OCP_USER_MPU
,
1623 static struct omap_hwmod_ocp_if omap3430es1_dss__l3
= {
1624 .master
= &omap3430es1_dss_core_hwmod
,
1625 .slave
= &omap3xxx_l3_main_hwmod
,
1626 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1629 static struct omap_hwmod_ocp_if omap3xxx_dss__l3
= {
1630 .master
= &omap3xxx_dss_core_hwmod
,
1631 .slave
= &omap3xxx_l3_main_hwmod
,
1634 .l3_perm_bit
= OMAP3_L3_CORE_FW_INIT_ID_DSS
,
1635 .flags
= OMAP_FIREWALL_L3
,
1638 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1641 /* l3_core -> usbhsotg interface */
1642 static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3
= {
1643 .master
= &omap3xxx_usbhsotg_hwmod
,
1644 .slave
= &omap3xxx_l3_main_hwmod
,
1645 .clk
= "core_l3_ick",
1646 .user
= OCP_USER_MPU
,
1649 /* l3_core -> am35xx_usbhsotg interface */
1650 static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3
= {
1651 .master
= &am35xx_usbhsotg_hwmod
,
1652 .slave
= &omap3xxx_l3_main_hwmod
,
1653 .clk
= "hsotgusb_ick",
1654 .user
= OCP_USER_MPU
,
1657 /* l3_core -> sad2d interface */
1658 static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3
= {
1659 .master
= &omap3xxx_sad2d_hwmod
,
1660 .slave
= &omap3xxx_l3_main_hwmod
,
1661 .clk
= "core_l3_ick",
1662 .user
= OCP_USER_MPU
,
1665 /* L4_CORE -> L4_WKUP interface */
1666 static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup
= {
1667 .master
= &omap3xxx_l4_core_hwmod
,
1668 .slave
= &omap3xxx_l4_wkup_hwmod
,
1669 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1672 /* L4 CORE -> MMC1 interface */
1673 static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1
= {
1674 .master
= &omap3xxx_l4_core_hwmod
,
1675 .slave
= &omap3xxx_pre_es3_mmc1_hwmod
,
1676 .clk
= "mmchs1_ick",
1677 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1678 .flags
= OMAP_FIREWALL_L4
,
1681 static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1
= {
1682 .master
= &omap3xxx_l4_core_hwmod
,
1683 .slave
= &omap3xxx_es3plus_mmc1_hwmod
,
1684 .clk
= "mmchs1_ick",
1685 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1686 .flags
= OMAP_FIREWALL_L4
,
1689 /* L4 CORE -> MMC2 interface */
1690 static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2
= {
1691 .master
= &omap3xxx_l4_core_hwmod
,
1692 .slave
= &omap3xxx_pre_es3_mmc2_hwmod
,
1693 .clk
= "mmchs2_ick",
1694 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1695 .flags
= OMAP_FIREWALL_L4
,
1698 static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2
= {
1699 .master
= &omap3xxx_l4_core_hwmod
,
1700 .slave
= &omap3xxx_es3plus_mmc2_hwmod
,
1701 .clk
= "mmchs2_ick",
1702 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1703 .flags
= OMAP_FIREWALL_L4
,
1706 /* L4 CORE -> MMC3 interface */
1708 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3
= {
1709 .master
= &omap3xxx_l4_core_hwmod
,
1710 .slave
= &omap3xxx_mmc3_hwmod
,
1711 .clk
= "mmchs3_ick",
1712 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1713 .flags
= OMAP_FIREWALL_L4
,
1716 /* L4 CORE -> UART1 interface */
1718 static struct omap_hwmod_ocp_if omap3_l4_core__uart1
= {
1719 .master
= &omap3xxx_l4_core_hwmod
,
1720 .slave
= &omap3xxx_uart1_hwmod
,
1722 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1725 /* L4 CORE -> UART2 interface */
1727 static struct omap_hwmod_ocp_if omap3_l4_core__uart2
= {
1728 .master
= &omap3xxx_l4_core_hwmod
,
1729 .slave
= &omap3xxx_uart2_hwmod
,
1731 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1734 /* L4 PER -> UART3 interface */
1736 static struct omap_hwmod_ocp_if omap3_l4_per__uart3
= {
1737 .master
= &omap3xxx_l4_per_hwmod
,
1738 .slave
= &omap3xxx_uart3_hwmod
,
1740 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1743 /* L4 PER -> UART4 interface */
1745 static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4
= {
1746 .master
= &omap3xxx_l4_per_hwmod
,
1747 .slave
= &omap36xx_uart4_hwmod
,
1749 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1752 /* AM35xx: L4 CORE -> UART4 interface */
1754 static struct omap_hwmod_ocp_if am35xx_l4_core__uart4
= {
1755 .master
= &omap3xxx_l4_core_hwmod
,
1756 .slave
= &am35xx_uart4_hwmod
,
1758 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1761 /* L4 CORE -> I2C1 interface */
1762 static struct omap_hwmod_ocp_if omap3_l4_core__i2c1
= {
1763 .master
= &omap3xxx_l4_core_hwmod
,
1764 .slave
= &omap3xxx_i2c1_hwmod
,
1768 .l4_fw_region
= OMAP3_L4_CORE_FW_I2C1_REGION
,
1770 .flags
= OMAP_FIREWALL_L4
,
1773 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1776 /* L4 CORE -> I2C2 interface */
1777 static struct omap_hwmod_ocp_if omap3_l4_core__i2c2
= {
1778 .master
= &omap3xxx_l4_core_hwmod
,
1779 .slave
= &omap3xxx_i2c2_hwmod
,
1783 .l4_fw_region
= OMAP3_L4_CORE_FW_I2C2_REGION
,
1785 .flags
= OMAP_FIREWALL_L4
,
1788 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1791 /* L4 CORE -> I2C3 interface */
1793 static struct omap_hwmod_ocp_if omap3_l4_core__i2c3
= {
1794 .master
= &omap3xxx_l4_core_hwmod
,
1795 .slave
= &omap3xxx_i2c3_hwmod
,
1799 .l4_fw_region
= OMAP3_L4_CORE_FW_I2C3_REGION
,
1801 .flags
= OMAP_FIREWALL_L4
,
1804 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1807 /* L4 CORE -> SR1 interface */
1808 static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1
= {
1809 .master
= &omap3xxx_l4_core_hwmod
,
1810 .slave
= &omap34xx_sr1_hwmod
,
1812 .user
= OCP_USER_MPU
,
1815 static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1
= {
1816 .master
= &omap3xxx_l4_core_hwmod
,
1817 .slave
= &omap36xx_sr1_hwmod
,
1819 .user
= OCP_USER_MPU
,
1822 /* L4 CORE -> SR2 interface */
1824 static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2
= {
1825 .master
= &omap3xxx_l4_core_hwmod
,
1826 .slave
= &omap34xx_sr2_hwmod
,
1828 .user
= OCP_USER_MPU
,
1831 static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2
= {
1832 .master
= &omap3xxx_l4_core_hwmod
,
1833 .slave
= &omap36xx_sr2_hwmod
,
1835 .user
= OCP_USER_MPU
,
1839 /* l4_core -> usbhsotg */
1840 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg
= {
1841 .master
= &omap3xxx_l4_core_hwmod
,
1842 .slave
= &omap3xxx_usbhsotg_hwmod
,
1844 .user
= OCP_USER_MPU
,
1848 /* l4_core -> usbhsotg */
1849 static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg
= {
1850 .master
= &omap3xxx_l4_core_hwmod
,
1851 .slave
= &am35xx_usbhsotg_hwmod
,
1852 .clk
= "hsotgusb_ick",
1853 .user
= OCP_USER_MPU
,
1856 /* L4_WKUP -> L4_SEC interface */
1857 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec
= {
1858 .master
= &omap3xxx_l4_wkup_hwmod
,
1859 .slave
= &omap3xxx_l4_sec_hwmod
,
1860 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1863 /* IVA2 <- L3 interface */
1864 static struct omap_hwmod_ocp_if omap3xxx_l3__iva
= {
1865 .master
= &omap3xxx_l3_main_hwmod
,
1866 .slave
= &omap3xxx_iva_hwmod
,
1867 .clk
= "core_l3_ick",
1868 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1872 /* l4_wkup -> timer1 */
1873 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1
= {
1874 .master
= &omap3xxx_l4_wkup_hwmod
,
1875 .slave
= &omap3xxx_timer1_hwmod
,
1877 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1881 /* l4_per -> timer2 */
1882 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2
= {
1883 .master
= &omap3xxx_l4_per_hwmod
,
1884 .slave
= &omap3xxx_timer2_hwmod
,
1886 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1890 /* l4_per -> timer3 */
1891 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3
= {
1892 .master
= &omap3xxx_l4_per_hwmod
,
1893 .slave
= &omap3xxx_timer3_hwmod
,
1895 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1899 /* l4_per -> timer4 */
1900 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4
= {
1901 .master
= &omap3xxx_l4_per_hwmod
,
1902 .slave
= &omap3xxx_timer4_hwmod
,
1904 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1908 /* l4_per -> timer5 */
1909 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5
= {
1910 .master
= &omap3xxx_l4_per_hwmod
,
1911 .slave
= &omap3xxx_timer5_hwmod
,
1913 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1917 /* l4_per -> timer6 */
1918 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6
= {
1919 .master
= &omap3xxx_l4_per_hwmod
,
1920 .slave
= &omap3xxx_timer6_hwmod
,
1922 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1926 /* l4_per -> timer7 */
1927 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7
= {
1928 .master
= &omap3xxx_l4_per_hwmod
,
1929 .slave
= &omap3xxx_timer7_hwmod
,
1931 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1935 /* l4_per -> timer8 */
1936 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8
= {
1937 .master
= &omap3xxx_l4_per_hwmod
,
1938 .slave
= &omap3xxx_timer8_hwmod
,
1940 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1944 /* l4_per -> timer9 */
1945 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9
= {
1946 .master
= &omap3xxx_l4_per_hwmod
,
1947 .slave
= &omap3xxx_timer9_hwmod
,
1949 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1952 /* l4_core -> timer10 */
1953 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10
= {
1954 .master
= &omap3xxx_l4_core_hwmod
,
1955 .slave
= &omap3xxx_timer10_hwmod
,
1957 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1960 /* l4_core -> timer11 */
1961 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11
= {
1962 .master
= &omap3xxx_l4_core_hwmod
,
1963 .slave
= &omap3xxx_timer11_hwmod
,
1965 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1969 /* l4_core -> timer12 */
1970 static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12
= {
1971 .master
= &omap3xxx_l4_sec_hwmod
,
1972 .slave
= &omap3xxx_timer12_hwmod
,
1974 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1977 /* l4_wkup -> wd_timer2 */
1979 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2
= {
1980 .master
= &omap3xxx_l4_wkup_hwmod
,
1981 .slave
= &omap3xxx_wd_timer2_hwmod
,
1983 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1986 /* l4_core -> dss */
1987 static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss
= {
1988 .master
= &omap3xxx_l4_core_hwmod
,
1989 .slave
= &omap3430es1_dss_core_hwmod
,
1993 .l4_fw_region
= OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION
,
1994 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
1995 .flags
= OMAP_FIREWALL_L4
,
1998 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2001 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss
= {
2002 .master
= &omap3xxx_l4_core_hwmod
,
2003 .slave
= &omap3xxx_dss_core_hwmod
,
2007 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_CORE_REGION
,
2008 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2009 .flags
= OMAP_FIREWALL_L4
,
2012 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2015 /* l4_core -> dss_dispc */
2016 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc
= {
2017 .master
= &omap3xxx_l4_core_hwmod
,
2018 .slave
= &omap3xxx_dss_dispc_hwmod
,
2022 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_DISPC_REGION
,
2023 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2024 .flags
= OMAP_FIREWALL_L4
,
2027 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2030 /* l4_core -> dss_dsi1 */
2031 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1
= {
2032 .master
= &omap3xxx_l4_core_hwmod
,
2033 .slave
= &omap3xxx_dss_dsi1_hwmod
,
2037 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_DSI_REGION
,
2038 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2039 .flags
= OMAP_FIREWALL_L4
,
2042 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2045 /* l4_core -> dss_rfbi */
2046 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi
= {
2047 .master
= &omap3xxx_l4_core_hwmod
,
2048 .slave
= &omap3xxx_dss_rfbi_hwmod
,
2052 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_RFBI_REGION
,
2053 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2054 .flags
= OMAP_FIREWALL_L4
,
2057 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2060 /* l4_core -> dss_venc */
2061 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc
= {
2062 .master
= &omap3xxx_l4_core_hwmod
,
2063 .slave
= &omap3xxx_dss_venc_hwmod
,
2067 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_VENC_REGION
,
2068 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2069 .flags
= OMAP_FIREWALL_L4
,
2072 .flags
= OCPIF_SWSUP_IDLE
,
2073 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2076 /* l4_wkup -> gpio1 */
2078 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1
= {
2079 .master
= &omap3xxx_l4_wkup_hwmod
,
2080 .slave
= &omap3xxx_gpio1_hwmod
,
2081 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2084 /* l4_per -> gpio2 */
2086 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2
= {
2087 .master
= &omap3xxx_l4_per_hwmod
,
2088 .slave
= &omap3xxx_gpio2_hwmod
,
2089 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2092 /* l4_per -> gpio3 */
2094 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3
= {
2095 .master
= &omap3xxx_l4_per_hwmod
,
2096 .slave
= &omap3xxx_gpio3_hwmod
,
2097 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2102 * The memory management unit performs virtual to physical address translation
2103 * for its requestors.
2106 static struct omap_hwmod_class_sysconfig mmu_sysc
= {
2110 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
2111 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
),
2112 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
2113 .sysc_fields
= &omap_hwmod_sysc_type1
,
2116 static struct omap_hwmod_class omap3xxx_mmu_hwmod_class
= {
2122 static struct omap_hwmod omap3xxx_mmu_isp_hwmod
;
2124 /* l4_core -> mmu isp */
2125 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp
= {
2126 .master
= &omap3xxx_l4_core_hwmod
,
2127 .slave
= &omap3xxx_mmu_isp_hwmod
,
2128 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2131 static struct omap_hwmod omap3xxx_mmu_isp_hwmod
= {
2133 .class = &omap3xxx_mmu_hwmod_class
,
2134 .main_clk
= "cam_ick",
2135 .flags
= HWMOD_NO_IDLEST
,
2140 static struct omap_hwmod omap3xxx_mmu_iva_hwmod
;
2142 static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets
[] = {
2143 { .name
= "mmu", .rst_shift
= 1, .st_shift
= 9 },
2146 /* l3_main -> iva mmu */
2147 static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva
= {
2148 .master
= &omap3xxx_l3_main_hwmod
,
2149 .slave
= &omap3xxx_mmu_iva_hwmod
,
2150 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2153 static struct omap_hwmod omap3xxx_mmu_iva_hwmod
= {
2155 .class = &omap3xxx_mmu_hwmod_class
,
2156 .clkdm_name
= "iva2_clkdm",
2157 .rst_lines
= omap3xxx_mmu_iva_resets
,
2158 .rst_lines_cnt
= ARRAY_SIZE(omap3xxx_mmu_iva_resets
),
2159 .main_clk
= "iva2_ck",
2162 .module_offs
= OMAP3430_IVA2_MOD
,
2164 .idlest_idle_bit
= OMAP3430_ST_IVA2_SHIFT
,
2167 .flags
= HWMOD_NO_IDLEST
,
2170 /* l4_per -> gpio4 */
2172 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4
= {
2173 .master
= &omap3xxx_l4_per_hwmod
,
2174 .slave
= &omap3xxx_gpio4_hwmod
,
2175 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2178 /* l4_per -> gpio5 */
2180 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5
= {
2181 .master
= &omap3xxx_l4_per_hwmod
,
2182 .slave
= &omap3xxx_gpio5_hwmod
,
2183 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2186 /* l4_per -> gpio6 */
2188 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6
= {
2189 .master
= &omap3xxx_l4_per_hwmod
,
2190 .slave
= &omap3xxx_gpio6_hwmod
,
2191 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2194 /* l4_core -> mcbsp1 */
2195 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1
= {
2196 .master
= &omap3xxx_l4_core_hwmod
,
2197 .slave
= &omap3xxx_mcbsp1_hwmod
,
2198 .clk
= "mcbsp1_ick",
2199 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2203 /* l4_per -> mcbsp2 */
2204 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2
= {
2205 .master
= &omap3xxx_l4_per_hwmod
,
2206 .slave
= &omap3xxx_mcbsp2_hwmod
,
2207 .clk
= "mcbsp2_ick",
2208 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2212 /* l4_per -> mcbsp3 */
2213 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3
= {
2214 .master
= &omap3xxx_l4_per_hwmod
,
2215 .slave
= &omap3xxx_mcbsp3_hwmod
,
2216 .clk
= "mcbsp3_ick",
2217 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2221 /* l4_per -> mcbsp4 */
2222 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4
= {
2223 .master
= &omap3xxx_l4_per_hwmod
,
2224 .slave
= &omap3xxx_mcbsp4_hwmod
,
2225 .clk
= "mcbsp4_ick",
2226 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2230 /* l4_core -> mcbsp5 */
2231 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5
= {
2232 .master
= &omap3xxx_l4_core_hwmod
,
2233 .slave
= &omap3xxx_mcbsp5_hwmod
,
2234 .clk
= "mcbsp5_ick",
2235 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2239 /* l4_per -> mcbsp2_sidetone */
2240 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone
= {
2241 .master
= &omap3xxx_l4_per_hwmod
,
2242 .slave
= &omap3xxx_mcbsp2_sidetone_hwmod
,
2243 .clk
= "mcbsp2_ick",
2244 .user
= OCP_USER_MPU
,
2248 /* l4_per -> mcbsp3_sidetone */
2249 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone
= {
2250 .master
= &omap3xxx_l4_per_hwmod
,
2251 .slave
= &omap3xxx_mcbsp3_sidetone_hwmod
,
2252 .clk
= "mcbsp3_ick",
2253 .user
= OCP_USER_MPU
,
2256 /* l4_core -> mailbox */
2257 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox
= {
2258 .master
= &omap3xxx_l4_core_hwmod
,
2259 .slave
= &omap3xxx_mailbox_hwmod
,
2260 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2263 /* l4 core -> mcspi1 interface */
2264 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1
= {
2265 .master
= &omap3xxx_l4_core_hwmod
,
2266 .slave
= &omap34xx_mcspi1
,
2267 .clk
= "mcspi1_ick",
2268 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2271 /* l4 core -> mcspi2 interface */
2272 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2
= {
2273 .master
= &omap3xxx_l4_core_hwmod
,
2274 .slave
= &omap34xx_mcspi2
,
2275 .clk
= "mcspi2_ick",
2276 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2279 /* l4 core -> mcspi3 interface */
2280 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3
= {
2281 .master
= &omap3xxx_l4_core_hwmod
,
2282 .slave
= &omap34xx_mcspi3
,
2283 .clk
= "mcspi3_ick",
2284 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2287 /* l4 core -> mcspi4 interface */
2289 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4
= {
2290 .master
= &omap3xxx_l4_core_hwmod
,
2291 .slave
= &omap34xx_mcspi4
,
2292 .clk
= "mcspi4_ick",
2293 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2296 static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2
= {
2297 .master
= &omap3xxx_usb_host_hs_hwmod
,
2298 .slave
= &omap3xxx_l3_main_hwmod
,
2299 .clk
= "core_l3_ick",
2300 .user
= OCP_USER_MPU
,
2304 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs
= {
2305 .master
= &omap3xxx_l4_core_hwmod
,
2306 .slave
= &omap3xxx_usb_host_hs_hwmod
,
2307 .clk
= "usbhost_ick",
2308 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2312 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs
= {
2313 .master
= &omap3xxx_l4_core_hwmod
,
2314 .slave
= &omap3xxx_usb_tll_hs_hwmod
,
2315 .clk
= "usbtll_ick",
2316 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2319 /* l4_core -> hdq1w interface */
2320 static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w
= {
2321 .master
= &omap3xxx_l4_core_hwmod
,
2322 .slave
= &omap3xxx_hdq1w_hwmod
,
2324 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2325 .flags
= OMAP_FIREWALL_L4
| OCPIF_SWSUP_IDLE
,
2328 /* l4_wkup -> 32ksync_counter */
2331 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k
= {
2332 .master
= &omap3xxx_l4_wkup_hwmod
,
2333 .slave
= &omap3xxx_counter_32k_hwmod
,
2334 .clk
= "omap_32ksync_ick",
2335 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2338 /* am35xx has Davinci MDIO & EMAC */
2339 static struct omap_hwmod_class am35xx_mdio_class
= {
2340 .name
= "davinci_mdio",
2343 static struct omap_hwmod am35xx_mdio_hwmod
= {
2344 .name
= "davinci_mdio",
2345 .class = &am35xx_mdio_class
,
2346 .flags
= HWMOD_NO_IDLEST
,
2350 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2351 * but this will probably require some additional hwmod core support,
2352 * so is left as a future to-do item.
2354 static struct omap_hwmod_ocp_if am35xx_mdio__l3
= {
2355 .master
= &am35xx_mdio_hwmod
,
2356 .slave
= &omap3xxx_l3_main_hwmod
,
2358 .user
= OCP_USER_MPU
,
2361 /* l4_core -> davinci mdio */
2363 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2364 * but this will probably require some additional hwmod core support,
2365 * so is left as a future to-do item.
2367 static struct omap_hwmod_ocp_if am35xx_l4_core__mdio
= {
2368 .master
= &omap3xxx_l4_core_hwmod
,
2369 .slave
= &am35xx_mdio_hwmod
,
2371 .user
= OCP_USER_MPU
,
2374 static struct omap_hwmod_class am35xx_emac_class
= {
2375 .name
= "davinci_emac",
2378 static struct omap_hwmod am35xx_emac_hwmod
= {
2379 .name
= "davinci_emac",
2380 .class = &am35xx_emac_class
,
2382 * According to Mark Greer, the MPU will not return from WFI
2383 * when the EMAC signals an interrupt.
2384 * http://www.spinics.net/lists/arm-kernel/msg174734.html
2386 .flags
= (HWMOD_NO_IDLEST
| HWMOD_BLOCK_WFI
),
2389 /* l3_core -> davinci emac interface */
2391 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2392 * but this will probably require some additional hwmod core support,
2393 * so is left as a future to-do item.
2395 static struct omap_hwmod_ocp_if am35xx_emac__l3
= {
2396 .master
= &am35xx_emac_hwmod
,
2397 .slave
= &omap3xxx_l3_main_hwmod
,
2399 .user
= OCP_USER_MPU
,
2402 /* l4_core -> davinci emac */
2404 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2405 * but this will probably require some additional hwmod core support,
2406 * so is left as a future to-do item.
2408 static struct omap_hwmod_ocp_if am35xx_l4_core__emac
= {
2409 .master
= &omap3xxx_l4_core_hwmod
,
2410 .slave
= &am35xx_emac_hwmod
,
2412 .user
= OCP_USER_MPU
,
2415 static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc
= {
2416 .master
= &omap3xxx_l3_main_hwmod
,
2417 .slave
= &omap3xxx_gpmc_hwmod
,
2418 .clk
= "core_l3_ick",
2419 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2422 /* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */
2423 static struct omap_hwmod_class_sysconfig omap3_sham_sysc
= {
2427 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
2428 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
2429 .sysc_fields
= &omap3_sham_sysc_fields
,
2432 static struct omap_hwmod_class omap3xxx_sham_class
= {
2434 .sysc
= &omap3_sham_sysc
,
2439 static struct omap_hwmod omap3xxx_sham_hwmod
= {
2441 .main_clk
= "sha12_ick",
2444 .module_offs
= CORE_MOD
,
2446 .idlest_idle_bit
= OMAP3430_ST_SHA12_SHIFT
,
2449 .class = &omap3xxx_sham_class
,
2453 static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham
= {
2454 .master
= &omap3xxx_l4_core_hwmod
,
2455 .slave
= &omap3xxx_sham_hwmod
,
2457 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2460 /* l4_core -> AES */
2461 static struct omap_hwmod_class_sysconfig omap3_aes_sysc
= {
2465 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
2466 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
2467 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
2468 .sysc_fields
= &omap3xxx_aes_sysc_fields
,
2471 static struct omap_hwmod_class omap3xxx_aes_class
= {
2473 .sysc
= &omap3_aes_sysc
,
2477 static struct omap_hwmod omap3xxx_aes_hwmod
= {
2479 .main_clk
= "aes2_ick",
2482 .module_offs
= CORE_MOD
,
2484 .idlest_idle_bit
= OMAP3430_ST_AES2_SHIFT
,
2487 .class = &omap3xxx_aes_class
,
2491 static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes
= {
2492 .master
= &omap3xxx_l4_core_hwmod
,
2493 .slave
= &omap3xxx_aes_hwmod
,
2495 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2500 * synchronous serial interface (multichannel and full-duplex serial if)
2503 static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc
= {
2505 .sysc_offs
= 0x0010,
2506 .syss_offs
= 0x0014,
2507 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_MIDLEMODE
|
2508 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
),
2509 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
2510 .sysc_fields
= &omap_hwmod_sysc_type1
,
2513 static struct omap_hwmod_class omap3xxx_ssi_hwmod_class
= {
2515 .sysc
= &omap34xx_ssi_sysc
,
2518 static struct omap_hwmod omap3xxx_ssi_hwmod
= {
2520 .class = &omap3xxx_ssi_hwmod_class
,
2521 .clkdm_name
= "core_l4_clkdm",
2522 .main_clk
= "ssi_ssr_fck",
2525 .module_offs
= CORE_MOD
,
2527 .idlest_idle_bit
= OMAP3430ES2_ST_SSI_IDLE_SHIFT
,
2532 /* L4 CORE -> SSI */
2533 static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi
= {
2534 .master
= &omap3xxx_l4_core_hwmod
,
2535 .slave
= &omap3xxx_ssi_hwmod
,
2537 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2540 static struct omap_hwmod_ocp_if
*omap3xxx_hwmod_ocp_ifs
[] __initdata
= {
2541 &omap3xxx_l3_main__l4_core
,
2542 &omap3xxx_l3_main__l4_per
,
2543 &omap3xxx_mpu__l3_main
,
2544 &omap3xxx_l3_main__l4_debugss
,
2545 &omap3xxx_l4_core__l4_wkup
,
2546 &omap3xxx_l4_core__mmc3
,
2547 &omap3_l4_core__uart1
,
2548 &omap3_l4_core__uart2
,
2549 &omap3_l4_per__uart3
,
2550 &omap3_l4_core__i2c1
,
2551 &omap3_l4_core__i2c2
,
2552 &omap3_l4_core__i2c3
,
2553 &omap3xxx_l4_wkup__l4_sec
,
2554 &omap3xxx_l4_wkup__timer1
,
2555 &omap3xxx_l4_per__timer2
,
2556 &omap3xxx_l4_per__timer3
,
2557 &omap3xxx_l4_per__timer4
,
2558 &omap3xxx_l4_per__timer5
,
2559 &omap3xxx_l4_per__timer6
,
2560 &omap3xxx_l4_per__timer7
,
2561 &omap3xxx_l4_per__timer8
,
2562 &omap3xxx_l4_per__timer9
,
2563 &omap3xxx_l4_core__timer10
,
2564 &omap3xxx_l4_core__timer11
,
2565 &omap3xxx_l4_wkup__wd_timer2
,
2566 &omap3xxx_l4_wkup__gpio1
,
2567 &omap3xxx_l4_per__gpio2
,
2568 &omap3xxx_l4_per__gpio3
,
2569 &omap3xxx_l4_per__gpio4
,
2570 &omap3xxx_l4_per__gpio5
,
2571 &omap3xxx_l4_per__gpio6
,
2572 &omap3xxx_l4_core__mcbsp1
,
2573 &omap3xxx_l4_per__mcbsp2
,
2574 &omap3xxx_l4_per__mcbsp3
,
2575 &omap3xxx_l4_per__mcbsp4
,
2576 &omap3xxx_l4_core__mcbsp5
,
2577 &omap3xxx_l4_per__mcbsp2_sidetone
,
2578 &omap3xxx_l4_per__mcbsp3_sidetone
,
2579 &omap34xx_l4_core__mcspi1
,
2580 &omap34xx_l4_core__mcspi2
,
2581 &omap34xx_l4_core__mcspi3
,
2582 &omap34xx_l4_core__mcspi4
,
2583 &omap3xxx_l4_wkup__counter_32k
,
2584 &omap3xxx_l3_main__gpmc
,
2588 /* GP-only hwmod links */
2589 static struct omap_hwmod_ocp_if
*omap34xx_gp_hwmod_ocp_ifs
[] __initdata
= {
2590 &omap3xxx_l4_sec__timer12
,
2594 static struct omap_hwmod_ocp_if
*omap36xx_gp_hwmod_ocp_ifs
[] __initdata
= {
2595 &omap3xxx_l4_sec__timer12
,
2599 static struct omap_hwmod_ocp_if
*am35xx_gp_hwmod_ocp_ifs
[] __initdata
= {
2600 &omap3xxx_l4_sec__timer12
,
2604 /* crypto hwmod links */
2605 static struct omap_hwmod_ocp_if
*omap34xx_sham_hwmod_ocp_ifs
[] __initdata
= {
2606 &omap3xxx_l4_core__sham
,
2610 static struct omap_hwmod_ocp_if
*omap34xx_aes_hwmod_ocp_ifs
[] __initdata
= {
2611 &omap3xxx_l4_core__aes
,
2615 static struct omap_hwmod_ocp_if
*omap36xx_sham_hwmod_ocp_ifs
[] __initdata
= {
2616 &omap3xxx_l4_core__sham
,
2620 static struct omap_hwmod_ocp_if
*omap36xx_aes_hwmod_ocp_ifs
[] __initdata
= {
2621 &omap3xxx_l4_core__aes
,
2626 * Apparently the SHA/MD5 and AES accelerator IP blocks are
2627 * only present on some AM35xx chips, and no one knows which
2629 * http://www.spinics.net/lists/arm-kernel/msg215466.html So
2630 * if you need these IP blocks on an AM35xx, try uncommenting
2631 * the following lines.
2633 static struct omap_hwmod_ocp_if
*am35xx_sham_hwmod_ocp_ifs
[] __initdata
= {
2634 /* &omap3xxx_l4_core__sham, */
2638 static struct omap_hwmod_ocp_if
*am35xx_aes_hwmod_ocp_ifs
[] __initdata
= {
2639 /* &omap3xxx_l4_core__aes, */
2643 /* 3430ES1-only hwmod links */
2644 static struct omap_hwmod_ocp_if
*omap3430es1_hwmod_ocp_ifs
[] __initdata
= {
2645 &omap3430es1_dss__l3
,
2646 &omap3430es1_l4_core__dss
,
2650 /* 3430ES2+-only hwmod links */
2651 static struct omap_hwmod_ocp_if
*omap3430es2plus_hwmod_ocp_ifs
[] __initdata
= {
2653 &omap3xxx_l4_core__dss
,
2654 &omap3xxx_usbhsotg__l3
,
2655 &omap3xxx_l4_core__usbhsotg
,
2656 &omap3xxx_usb_host_hs__l3_main_2
,
2657 &omap3xxx_l4_core__usb_host_hs
,
2658 &omap3xxx_l4_core__usb_tll_hs
,
2662 /* <= 3430ES3-only hwmod links */
2663 static struct omap_hwmod_ocp_if
*omap3430_pre_es3_hwmod_ocp_ifs
[] __initdata
= {
2664 &omap3xxx_l4_core__pre_es3_mmc1
,
2665 &omap3xxx_l4_core__pre_es3_mmc2
,
2669 /* 3430ES3+-only hwmod links */
2670 static struct omap_hwmod_ocp_if
*omap3430_es3plus_hwmod_ocp_ifs
[] __initdata
= {
2671 &omap3xxx_l4_core__es3plus_mmc1
,
2672 &omap3xxx_l4_core__es3plus_mmc2
,
2676 /* 34xx-only hwmod links (all ES revisions) */
2677 static struct omap_hwmod_ocp_if
*omap34xx_hwmod_ocp_ifs
[] __initdata
= {
2679 &omap34xx_l4_core__sr1
,
2680 &omap34xx_l4_core__sr2
,
2681 &omap3xxx_l4_core__mailbox
,
2682 &omap3xxx_l4_core__hdq1w
,
2683 &omap3xxx_sad2d__l3
,
2684 &omap3xxx_l4_core__mmu_isp
,
2685 &omap3xxx_l3_main__mmu_iva
,
2686 &omap3xxx_l4_core__ssi
,
2690 /* 36xx-only hwmod links (all ES revisions) */
2691 static struct omap_hwmod_ocp_if
*omap36xx_hwmod_ocp_ifs
[] __initdata
= {
2693 &omap36xx_l4_per__uart4
,
2695 &omap3xxx_l4_core__dss
,
2696 &omap36xx_l4_core__sr1
,
2697 &omap36xx_l4_core__sr2
,
2698 &omap3xxx_usbhsotg__l3
,
2699 &omap3xxx_l4_core__usbhsotg
,
2700 &omap3xxx_l4_core__mailbox
,
2701 &omap3xxx_usb_host_hs__l3_main_2
,
2702 &omap3xxx_l4_core__usb_host_hs
,
2703 &omap3xxx_l4_core__usb_tll_hs
,
2704 &omap3xxx_l4_core__es3plus_mmc1
,
2705 &omap3xxx_l4_core__es3plus_mmc2
,
2706 &omap3xxx_l4_core__hdq1w
,
2707 &omap3xxx_sad2d__l3
,
2708 &omap3xxx_l4_core__mmu_isp
,
2709 &omap3xxx_l3_main__mmu_iva
,
2710 &omap3xxx_l4_core__ssi
,
2714 static struct omap_hwmod_ocp_if
*am35xx_hwmod_ocp_ifs
[] __initdata
= {
2716 &omap3xxx_l4_core__dss
,
2717 &am35xx_usbhsotg__l3
,
2718 &am35xx_l4_core__usbhsotg
,
2719 &am35xx_l4_core__uart4
,
2720 &omap3xxx_usb_host_hs__l3_main_2
,
2721 &omap3xxx_l4_core__usb_host_hs
,
2722 &omap3xxx_l4_core__usb_tll_hs
,
2723 &omap3xxx_l4_core__es3plus_mmc1
,
2724 &omap3xxx_l4_core__es3plus_mmc2
,
2725 &omap3xxx_l4_core__hdq1w
,
2727 &am35xx_l4_core__mdio
,
2729 &am35xx_l4_core__emac
,
2733 static struct omap_hwmod_ocp_if
*omap3xxx_dss_hwmod_ocp_ifs
[] __initdata
= {
2734 &omap3xxx_l4_core__dss_dispc
,
2735 &omap3xxx_l4_core__dss_dsi1
,
2736 &omap3xxx_l4_core__dss_rfbi
,
2737 &omap3xxx_l4_core__dss_venc
,
2742 * omap3xxx_hwmod_is_hs_ip_block_usable - is a security IP block accessible?
2743 * @bus: struct device_node * for the top-level OMAP DT data
2744 * @dev_name: device name used in the DT file
2746 * Determine whether a "secure" IP block @dev_name is usable by Linux.
2747 * There doesn't appear to be a 100% reliable way to determine this,
2748 * so we rely on heuristics. If @bus is null, meaning there's no DT
2749 * data, then we only assume the IP block is accessible if the OMAP is
2750 * fused as a 'general-purpose' SoC. If however DT data is present,
2751 * test to see if the IP block is described in the DT data and set to
2752 * 'status = "okay"'. If so then we assume the ODM has configured the
2753 * OMAP firewalls to allow access to the IP block.
2755 * Return: 0 if device named @dev_name is not likely to be accessible,
2756 * or 1 if it is likely to be accessible.
2758 static bool __init
omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node
*bus
,
2759 const char *dev_name
)
2761 struct device_node
*node
;
2765 return omap_type() == OMAP2_DEVICE_TYPE_GP
;
2767 node
= of_get_child_by_name(bus
, dev_name
);
2768 available
= of_device_is_available(node
);
2774 int __init
omap3xxx_hwmod_init(void)
2777 struct omap_hwmod_ocp_if
**h
= NULL
, **h_gp
= NULL
, **h_sham
= NULL
;
2778 struct omap_hwmod_ocp_if
**h_aes
= NULL
;
2779 struct device_node
*bus
;
2784 /* Register hwmod links common to all OMAP3 */
2785 r
= omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs
);
2792 * Register hwmod links common to individual OMAP3 families, all
2793 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
2794 * All possible revisions should be included in this conditional.
2796 if (rev
== OMAP3430_REV_ES1_0
|| rev
== OMAP3430_REV_ES2_0
||
2797 rev
== OMAP3430_REV_ES2_1
|| rev
== OMAP3430_REV_ES3_0
||
2798 rev
== OMAP3430_REV_ES3_1
|| rev
== OMAP3430_REV_ES3_1_2
) {
2799 h
= omap34xx_hwmod_ocp_ifs
;
2800 h_gp
= omap34xx_gp_hwmod_ocp_ifs
;
2801 h_sham
= omap34xx_sham_hwmod_ocp_ifs
;
2802 h_aes
= omap34xx_aes_hwmod_ocp_ifs
;
2803 } else if (rev
== AM35XX_REV_ES1_0
|| rev
== AM35XX_REV_ES1_1
) {
2804 h
= am35xx_hwmod_ocp_ifs
;
2805 h_gp
= am35xx_gp_hwmod_ocp_ifs
;
2806 h_sham
= am35xx_sham_hwmod_ocp_ifs
;
2807 h_aes
= am35xx_aes_hwmod_ocp_ifs
;
2808 } else if (rev
== OMAP3630_REV_ES1_0
|| rev
== OMAP3630_REV_ES1_1
||
2809 rev
== OMAP3630_REV_ES1_2
) {
2810 h
= omap36xx_hwmod_ocp_ifs
;
2811 h_gp
= omap36xx_gp_hwmod_ocp_ifs
;
2812 h_sham
= omap36xx_sham_hwmod_ocp_ifs
;
2813 h_aes
= omap36xx_aes_hwmod_ocp_ifs
;
2815 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
2819 r
= omap_hwmod_register_links(h
);
2823 /* Register GP-only hwmod links. */
2824 if (h_gp
&& omap_type() == OMAP2_DEVICE_TYPE_GP
) {
2825 r
= omap_hwmod_register_links(h_gp
);
2831 * Register crypto hwmod links only if they are not disabled in DT.
2832 * If DT information is missing, enable them only for GP devices.
2835 bus
= of_find_node_by_name(NULL
, "ocp");
2837 if (h_sham
&& omap3xxx_hwmod_is_hs_ip_block_usable(bus
, "sham")) {
2838 r
= omap_hwmod_register_links(h_sham
);
2843 if (h_aes
&& omap3xxx_hwmod_is_hs_ip_block_usable(bus
, "aes")) {
2844 r
= omap_hwmod_register_links(h_aes
);
2851 * Register hwmod links specific to certain ES levels of a
2852 * particular family of silicon (e.g., 34xx ES1.0)
2855 if (rev
== OMAP3430_REV_ES1_0
) {
2856 h
= omap3430es1_hwmod_ocp_ifs
;
2857 } else if (rev
== OMAP3430_REV_ES2_0
|| rev
== OMAP3430_REV_ES2_1
||
2858 rev
== OMAP3430_REV_ES3_0
|| rev
== OMAP3430_REV_ES3_1
||
2859 rev
== OMAP3430_REV_ES3_1_2
) {
2860 h
= omap3430es2plus_hwmod_ocp_ifs
;
2864 r
= omap_hwmod_register_links(h
);
2870 if (rev
== OMAP3430_REV_ES1_0
|| rev
== OMAP3430_REV_ES2_0
||
2871 rev
== OMAP3430_REV_ES2_1
) {
2872 h
= omap3430_pre_es3_hwmod_ocp_ifs
;
2873 } else if (rev
== OMAP3430_REV_ES3_0
|| rev
== OMAP3430_REV_ES3_1
||
2874 rev
== OMAP3430_REV_ES3_1_2
) {
2875 h
= omap3430_es3plus_hwmod_ocp_ifs
;
2879 r
= omap_hwmod_register_links(h
);
2884 * DSS code presumes that dss_core hwmod is handled first,
2885 * _before_ any other DSS related hwmods so register common
2886 * DSS hwmod links last to ensure that dss_core is already
2887 * registered. Otherwise some change things may happen, for
2888 * ex. if dispc is handled before dss_core and DSS is enabled
2889 * in bootloader DISPC will be reset with outputs enabled
2890 * which sometimes leads to unrecoverable L3 error. XXX The
2891 * long-term fix to this is to ensure hwmods are set up in
2892 * dependency order in the hwmod core code.
2894 r
= omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs
);