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>
19 #include <linux/omap-dma.h>
24 #include "omap_hwmod.h"
25 #include "omap_hwmod_common_data.h"
26 #include "prm-regbits-34xx.h"
27 #include "cm-regbits-34xx.h"
34 * OMAP3xxx hardware module integration data
36 * All of the data in this section should be autogeneratable from the
37 * TI hardware database or other technical documentation. Data that
38 * is driver-specific or driver-kernel integration-specific belongs
42 #define AM35XX_IPSS_USBOTGSS_BASE 0x5C040000
50 static struct omap_hwmod omap3xxx_l3_main_hwmod
= {
52 .class = &l3_hwmod_class
,
53 .flags
= HWMOD_NO_IDLEST
,
57 static struct omap_hwmod omap3xxx_l4_core_hwmod
= {
59 .class = &l4_hwmod_class
,
60 .flags
= HWMOD_NO_IDLEST
,
64 static struct omap_hwmod omap3xxx_l4_per_hwmod
= {
66 .class = &l4_hwmod_class
,
67 .flags
= HWMOD_NO_IDLEST
,
71 static struct omap_hwmod omap3xxx_l4_wkup_hwmod
= {
73 .class = &l4_hwmod_class
,
74 .flags
= HWMOD_NO_IDLEST
,
78 static struct omap_hwmod omap3xxx_l4_sec_hwmod
= {
80 .class = &l4_hwmod_class
,
81 .flags
= HWMOD_NO_IDLEST
,
86 static struct omap_hwmod omap3xxx_mpu_hwmod
= {
88 .class = &mpu_hwmod_class
,
89 .main_clk
= "arm_fck",
93 static struct omap_hwmod_rst_info omap3xxx_iva_resets
[] = {
94 { .name
= "logic", .rst_shift
= 0, .st_shift
= 8 },
95 { .name
= "seq0", .rst_shift
= 1, .st_shift
= 9 },
96 { .name
= "seq1", .rst_shift
= 2, .st_shift
= 10 },
99 static struct omap_hwmod omap3xxx_iva_hwmod
= {
101 .class = &iva_hwmod_class
,
102 .clkdm_name
= "iva2_clkdm",
103 .rst_lines
= omap3xxx_iva_resets
,
104 .rst_lines_cnt
= ARRAY_SIZE(omap3xxx_iva_resets
),
105 .main_clk
= "iva2_ck",
108 .module_offs
= OMAP3430_IVA2_MOD
,
110 .idlest_idle_bit
= OMAP3430_ST_IVA2_SHIFT
,
117 * debug and emulation sub system
120 static struct omap_hwmod_class omap3xxx_debugss_hwmod_class
= {
125 static struct omap_hwmod omap3xxx_debugss_hwmod
= {
127 .class = &omap3xxx_debugss_hwmod_class
,
128 .clkdm_name
= "emu_clkdm",
129 .main_clk
= "emu_src_ck",
130 .flags
= HWMOD_NO_IDLEST
,
134 static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc
= {
138 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_CLOCKACTIVITY
|
139 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
140 SYSC_HAS_EMUFREE
| SYSC_HAS_AUTOIDLE
|
141 SYSS_HAS_RESET_STATUS
),
142 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
143 .sysc_fields
= &omap_hwmod_sysc_type1
,
146 static struct omap_hwmod_class omap3xxx_timer_hwmod_class
= {
148 .sysc
= &omap3xxx_timer_sysc
,
152 static struct omap_hwmod omap3xxx_timer1_hwmod
= {
154 .main_clk
= "gpt1_fck",
157 .module_offs
= WKUP_MOD
,
159 .idlest_idle_bit
= OMAP3430_ST_GPT1_SHIFT
,
162 .class = &omap3xxx_timer_hwmod_class
,
163 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
167 static struct omap_hwmod omap3xxx_timer2_hwmod
= {
169 .main_clk
= "gpt2_fck",
172 .module_offs
= OMAP3430_PER_MOD
,
174 .idlest_idle_bit
= OMAP3430_ST_GPT2_SHIFT
,
177 .class = &omap3xxx_timer_hwmod_class
,
178 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
182 static struct omap_hwmod omap3xxx_timer3_hwmod
= {
184 .main_clk
= "gpt3_fck",
187 .module_offs
= OMAP3430_PER_MOD
,
189 .idlest_idle_bit
= OMAP3430_ST_GPT3_SHIFT
,
192 .class = &omap3xxx_timer_hwmod_class
,
193 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
197 static struct omap_hwmod omap3xxx_timer4_hwmod
= {
199 .main_clk
= "gpt4_fck",
202 .module_offs
= OMAP3430_PER_MOD
,
204 .idlest_idle_bit
= OMAP3430_ST_GPT4_SHIFT
,
207 .class = &omap3xxx_timer_hwmod_class
,
208 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
212 static struct omap_hwmod omap3xxx_timer5_hwmod
= {
214 .main_clk
= "gpt5_fck",
217 .module_offs
= OMAP3430_PER_MOD
,
219 .idlest_idle_bit
= OMAP3430_ST_GPT5_SHIFT
,
222 .class = &omap3xxx_timer_hwmod_class
,
223 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
227 static struct omap_hwmod omap3xxx_timer6_hwmod
= {
229 .main_clk
= "gpt6_fck",
232 .module_offs
= OMAP3430_PER_MOD
,
234 .idlest_idle_bit
= OMAP3430_ST_GPT6_SHIFT
,
237 .class = &omap3xxx_timer_hwmod_class
,
238 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
242 static struct omap_hwmod omap3xxx_timer7_hwmod
= {
244 .main_clk
= "gpt7_fck",
247 .module_offs
= OMAP3430_PER_MOD
,
249 .idlest_idle_bit
= OMAP3430_ST_GPT7_SHIFT
,
252 .class = &omap3xxx_timer_hwmod_class
,
253 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
257 static struct omap_hwmod omap3xxx_timer8_hwmod
= {
259 .main_clk
= "gpt8_fck",
262 .module_offs
= OMAP3430_PER_MOD
,
264 .idlest_idle_bit
= OMAP3430_ST_GPT8_SHIFT
,
267 .class = &omap3xxx_timer_hwmod_class
,
268 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
272 static struct omap_hwmod omap3xxx_timer9_hwmod
= {
274 .main_clk
= "gpt9_fck",
277 .module_offs
= OMAP3430_PER_MOD
,
279 .idlest_idle_bit
= OMAP3430_ST_GPT9_SHIFT
,
282 .class = &omap3xxx_timer_hwmod_class
,
283 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
287 static struct omap_hwmod omap3xxx_timer10_hwmod
= {
289 .main_clk
= "gpt10_fck",
292 .module_offs
= CORE_MOD
,
294 .idlest_idle_bit
= OMAP3430_ST_GPT10_SHIFT
,
297 .class = &omap3xxx_timer_hwmod_class
,
298 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
302 static struct omap_hwmod omap3xxx_timer11_hwmod
= {
304 .main_clk
= "gpt11_fck",
307 .module_offs
= CORE_MOD
,
309 .idlest_idle_bit
= OMAP3430_ST_GPT11_SHIFT
,
312 .class = &omap3xxx_timer_hwmod_class
,
313 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
317 static struct omap_hwmod omap3xxx_timer12_hwmod
= {
319 .main_clk
= "gpt12_fck",
322 .module_offs
= WKUP_MOD
,
324 .idlest_idle_bit
= OMAP3430_ST_GPT12_SHIFT
,
327 .class = &omap3xxx_timer_hwmod_class
,
328 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
333 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
337 static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc
= {
341 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_EMUFREE
|
342 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
343 SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
344 SYSS_HAS_RESET_STATUS
),
345 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
346 .sysc_fields
= &omap_hwmod_sysc_type1
,
350 static struct omap_hwmod_class_sysconfig i2c_sysc
= {
354 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
355 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
356 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
357 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
358 .sysc_fields
= &omap_hwmod_sysc_type1
,
361 static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class
= {
363 .sysc
= &omap3xxx_wd_timer_sysc
,
364 .pre_shutdown
= &omap2_wd_timer_disable
,
365 .reset
= &omap2_wd_timer_reset
,
368 static struct omap_hwmod omap3xxx_wd_timer2_hwmod
= {
370 .class = &omap3xxx_wd_timer_hwmod_class
,
371 .main_clk
= "wdt2_fck",
374 .module_offs
= WKUP_MOD
,
376 .idlest_idle_bit
= OMAP3430_ST_WDT2_SHIFT
,
380 * XXX: Use software supervised mode, HW supervised smartidle seems to
381 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
383 .flags
= HWMOD_SWSUP_SIDLE
,
387 static struct omap_hwmod omap3xxx_uart1_hwmod
= {
389 .main_clk
= "uart1_fck",
390 .flags
= DEBUG_TI81XXUART1_FLAGS
| HWMOD_SWSUP_SIDLE
,
393 .module_offs
= CORE_MOD
,
395 .idlest_idle_bit
= OMAP3430_EN_UART1_SHIFT
,
398 .class = &omap2_uart_class
,
402 static struct omap_hwmod omap3xxx_uart2_hwmod
= {
404 .main_clk
= "uart2_fck",
405 .flags
= DEBUG_TI81XXUART2_FLAGS
| HWMOD_SWSUP_SIDLE
,
408 .module_offs
= CORE_MOD
,
410 .idlest_idle_bit
= OMAP3430_EN_UART2_SHIFT
,
413 .class = &omap2_uart_class
,
417 static struct omap_hwmod omap3xxx_uart3_hwmod
= {
419 .main_clk
= "uart3_fck",
420 .flags
= DEBUG_OMAP3UART3_FLAGS
| DEBUG_TI81XXUART3_FLAGS
|
424 .module_offs
= OMAP3430_PER_MOD
,
426 .idlest_idle_bit
= OMAP3430_EN_UART3_SHIFT
,
429 .class = &omap2_uart_class
,
435 static struct omap_hwmod omap36xx_uart4_hwmod
= {
437 .main_clk
= "uart4_fck",
438 .flags
= DEBUG_OMAP3UART4_FLAGS
| HWMOD_SWSUP_SIDLE
,
441 .module_offs
= OMAP3430_PER_MOD
,
443 .idlest_idle_bit
= OMAP3630_EN_UART4_SHIFT
,
446 .class = &omap2_uart_class
,
452 * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
453 * uart2_fck being enabled. So we add uart1_fck as an optional clock,
454 * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
455 * should not be needed. The functional clock structure of the AM35xx
456 * UART4 is extremely unclear and opaque; it is unclear what the role
457 * of uart1/2_fck is for the UART4. Any clarification from either
458 * empirical testing or the AM3505/3517 hardware designers would be
461 static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks
[] = {
462 { .role
= "softreset_uart1_fck", .clk
= "uart1_fck" },
465 static struct omap_hwmod am35xx_uart4_hwmod
= {
467 .main_clk
= "uart4_fck",
470 .module_offs
= CORE_MOD
,
472 .idlest_idle_bit
= AM35XX_ST_UART4_SHIFT
,
475 .opt_clks
= am35xx_uart4_opt_clks
,
476 .opt_clks_cnt
= ARRAY_SIZE(am35xx_uart4_opt_clks
),
477 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
478 .class = &omap2_uart_class
,
481 static struct omap_hwmod_class i2c_class
= {
484 .reset
= &omap_i2c_reset
,
488 static struct omap_hwmod_opt_clk dss_opt_clks
[] = {
490 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
491 * driver does not use these clocks.
493 { .role
= "sys_clk", .clk
= "dss2_alwon_fck" },
494 { .role
= "tv_clk", .clk
= "dss_tv_fck" },
495 /* required only on OMAP3430 */
496 { .role
= "tv_dac_clk", .clk
= "dss_96m_fck" },
499 static struct omap_hwmod omap3430es1_dss_core_hwmod
= {
501 .class = &omap2_dss_hwmod_class
,
502 .main_clk
= "dss1_alwon_fck", /* instead of dss_fck */
505 .module_offs
= OMAP3430_DSS_MOD
,
509 .opt_clks
= dss_opt_clks
,
510 .opt_clks_cnt
= ARRAY_SIZE(dss_opt_clks
),
511 .flags
= HWMOD_NO_IDLEST
| HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
514 static struct omap_hwmod omap3xxx_dss_core_hwmod
= {
516 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
517 .class = &omap2_dss_hwmod_class
,
518 .main_clk
= "dss1_alwon_fck", /* instead of dss_fck */
521 .module_offs
= OMAP3430_DSS_MOD
,
523 .idlest_idle_bit
= OMAP3430ES2_ST_DSS_IDLE_SHIFT
,
526 .opt_clks
= dss_opt_clks
,
527 .opt_clks_cnt
= ARRAY_SIZE(dss_opt_clks
),
535 static struct omap_hwmod_class_sysconfig omap3_dispc_sysc
= {
539 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
|
540 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
542 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
543 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
544 .sysc_fields
= &omap_hwmod_sysc_type1
,
547 static struct omap_hwmod_class omap3_dispc_hwmod_class
= {
549 .sysc
= &omap3_dispc_sysc
,
552 static struct omap_hwmod omap3xxx_dss_dispc_hwmod
= {
554 .class = &omap3_dispc_hwmod_class
,
555 .main_clk
= "dss1_alwon_fck",
558 .module_offs
= OMAP3430_DSS_MOD
,
561 .flags
= HWMOD_NO_IDLEST
,
562 .dev_attr
= &omap2_3_dss_dispc_dev_attr
,
567 * display serial interface controller
570 static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc
= {
574 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
575 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
|
576 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
577 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
578 .sysc_fields
= &omap_hwmod_sysc_type1
,
581 static struct omap_hwmod_class omap3xxx_dsi_hwmod_class
= {
583 .sysc
= &omap3xxx_dsi_sysc
,
587 static struct omap_hwmod_opt_clk dss_dsi1_opt_clks
[] = {
588 { .role
= "sys_clk", .clk
= "dss2_alwon_fck" },
591 static struct omap_hwmod omap3xxx_dss_dsi1_hwmod
= {
593 .class = &omap3xxx_dsi_hwmod_class
,
594 .main_clk
= "dss1_alwon_fck",
597 .module_offs
= OMAP3430_DSS_MOD
,
600 .opt_clks
= dss_dsi1_opt_clks
,
601 .opt_clks_cnt
= ARRAY_SIZE(dss_dsi1_opt_clks
),
602 .flags
= HWMOD_NO_IDLEST
,
605 static struct omap_hwmod_opt_clk dss_rfbi_opt_clks
[] = {
606 { .role
= "ick", .clk
= "dss_ick" },
609 static struct omap_hwmod omap3xxx_dss_rfbi_hwmod
= {
611 .class = &omap2_rfbi_hwmod_class
,
612 .main_clk
= "dss1_alwon_fck",
615 .module_offs
= OMAP3430_DSS_MOD
,
618 .opt_clks
= dss_rfbi_opt_clks
,
619 .opt_clks_cnt
= ARRAY_SIZE(dss_rfbi_opt_clks
),
620 .flags
= HWMOD_NO_IDLEST
,
623 static struct omap_hwmod_opt_clk dss_venc_opt_clks
[] = {
624 /* required only on OMAP3430 */
625 { .role
= "tv_dac_clk", .clk
= "dss_96m_fck" },
628 static struct omap_hwmod omap3xxx_dss_venc_hwmod
= {
630 .class = &omap2_venc_hwmod_class
,
631 .main_clk
= "dss_tv_fck",
634 .module_offs
= OMAP3430_DSS_MOD
,
637 .opt_clks
= dss_venc_opt_clks
,
638 .opt_clks_cnt
= ARRAY_SIZE(dss_venc_opt_clks
),
639 .flags
= HWMOD_NO_IDLEST
,
643 static struct omap_hwmod omap3xxx_i2c1_hwmod
= {
645 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
646 .main_clk
= "i2c1_fck",
649 .module_offs
= CORE_MOD
,
651 .idlest_idle_bit
= OMAP3430_ST_I2C1_SHIFT
,
658 static struct omap_hwmod omap3xxx_i2c2_hwmod
= {
660 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
661 .main_clk
= "i2c2_fck",
664 .module_offs
= CORE_MOD
,
666 .idlest_idle_bit
= OMAP3430_ST_I2C2_SHIFT
,
673 static struct omap_hwmod omap3xxx_i2c3_hwmod
= {
675 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
676 .main_clk
= "i2c3_fck",
679 .module_offs
= CORE_MOD
,
681 .idlest_idle_bit
= OMAP3430_ST_I2C3_SHIFT
,
689 * general purpose io module
692 static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc
= {
696 .sysc_flags
= (SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
|
697 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
698 SYSS_HAS_RESET_STATUS
),
699 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
700 .sysc_fields
= &omap_hwmod_sysc_type1
,
703 static struct omap_hwmod_class omap3xxx_gpio_hwmod_class
= {
705 .sysc
= &omap3xxx_gpio_sysc
,
709 static struct omap_hwmod_opt_clk gpio1_opt_clks
[] = {
710 { .role
= "dbclk", .clk
= "gpio1_dbck", },
713 static struct omap_hwmod omap3xxx_gpio1_hwmod
= {
715 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
716 .main_clk
= "gpio1_ick",
717 .opt_clks
= gpio1_opt_clks
,
718 .opt_clks_cnt
= ARRAY_SIZE(gpio1_opt_clks
),
721 .module_offs
= WKUP_MOD
,
723 .idlest_idle_bit
= OMAP3430_ST_GPIO1_SHIFT
,
726 .class = &omap3xxx_gpio_hwmod_class
,
730 static struct omap_hwmod_opt_clk gpio2_opt_clks
[] = {
731 { .role
= "dbclk", .clk
= "gpio2_dbck", },
734 static struct omap_hwmod omap3xxx_gpio2_hwmod
= {
736 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
737 .main_clk
= "gpio2_ick",
738 .opt_clks
= gpio2_opt_clks
,
739 .opt_clks_cnt
= ARRAY_SIZE(gpio2_opt_clks
),
742 .module_offs
= OMAP3430_PER_MOD
,
744 .idlest_idle_bit
= OMAP3430_ST_GPIO2_SHIFT
,
747 .class = &omap3xxx_gpio_hwmod_class
,
751 static struct omap_hwmod_opt_clk gpio3_opt_clks
[] = {
752 { .role
= "dbclk", .clk
= "gpio3_dbck", },
755 static struct omap_hwmod omap3xxx_gpio3_hwmod
= {
757 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
758 .main_clk
= "gpio3_ick",
759 .opt_clks
= gpio3_opt_clks
,
760 .opt_clks_cnt
= ARRAY_SIZE(gpio3_opt_clks
),
763 .module_offs
= OMAP3430_PER_MOD
,
765 .idlest_idle_bit
= OMAP3430_ST_GPIO3_SHIFT
,
768 .class = &omap3xxx_gpio_hwmod_class
,
772 static struct omap_hwmod_opt_clk gpio4_opt_clks
[] = {
773 { .role
= "dbclk", .clk
= "gpio4_dbck", },
776 static struct omap_hwmod omap3xxx_gpio4_hwmod
= {
778 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
779 .main_clk
= "gpio4_ick",
780 .opt_clks
= gpio4_opt_clks
,
781 .opt_clks_cnt
= ARRAY_SIZE(gpio4_opt_clks
),
784 .module_offs
= OMAP3430_PER_MOD
,
786 .idlest_idle_bit
= OMAP3430_ST_GPIO4_SHIFT
,
789 .class = &omap3xxx_gpio_hwmod_class
,
794 static struct omap_hwmod_opt_clk gpio5_opt_clks
[] = {
795 { .role
= "dbclk", .clk
= "gpio5_dbck", },
798 static struct omap_hwmod omap3xxx_gpio5_hwmod
= {
800 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
801 .main_clk
= "gpio5_ick",
802 .opt_clks
= gpio5_opt_clks
,
803 .opt_clks_cnt
= ARRAY_SIZE(gpio5_opt_clks
),
806 .module_offs
= OMAP3430_PER_MOD
,
808 .idlest_idle_bit
= OMAP3430_ST_GPIO5_SHIFT
,
811 .class = &omap3xxx_gpio_hwmod_class
,
816 static struct omap_hwmod_opt_clk gpio6_opt_clks
[] = {
817 { .role
= "dbclk", .clk
= "gpio6_dbck", },
820 static struct omap_hwmod omap3xxx_gpio6_hwmod
= {
822 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
823 .main_clk
= "gpio6_ick",
824 .opt_clks
= gpio6_opt_clks
,
825 .opt_clks_cnt
= ARRAY_SIZE(gpio6_opt_clks
),
828 .module_offs
= OMAP3430_PER_MOD
,
830 .idlest_idle_bit
= OMAP3430_ST_GPIO6_SHIFT
,
833 .class = &omap3xxx_gpio_hwmod_class
,
837 static struct omap_dma_dev_attr dma_dev_attr
= {
838 .dev_caps
= RESERVE_CHANNEL
| DMA_LINKED_LCH
| GLOBAL_PRIORITY
|
839 IS_CSSA_32
| IS_CDSA_32
| IS_RW_PRIORITY
,
843 static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc
= {
847 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
848 SYSC_HAS_MIDLEMODE
| SYSC_HAS_CLOCKACTIVITY
|
849 SYSC_HAS_EMUFREE
| SYSC_HAS_AUTOIDLE
|
850 SYSS_HAS_RESET_STATUS
),
851 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
852 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
853 .sysc_fields
= &omap_hwmod_sysc_type1
,
856 static struct omap_hwmod_class omap3xxx_dma_hwmod_class
= {
858 .sysc
= &omap3xxx_dma_sysc
,
862 static struct omap_hwmod omap3xxx_dma_system_hwmod
= {
864 .class = &omap3xxx_dma_hwmod_class
,
865 .main_clk
= "core_l3_ick",
868 .module_offs
= CORE_MOD
,
870 .idlest_idle_bit
= OMAP3430_ST_SDMA_SHIFT
,
873 .dev_attr
= &dma_dev_attr
,
874 .flags
= HWMOD_NO_IDLEST
,
879 * multi channel buffered serial port controller
882 static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc
= {
885 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_ENAWAKEUP
|
886 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
),
887 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
888 .sysc_fields
= &omap_hwmod_sysc_type1
,
891 static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class
= {
893 .sysc
= &omap3xxx_mcbsp_sysc
,
896 /* McBSP functional clock mapping */
897 static struct omap_hwmod_opt_clk mcbsp15_opt_clks
[] = {
898 { .role
= "pad_fck", .clk
= "mcbsp_clks" },
899 { .role
= "prcm_fck", .clk
= "core_96m_fck" },
902 static struct omap_hwmod_opt_clk mcbsp234_opt_clks
[] = {
903 { .role
= "pad_fck", .clk
= "mcbsp_clks" },
904 { .role
= "prcm_fck", .clk
= "per_96m_fck" },
908 static struct omap_hwmod omap3xxx_mcbsp1_hwmod
= {
910 .class = &omap3xxx_mcbsp_hwmod_class
,
911 .main_clk
= "mcbsp1_fck",
914 .module_offs
= CORE_MOD
,
916 .idlest_idle_bit
= OMAP3430_ST_MCBSP1_SHIFT
,
919 .opt_clks
= mcbsp15_opt_clks
,
920 .opt_clks_cnt
= ARRAY_SIZE(mcbsp15_opt_clks
),
924 static struct omap_hwmod omap3xxx_mcbsp2_hwmod
= {
926 .class = &omap3xxx_mcbsp_hwmod_class
,
927 .main_clk
= "mcbsp2_fck",
930 .module_offs
= OMAP3430_PER_MOD
,
932 .idlest_idle_bit
= OMAP3430_ST_MCBSP2_SHIFT
,
935 .opt_clks
= mcbsp234_opt_clks
,
936 .opt_clks_cnt
= ARRAY_SIZE(mcbsp234_opt_clks
),
940 static struct omap_hwmod omap3xxx_mcbsp3_hwmod
= {
942 .class = &omap3xxx_mcbsp_hwmod_class
,
943 .main_clk
= "mcbsp3_fck",
946 .module_offs
= OMAP3430_PER_MOD
,
948 .idlest_idle_bit
= OMAP3430_ST_MCBSP3_SHIFT
,
951 .opt_clks
= mcbsp234_opt_clks
,
952 .opt_clks_cnt
= ARRAY_SIZE(mcbsp234_opt_clks
),
956 static struct omap_hwmod omap3xxx_mcbsp4_hwmod
= {
958 .class = &omap3xxx_mcbsp_hwmod_class
,
959 .main_clk
= "mcbsp4_fck",
962 .module_offs
= OMAP3430_PER_MOD
,
964 .idlest_idle_bit
= OMAP3430_ST_MCBSP4_SHIFT
,
967 .opt_clks
= mcbsp234_opt_clks
,
968 .opt_clks_cnt
= ARRAY_SIZE(mcbsp234_opt_clks
),
972 static struct omap_hwmod omap3xxx_mcbsp5_hwmod
= {
974 .class = &omap3xxx_mcbsp_hwmod_class
,
975 .main_clk
= "mcbsp5_fck",
978 .module_offs
= CORE_MOD
,
980 .idlest_idle_bit
= OMAP3430_ST_MCBSP5_SHIFT
,
983 .opt_clks
= mcbsp15_opt_clks
,
984 .opt_clks_cnt
= ARRAY_SIZE(mcbsp15_opt_clks
),
987 /* 'mcbsp sidetone' class */
988 static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc
= {
991 .sysc_flags
= SYSC_HAS_AUTOIDLE
,
992 .sysc_fields
= &omap_hwmod_sysc_type1
,
995 static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class
= {
996 .name
= "mcbsp_sidetone",
997 .sysc
= &omap3xxx_mcbsp_sidetone_sysc
,
1000 /* mcbsp2_sidetone */
1001 static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod
= {
1002 .name
= "mcbsp2_sidetone",
1003 .class = &omap3xxx_mcbsp_sidetone_hwmod_class
,
1004 .main_clk
= "mcbsp2_ick",
1005 .flags
= HWMOD_NO_IDLEST
,
1008 /* mcbsp3_sidetone */
1009 static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod
= {
1010 .name
= "mcbsp3_sidetone",
1011 .class = &omap3xxx_mcbsp_sidetone_hwmod_class
,
1012 .main_clk
= "mcbsp3_ick",
1013 .flags
= HWMOD_NO_IDLEST
,
1017 static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc
= {
1018 .rev_offs
= -ENODEV
,
1020 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_NO_CACHE
),
1021 .sysc_fields
= &omap34xx_sr_sysc_fields
,
1024 static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class
= {
1025 .name
= "smartreflex",
1026 .sysc
= &omap34xx_sr_sysc
,
1029 static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc
= {
1030 .rev_offs
= -ENODEV
,
1032 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1033 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_ENAWAKEUP
|
1035 .sysc_fields
= &omap36xx_sr_sysc_fields
,
1038 static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class
= {
1039 .name
= "smartreflex",
1040 .sysc
= &omap36xx_sr_sysc
,
1044 static struct omap_smartreflex_dev_attr sr1_dev_attr
= {
1045 .sensor_voltdm_name
= "mpu_iva",
1049 static struct omap_hwmod omap34xx_sr1_hwmod
= {
1050 .name
= "smartreflex_mpu_iva",
1051 .class = &omap34xx_smartreflex_hwmod_class
,
1052 .main_clk
= "sr1_fck",
1055 .module_offs
= WKUP_MOD
,
1057 .idlest_idle_bit
= OMAP3430_EN_SR1_SHIFT
,
1060 .dev_attr
= &sr1_dev_attr
,
1061 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
1064 static struct omap_hwmod omap36xx_sr1_hwmod
= {
1065 .name
= "smartreflex_mpu_iva",
1066 .class = &omap36xx_smartreflex_hwmod_class
,
1067 .main_clk
= "sr1_fck",
1070 .module_offs
= WKUP_MOD
,
1072 .idlest_idle_bit
= OMAP3430_EN_SR1_SHIFT
,
1075 .dev_attr
= &sr1_dev_attr
,
1079 static struct omap_smartreflex_dev_attr sr2_dev_attr
= {
1080 .sensor_voltdm_name
= "core",
1084 static struct omap_hwmod omap34xx_sr2_hwmod
= {
1085 .name
= "smartreflex_core",
1086 .class = &omap34xx_smartreflex_hwmod_class
,
1087 .main_clk
= "sr2_fck",
1090 .module_offs
= WKUP_MOD
,
1092 .idlest_idle_bit
= OMAP3430_EN_SR2_SHIFT
,
1095 .dev_attr
= &sr2_dev_attr
,
1096 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
1099 static struct omap_hwmod omap36xx_sr2_hwmod
= {
1100 .name
= "smartreflex_core",
1101 .class = &omap36xx_smartreflex_hwmod_class
,
1102 .main_clk
= "sr2_fck",
1105 .module_offs
= WKUP_MOD
,
1107 .idlest_idle_bit
= OMAP3430_EN_SR2_SHIFT
,
1110 .dev_attr
= &sr2_dev_attr
,
1115 * mailbox module allowing communication between the on-chip processors
1116 * using a queued mailbox-interrupt mechanism.
1119 static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc
= {
1123 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1124 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
),
1125 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1126 .sysc_fields
= &omap_hwmod_sysc_type1
,
1129 static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class
= {
1131 .sysc
= &omap3xxx_mailbox_sysc
,
1134 static struct omap_hwmod omap3xxx_mailbox_hwmod
= {
1136 .class = &omap3xxx_mailbox_hwmod_class
,
1137 .main_clk
= "mailboxes_ick",
1140 .module_offs
= CORE_MOD
,
1142 .idlest_idle_bit
= OMAP3430_ST_MAILBOXES_SHIFT
,
1149 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1153 static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc
= {
1155 .sysc_offs
= 0x0010,
1156 .syss_offs
= 0x0014,
1157 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1158 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1159 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
1160 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1161 .sysc_fields
= &omap_hwmod_sysc_type1
,
1164 static struct omap_hwmod_class omap34xx_mcspi_class
= {
1166 .sysc
= &omap34xx_mcspi_sysc
,
1170 static struct omap_hwmod omap34xx_mcspi1
= {
1172 .main_clk
= "mcspi1_fck",
1175 .module_offs
= CORE_MOD
,
1177 .idlest_idle_bit
= OMAP3430_ST_MCSPI1_SHIFT
,
1180 .class = &omap34xx_mcspi_class
,
1184 static struct omap_hwmod omap34xx_mcspi2
= {
1186 .main_clk
= "mcspi2_fck",
1189 .module_offs
= CORE_MOD
,
1191 .idlest_idle_bit
= OMAP3430_ST_MCSPI2_SHIFT
,
1194 .class = &omap34xx_mcspi_class
,
1198 static struct omap_hwmod omap34xx_mcspi3
= {
1200 .main_clk
= "mcspi3_fck",
1203 .module_offs
= CORE_MOD
,
1205 .idlest_idle_bit
= OMAP3430_ST_MCSPI3_SHIFT
,
1208 .class = &omap34xx_mcspi_class
,
1212 static struct omap_hwmod omap34xx_mcspi4
= {
1214 .main_clk
= "mcspi4_fck",
1217 .module_offs
= CORE_MOD
,
1219 .idlest_idle_bit
= OMAP3430_ST_MCSPI4_SHIFT
,
1222 .class = &omap34xx_mcspi_class
,
1226 static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc
= {
1228 .sysc_offs
= 0x0404,
1229 .syss_offs
= 0x0408,
1230 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
|
1231 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1233 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1234 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
1235 .sysc_fields
= &omap_hwmod_sysc_type1
,
1238 static struct omap_hwmod_class usbotg_class
= {
1240 .sysc
= &omap3xxx_usbhsotg_sysc
,
1245 static struct omap_hwmod omap3xxx_usbhsotg_hwmod
= {
1246 .name
= "usb_otg_hs",
1247 .main_clk
= "hsotgusb_ick",
1250 .module_offs
= CORE_MOD
,
1252 .idlest_idle_bit
= OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT
,
1255 .class = &usbotg_class
,
1258 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1259 * broken when autoidle is enabled
1260 * workaround is to disable the autoidle bit at module level.
1262 * Enabling the device in any other MIDLEMODE setting but force-idle
1263 * causes core_pwrdm not enter idle states at least on OMAP3630.
1264 * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY
1265 * signal when MIDLEMODE is set to force-idle.
1267 .flags
= HWMOD_NO_OCP_AUTOIDLE
| HWMOD_SWSUP_SIDLE
|
1268 HWMOD_FORCE_MSTANDBY
| HWMOD_RECONFIG_IO_CHAIN
,
1273 static struct omap_hwmod_class am35xx_usbotg_class
= {
1274 .name
= "am35xx_usbotg",
1277 static struct omap_hwmod am35xx_usbhsotg_hwmod
= {
1278 .name
= "am35x_otg_hs",
1279 .main_clk
= "hsotgusb_fck",
1280 .class = &am35xx_usbotg_class
,
1281 .flags
= HWMOD_NO_IDLEST
,
1284 /* MMC/SD/SDIO common */
1285 static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc
= {
1289 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1290 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1291 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
1292 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1293 .sysc_fields
= &omap_hwmod_sysc_type1
,
1296 static struct omap_hwmod_class omap34xx_mmc_class
= {
1298 .sysc
= &omap34xx_mmc_sysc
,
1305 static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks
[] = {
1306 { .role
= "dbck", .clk
= "omap_32k_fck", },
1309 static struct omap_hsmmc_dev_attr mmc1_dev_attr
= {
1310 .flags
= OMAP_HSMMC_SUPPORTS_DUAL_VOLT
,
1313 /* See 35xx errata 2.1.1.128 in SPRZ278F */
1314 static struct omap_hsmmc_dev_attr mmc1_pre_es3_dev_attr
= {
1315 .flags
= (OMAP_HSMMC_SUPPORTS_DUAL_VOLT
|
1316 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ
),
1319 static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod
= {
1321 .opt_clks
= omap34xx_mmc1_opt_clks
,
1322 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc1_opt_clks
),
1323 .main_clk
= "mmchs1_fck",
1326 .module_offs
= CORE_MOD
,
1328 .idlest_idle_bit
= OMAP3430_ST_MMC1_SHIFT
,
1331 .dev_attr
= &mmc1_pre_es3_dev_attr
,
1332 .class = &omap34xx_mmc_class
,
1335 static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod
= {
1337 .opt_clks
= omap34xx_mmc1_opt_clks
,
1338 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc1_opt_clks
),
1339 .main_clk
= "mmchs1_fck",
1342 .module_offs
= CORE_MOD
,
1344 .idlest_idle_bit
= OMAP3430_ST_MMC1_SHIFT
,
1347 .dev_attr
= &mmc1_dev_attr
,
1348 .class = &omap34xx_mmc_class
,
1355 static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks
[] = {
1356 { .role
= "dbck", .clk
= "omap_32k_fck", },
1359 /* See 35xx errata 2.1.1.128 in SPRZ278F */
1360 static struct omap_hsmmc_dev_attr mmc2_pre_es3_dev_attr
= {
1361 .flags
= OMAP_HSMMC_BROKEN_MULTIBLOCK_READ
,
1364 static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod
= {
1366 .opt_clks
= omap34xx_mmc2_opt_clks
,
1367 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc2_opt_clks
),
1368 .main_clk
= "mmchs2_fck",
1371 .module_offs
= CORE_MOD
,
1373 .idlest_idle_bit
= OMAP3430_ST_MMC2_SHIFT
,
1376 .dev_attr
= &mmc2_pre_es3_dev_attr
,
1377 .class = &omap34xx_mmc_class
,
1380 static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod
= {
1382 .opt_clks
= omap34xx_mmc2_opt_clks
,
1383 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc2_opt_clks
),
1384 .main_clk
= "mmchs2_fck",
1387 .module_offs
= CORE_MOD
,
1389 .idlest_idle_bit
= OMAP3430_ST_MMC2_SHIFT
,
1392 .class = &omap34xx_mmc_class
,
1399 static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks
[] = {
1400 { .role
= "dbck", .clk
= "omap_32k_fck", },
1403 static struct omap_hwmod omap3xxx_mmc3_hwmod
= {
1405 .opt_clks
= omap34xx_mmc3_opt_clks
,
1406 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc3_opt_clks
),
1407 .main_clk
= "mmchs3_fck",
1410 .module_offs
= CORE_MOD
,
1412 .idlest_idle_bit
= OMAP3430_ST_MMC3_SHIFT
,
1415 .class = &omap34xx_mmc_class
,
1419 * 'usb_host_hs' class
1420 * high-speed multi-port usb host controller
1423 static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc
= {
1425 .sysc_offs
= 0x0010,
1426 .syss_offs
= 0x0014,
1427 .sysc_flags
= (SYSC_HAS_MIDLEMODE
| SYSC_HAS_CLOCKACTIVITY
|
1428 SYSC_HAS_SIDLEMODE
| SYSC_HAS_ENAWAKEUP
|
1429 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
1430 SYSS_HAS_RESET_STATUS
),
1431 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1432 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
1433 .sysc_fields
= &omap_hwmod_sysc_type1
,
1436 static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class
= {
1437 .name
= "usb_host_hs",
1438 .sysc
= &omap3xxx_usb_host_hs_sysc
,
1442 static struct omap_hwmod omap3xxx_usb_host_hs_hwmod
= {
1443 .name
= "usb_host_hs",
1444 .class = &omap3xxx_usb_host_hs_hwmod_class
,
1445 .clkdm_name
= "usbhost_clkdm",
1446 .main_clk
= "usbhost_48m_fck",
1449 .module_offs
= OMAP3430ES2_USBHOST_MOD
,
1451 .idlest_idle_bit
= OMAP3430ES2_ST_USBHOST_IDLE_SHIFT
,
1456 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1460 * In the following configuration :
1461 * - USBHOST module is set to smart-idle mode
1462 * - PRCM asserts idle_req to the USBHOST module ( This typically
1463 * happens when the system is going to a low power mode : all ports
1464 * have been suspended, the master part of the USBHOST module has
1465 * entered the standby state, and SW has cut the functional clocks)
1466 * - an USBHOST interrupt occurs before the module is able to answer
1467 * idle_ack, typically a remote wakeup IRQ.
1468 * Then the USB HOST module will enter a deadlock situation where it
1469 * is no more accessible nor functional.
1472 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1476 * Errata: USB host EHCI may stall when entering smart-standby mode
1480 * When the USBHOST module is set to smart-standby mode, and when it is
1481 * ready to enter the standby state (i.e. all ports are suspended and
1482 * all attached devices are in suspend mode), then it can wrongly assert
1483 * the Mstandby signal too early while there are still some residual OCP
1484 * transactions ongoing. If this condition occurs, the internal state
1485 * machine may go to an undefined state and the USB link may be stuck
1486 * upon the next resume.
1489 * Don't use smart standby; use only force standby,
1490 * hence HWMOD_SWSUP_MSTANDBY
1493 .flags
= HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
,
1497 * 'usb_tll_hs' class
1498 * usb_tll_hs module is the adapter on the usb_host_hs ports
1500 static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc
= {
1502 .sysc_offs
= 0x0010,
1503 .syss_offs
= 0x0014,
1504 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1505 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1507 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1508 .sysc_fields
= &omap_hwmod_sysc_type1
,
1511 static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class
= {
1512 .name
= "usb_tll_hs",
1513 .sysc
= &omap3xxx_usb_tll_hs_sysc
,
1517 static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod
= {
1518 .name
= "usb_tll_hs",
1519 .class = &omap3xxx_usb_tll_hs_hwmod_class
,
1520 .clkdm_name
= "core_l4_clkdm",
1521 .main_clk
= "usbtll_fck",
1524 .module_offs
= CORE_MOD
,
1526 .idlest_idle_bit
= OMAP3430ES2_ST_USBTLL_SHIFT
,
1531 static struct omap_hwmod omap3xxx_hdq1w_hwmod
= {
1533 .main_clk
= "hdq_fck",
1536 .module_offs
= CORE_MOD
,
1538 .idlest_idle_bit
= OMAP3430_ST_HDQ_SHIFT
,
1541 .class = &omap2_hdq1w_class
,
1545 static struct omap_hwmod_rst_info omap3xxx_sad2d_resets
[] = {
1546 { .name
= "rst_modem_pwron_sw", .rst_shift
= 0 },
1547 { .name
= "rst_modem_sw", .rst_shift
= 1 },
1550 static struct omap_hwmod_class omap3xxx_sad2d_class
= {
1554 static struct omap_hwmod omap3xxx_sad2d_hwmod
= {
1556 .rst_lines
= omap3xxx_sad2d_resets
,
1557 .rst_lines_cnt
= ARRAY_SIZE(omap3xxx_sad2d_resets
),
1558 .main_clk
= "sad2d_ick",
1561 .module_offs
= CORE_MOD
,
1563 .idlest_idle_bit
= OMAP3430_ST_SAD2D_SHIFT
,
1566 .class = &omap3xxx_sad2d_class
,
1570 * '32K sync counter' class
1571 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
1573 static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc
= {
1575 .sysc_offs
= 0x0004,
1576 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
1577 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
),
1578 .sysc_fields
= &omap_hwmod_sysc_type1
,
1581 static struct omap_hwmod_class omap3xxx_counter_hwmod_class
= {
1583 .sysc
= &omap3xxx_counter_sysc
,
1586 static struct omap_hwmod omap3xxx_counter_32k_hwmod
= {
1587 .name
= "counter_32k",
1588 .class = &omap3xxx_counter_hwmod_class
,
1589 .clkdm_name
= "wkup_clkdm",
1590 .flags
= HWMOD_SWSUP_SIDLE
,
1591 .main_clk
= "wkup_32k_fck",
1594 .module_offs
= WKUP_MOD
,
1596 .idlest_idle_bit
= OMAP3430_ST_32KSYNC_SHIFT
,
1603 * general purpose memory controller
1606 static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc
= {
1608 .sysc_offs
= 0x0010,
1609 .syss_offs
= 0x0014,
1610 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_SIDLEMODE
|
1611 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
1612 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1613 .sysc_fields
= &omap_hwmod_sysc_type1
,
1616 static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class
= {
1618 .sysc
= &omap3xxx_gpmc_sysc
,
1621 static struct omap_hwmod omap3xxx_gpmc_hwmod
= {
1623 .class = &omap3xxx_gpmc_hwmod_class
,
1624 .clkdm_name
= "core_l3_clkdm",
1625 .main_clk
= "gpmc_fck",
1626 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
1627 .flags
= HWMOD_NO_IDLEST
| DEBUG_OMAP_GPMC_HWMOD_FLAGS
,
1634 /* L3 -> L4_CORE interface */
1635 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core
= {
1636 .master
= &omap3xxx_l3_main_hwmod
,
1637 .slave
= &omap3xxx_l4_core_hwmod
,
1638 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1641 /* L3 -> L4_PER interface */
1642 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per
= {
1643 .master
= &omap3xxx_l3_main_hwmod
,
1644 .slave
= &omap3xxx_l4_per_hwmod
,
1645 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1649 /* MPU -> L3 interface */
1650 static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main
= {
1651 .master
= &omap3xxx_mpu_hwmod
,
1652 .slave
= &omap3xxx_l3_main_hwmod
,
1653 .user
= OCP_USER_MPU
,
1658 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss
= {
1659 .master
= &omap3xxx_l3_main_hwmod
,
1660 .slave
= &omap3xxx_debugss_hwmod
,
1661 .user
= OCP_USER_MPU
,
1665 static struct omap_hwmod_ocp_if omap3430es1_dss__l3
= {
1666 .master
= &omap3430es1_dss_core_hwmod
,
1667 .slave
= &omap3xxx_l3_main_hwmod
,
1668 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1671 static struct omap_hwmod_ocp_if omap3xxx_dss__l3
= {
1672 .master
= &omap3xxx_dss_core_hwmod
,
1673 .slave
= &omap3xxx_l3_main_hwmod
,
1676 .l3_perm_bit
= OMAP3_L3_CORE_FW_INIT_ID_DSS
,
1677 .flags
= OMAP_FIREWALL_L3
,
1680 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1683 /* l3_core -> usbhsotg interface */
1684 static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3
= {
1685 .master
= &omap3xxx_usbhsotg_hwmod
,
1686 .slave
= &omap3xxx_l3_main_hwmod
,
1687 .clk
= "core_l3_ick",
1688 .user
= OCP_USER_MPU
,
1691 /* l3_core -> am35xx_usbhsotg interface */
1692 static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3
= {
1693 .master
= &am35xx_usbhsotg_hwmod
,
1694 .slave
= &omap3xxx_l3_main_hwmod
,
1695 .clk
= "hsotgusb_ick",
1696 .user
= OCP_USER_MPU
,
1699 /* l3_core -> sad2d interface */
1700 static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3
= {
1701 .master
= &omap3xxx_sad2d_hwmod
,
1702 .slave
= &omap3xxx_l3_main_hwmod
,
1703 .clk
= "core_l3_ick",
1704 .user
= OCP_USER_MPU
,
1707 /* L4_CORE -> L4_WKUP interface */
1708 static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup
= {
1709 .master
= &omap3xxx_l4_core_hwmod
,
1710 .slave
= &omap3xxx_l4_wkup_hwmod
,
1711 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1714 /* L4 CORE -> MMC1 interface */
1715 static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1
= {
1716 .master
= &omap3xxx_l4_core_hwmod
,
1717 .slave
= &omap3xxx_pre_es3_mmc1_hwmod
,
1718 .clk
= "mmchs1_ick",
1719 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1720 .flags
= OMAP_FIREWALL_L4
,
1723 static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1
= {
1724 .master
= &omap3xxx_l4_core_hwmod
,
1725 .slave
= &omap3xxx_es3plus_mmc1_hwmod
,
1726 .clk
= "mmchs1_ick",
1727 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1728 .flags
= OMAP_FIREWALL_L4
,
1731 /* L4 CORE -> MMC2 interface */
1732 static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2
= {
1733 .master
= &omap3xxx_l4_core_hwmod
,
1734 .slave
= &omap3xxx_pre_es3_mmc2_hwmod
,
1735 .clk
= "mmchs2_ick",
1736 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1737 .flags
= OMAP_FIREWALL_L4
,
1740 static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2
= {
1741 .master
= &omap3xxx_l4_core_hwmod
,
1742 .slave
= &omap3xxx_es3plus_mmc2_hwmod
,
1743 .clk
= "mmchs2_ick",
1744 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1745 .flags
= OMAP_FIREWALL_L4
,
1748 /* L4 CORE -> MMC3 interface */
1750 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3
= {
1751 .master
= &omap3xxx_l4_core_hwmod
,
1752 .slave
= &omap3xxx_mmc3_hwmod
,
1753 .clk
= "mmchs3_ick",
1754 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1755 .flags
= OMAP_FIREWALL_L4
,
1758 /* L4 CORE -> UART1 interface */
1760 static struct omap_hwmod_ocp_if omap3_l4_core__uart1
= {
1761 .master
= &omap3xxx_l4_core_hwmod
,
1762 .slave
= &omap3xxx_uart1_hwmod
,
1764 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1767 /* L4 CORE -> UART2 interface */
1769 static struct omap_hwmod_ocp_if omap3_l4_core__uart2
= {
1770 .master
= &omap3xxx_l4_core_hwmod
,
1771 .slave
= &omap3xxx_uart2_hwmod
,
1773 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1776 /* L4 PER -> UART3 interface */
1778 static struct omap_hwmod_ocp_if omap3_l4_per__uart3
= {
1779 .master
= &omap3xxx_l4_per_hwmod
,
1780 .slave
= &omap3xxx_uart3_hwmod
,
1782 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1785 /* L4 PER -> UART4 interface */
1787 static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4
= {
1788 .master
= &omap3xxx_l4_per_hwmod
,
1789 .slave
= &omap36xx_uart4_hwmod
,
1791 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1794 /* AM35xx: L4 CORE -> UART4 interface */
1796 static struct omap_hwmod_ocp_if am35xx_l4_core__uart4
= {
1797 .master
= &omap3xxx_l4_core_hwmod
,
1798 .slave
= &am35xx_uart4_hwmod
,
1800 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1803 /* L4 CORE -> I2C1 interface */
1804 static struct omap_hwmod_ocp_if omap3_l4_core__i2c1
= {
1805 .master
= &omap3xxx_l4_core_hwmod
,
1806 .slave
= &omap3xxx_i2c1_hwmod
,
1810 .l4_fw_region
= OMAP3_L4_CORE_FW_I2C1_REGION
,
1812 .flags
= OMAP_FIREWALL_L4
,
1815 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1818 /* L4 CORE -> I2C2 interface */
1819 static struct omap_hwmod_ocp_if omap3_l4_core__i2c2
= {
1820 .master
= &omap3xxx_l4_core_hwmod
,
1821 .slave
= &omap3xxx_i2c2_hwmod
,
1825 .l4_fw_region
= OMAP3_L4_CORE_FW_I2C2_REGION
,
1827 .flags
= OMAP_FIREWALL_L4
,
1830 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1833 /* L4 CORE -> I2C3 interface */
1835 static struct omap_hwmod_ocp_if omap3_l4_core__i2c3
= {
1836 .master
= &omap3xxx_l4_core_hwmod
,
1837 .slave
= &omap3xxx_i2c3_hwmod
,
1841 .l4_fw_region
= OMAP3_L4_CORE_FW_I2C3_REGION
,
1843 .flags
= OMAP_FIREWALL_L4
,
1846 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1849 /* L4 CORE -> SR1 interface */
1850 static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1
= {
1851 .master
= &omap3xxx_l4_core_hwmod
,
1852 .slave
= &omap34xx_sr1_hwmod
,
1854 .user
= OCP_USER_MPU
,
1857 static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1
= {
1858 .master
= &omap3xxx_l4_core_hwmod
,
1859 .slave
= &omap36xx_sr1_hwmod
,
1861 .user
= OCP_USER_MPU
,
1864 /* L4 CORE -> SR2 interface */
1866 static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2
= {
1867 .master
= &omap3xxx_l4_core_hwmod
,
1868 .slave
= &omap34xx_sr2_hwmod
,
1870 .user
= OCP_USER_MPU
,
1873 static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2
= {
1874 .master
= &omap3xxx_l4_core_hwmod
,
1875 .slave
= &omap36xx_sr2_hwmod
,
1877 .user
= OCP_USER_MPU
,
1881 /* l4_core -> usbhsotg */
1882 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg
= {
1883 .master
= &omap3xxx_l4_core_hwmod
,
1884 .slave
= &omap3xxx_usbhsotg_hwmod
,
1886 .user
= OCP_USER_MPU
,
1890 /* l4_core -> usbhsotg */
1891 static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg
= {
1892 .master
= &omap3xxx_l4_core_hwmod
,
1893 .slave
= &am35xx_usbhsotg_hwmod
,
1894 .clk
= "hsotgusb_ick",
1895 .user
= OCP_USER_MPU
,
1898 /* L4_WKUP -> L4_SEC interface */
1899 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec
= {
1900 .master
= &omap3xxx_l4_wkup_hwmod
,
1901 .slave
= &omap3xxx_l4_sec_hwmod
,
1902 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1905 /* IVA2 <- L3 interface */
1906 static struct omap_hwmod_ocp_if omap3xxx_l3__iva
= {
1907 .master
= &omap3xxx_l3_main_hwmod
,
1908 .slave
= &omap3xxx_iva_hwmod
,
1909 .clk
= "core_l3_ick",
1910 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1914 /* l4_wkup -> timer1 */
1915 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1
= {
1916 .master
= &omap3xxx_l4_wkup_hwmod
,
1917 .slave
= &omap3xxx_timer1_hwmod
,
1919 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1923 /* l4_per -> timer2 */
1924 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2
= {
1925 .master
= &omap3xxx_l4_per_hwmod
,
1926 .slave
= &omap3xxx_timer2_hwmod
,
1928 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1932 /* l4_per -> timer3 */
1933 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3
= {
1934 .master
= &omap3xxx_l4_per_hwmod
,
1935 .slave
= &omap3xxx_timer3_hwmod
,
1937 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1941 /* l4_per -> timer4 */
1942 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4
= {
1943 .master
= &omap3xxx_l4_per_hwmod
,
1944 .slave
= &omap3xxx_timer4_hwmod
,
1946 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1950 /* l4_per -> timer5 */
1951 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5
= {
1952 .master
= &omap3xxx_l4_per_hwmod
,
1953 .slave
= &omap3xxx_timer5_hwmod
,
1955 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1959 /* l4_per -> timer6 */
1960 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6
= {
1961 .master
= &omap3xxx_l4_per_hwmod
,
1962 .slave
= &omap3xxx_timer6_hwmod
,
1964 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1968 /* l4_per -> timer7 */
1969 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7
= {
1970 .master
= &omap3xxx_l4_per_hwmod
,
1971 .slave
= &omap3xxx_timer7_hwmod
,
1973 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1977 /* l4_per -> timer8 */
1978 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8
= {
1979 .master
= &omap3xxx_l4_per_hwmod
,
1980 .slave
= &omap3xxx_timer8_hwmod
,
1982 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1986 /* l4_per -> timer9 */
1987 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9
= {
1988 .master
= &omap3xxx_l4_per_hwmod
,
1989 .slave
= &omap3xxx_timer9_hwmod
,
1991 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1994 /* l4_core -> timer10 */
1995 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10
= {
1996 .master
= &omap3xxx_l4_core_hwmod
,
1997 .slave
= &omap3xxx_timer10_hwmod
,
1999 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2002 /* l4_core -> timer11 */
2003 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11
= {
2004 .master
= &omap3xxx_l4_core_hwmod
,
2005 .slave
= &omap3xxx_timer11_hwmod
,
2007 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2011 /* l4_core -> timer12 */
2012 static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12
= {
2013 .master
= &omap3xxx_l4_sec_hwmod
,
2014 .slave
= &omap3xxx_timer12_hwmod
,
2016 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2019 /* l4_wkup -> wd_timer2 */
2021 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2
= {
2022 .master
= &omap3xxx_l4_wkup_hwmod
,
2023 .slave
= &omap3xxx_wd_timer2_hwmod
,
2025 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2028 /* l4_core -> dss */
2029 static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss
= {
2030 .master
= &omap3xxx_l4_core_hwmod
,
2031 .slave
= &omap3430es1_dss_core_hwmod
,
2035 .l4_fw_region
= OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION
,
2036 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2037 .flags
= OMAP_FIREWALL_L4
,
2040 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2043 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss
= {
2044 .master
= &omap3xxx_l4_core_hwmod
,
2045 .slave
= &omap3xxx_dss_core_hwmod
,
2049 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_CORE_REGION
,
2050 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2051 .flags
= OMAP_FIREWALL_L4
,
2054 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2057 /* l4_core -> dss_dispc */
2058 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc
= {
2059 .master
= &omap3xxx_l4_core_hwmod
,
2060 .slave
= &omap3xxx_dss_dispc_hwmod
,
2064 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_DISPC_REGION
,
2065 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2066 .flags
= OMAP_FIREWALL_L4
,
2069 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2072 /* l4_core -> dss_dsi1 */
2073 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1
= {
2074 .master
= &omap3xxx_l4_core_hwmod
,
2075 .slave
= &omap3xxx_dss_dsi1_hwmod
,
2079 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_DSI_REGION
,
2080 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2081 .flags
= OMAP_FIREWALL_L4
,
2084 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2087 /* l4_core -> dss_rfbi */
2088 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi
= {
2089 .master
= &omap3xxx_l4_core_hwmod
,
2090 .slave
= &omap3xxx_dss_rfbi_hwmod
,
2094 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_RFBI_REGION
,
2095 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2096 .flags
= OMAP_FIREWALL_L4
,
2099 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2102 /* l4_core -> dss_venc */
2103 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc
= {
2104 .master
= &omap3xxx_l4_core_hwmod
,
2105 .slave
= &omap3xxx_dss_venc_hwmod
,
2109 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_VENC_REGION
,
2110 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2111 .flags
= OMAP_FIREWALL_L4
,
2114 .flags
= OCPIF_SWSUP_IDLE
,
2115 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2118 /* l4_wkup -> gpio1 */
2120 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1
= {
2121 .master
= &omap3xxx_l4_wkup_hwmod
,
2122 .slave
= &omap3xxx_gpio1_hwmod
,
2123 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2126 /* l4_per -> gpio2 */
2128 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2
= {
2129 .master
= &omap3xxx_l4_per_hwmod
,
2130 .slave
= &omap3xxx_gpio2_hwmod
,
2131 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2134 /* l4_per -> gpio3 */
2136 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3
= {
2137 .master
= &omap3xxx_l4_per_hwmod
,
2138 .slave
= &omap3xxx_gpio3_hwmod
,
2139 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2144 * The memory management unit performs virtual to physical address translation
2145 * for its requestors.
2148 static struct omap_hwmod_class_sysconfig mmu_sysc
= {
2152 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
2153 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
),
2154 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
2155 .sysc_fields
= &omap_hwmod_sysc_type1
,
2158 static struct omap_hwmod_class omap3xxx_mmu_hwmod_class
= {
2164 static struct omap_hwmod omap3xxx_mmu_isp_hwmod
;
2166 /* l4_core -> mmu isp */
2167 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp
= {
2168 .master
= &omap3xxx_l4_core_hwmod
,
2169 .slave
= &omap3xxx_mmu_isp_hwmod
,
2170 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2173 static struct omap_hwmod omap3xxx_mmu_isp_hwmod
= {
2175 .class = &omap3xxx_mmu_hwmod_class
,
2176 .main_clk
= "cam_ick",
2177 .flags
= HWMOD_NO_IDLEST
,
2182 static struct omap_hwmod omap3xxx_mmu_iva_hwmod
;
2184 static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets
[] = {
2185 { .name
= "mmu", .rst_shift
= 1, .st_shift
= 9 },
2188 /* l3_main -> iva mmu */
2189 static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva
= {
2190 .master
= &omap3xxx_l3_main_hwmod
,
2191 .slave
= &omap3xxx_mmu_iva_hwmod
,
2192 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2195 static struct omap_hwmod omap3xxx_mmu_iva_hwmod
= {
2197 .class = &omap3xxx_mmu_hwmod_class
,
2198 .clkdm_name
= "iva2_clkdm",
2199 .rst_lines
= omap3xxx_mmu_iva_resets
,
2200 .rst_lines_cnt
= ARRAY_SIZE(omap3xxx_mmu_iva_resets
),
2201 .main_clk
= "iva2_ck",
2204 .module_offs
= OMAP3430_IVA2_MOD
,
2206 .idlest_idle_bit
= OMAP3430_ST_IVA2_SHIFT
,
2209 .flags
= HWMOD_NO_IDLEST
,
2212 /* l4_per -> gpio4 */
2214 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4
= {
2215 .master
= &omap3xxx_l4_per_hwmod
,
2216 .slave
= &omap3xxx_gpio4_hwmod
,
2217 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2220 /* l4_per -> gpio5 */
2222 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5
= {
2223 .master
= &omap3xxx_l4_per_hwmod
,
2224 .slave
= &omap3xxx_gpio5_hwmod
,
2225 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2228 /* l4_per -> gpio6 */
2230 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6
= {
2231 .master
= &omap3xxx_l4_per_hwmod
,
2232 .slave
= &omap3xxx_gpio6_hwmod
,
2233 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2236 /* dma_system -> L3 */
2237 static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3
= {
2238 .master
= &omap3xxx_dma_system_hwmod
,
2239 .slave
= &omap3xxx_l3_main_hwmod
,
2240 .clk
= "core_l3_ick",
2241 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2244 /* l4_cfg -> dma_system */
2245 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system
= {
2246 .master
= &omap3xxx_l4_core_hwmod
,
2247 .slave
= &omap3xxx_dma_system_hwmod
,
2248 .clk
= "core_l4_ick",
2249 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2253 /* l4_core -> mcbsp1 */
2254 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1
= {
2255 .master
= &omap3xxx_l4_core_hwmod
,
2256 .slave
= &omap3xxx_mcbsp1_hwmod
,
2257 .clk
= "mcbsp1_ick",
2258 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2262 /* l4_per -> mcbsp2 */
2263 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2
= {
2264 .master
= &omap3xxx_l4_per_hwmod
,
2265 .slave
= &omap3xxx_mcbsp2_hwmod
,
2266 .clk
= "mcbsp2_ick",
2267 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2271 /* l4_per -> mcbsp3 */
2272 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3
= {
2273 .master
= &omap3xxx_l4_per_hwmod
,
2274 .slave
= &omap3xxx_mcbsp3_hwmod
,
2275 .clk
= "mcbsp3_ick",
2276 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2280 /* l4_per -> mcbsp4 */
2281 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4
= {
2282 .master
= &omap3xxx_l4_per_hwmod
,
2283 .slave
= &omap3xxx_mcbsp4_hwmod
,
2284 .clk
= "mcbsp4_ick",
2285 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2289 /* l4_core -> mcbsp5 */
2290 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5
= {
2291 .master
= &omap3xxx_l4_core_hwmod
,
2292 .slave
= &omap3xxx_mcbsp5_hwmod
,
2293 .clk
= "mcbsp5_ick",
2294 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2298 /* l4_per -> mcbsp2_sidetone */
2299 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone
= {
2300 .master
= &omap3xxx_l4_per_hwmod
,
2301 .slave
= &omap3xxx_mcbsp2_sidetone_hwmod
,
2302 .clk
= "mcbsp2_ick",
2303 .user
= OCP_USER_MPU
,
2307 /* l4_per -> mcbsp3_sidetone */
2308 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone
= {
2309 .master
= &omap3xxx_l4_per_hwmod
,
2310 .slave
= &omap3xxx_mcbsp3_sidetone_hwmod
,
2311 .clk
= "mcbsp3_ick",
2312 .user
= OCP_USER_MPU
,
2315 /* l4_core -> mailbox */
2316 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox
= {
2317 .master
= &omap3xxx_l4_core_hwmod
,
2318 .slave
= &omap3xxx_mailbox_hwmod
,
2319 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2322 /* l4 core -> mcspi1 interface */
2323 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1
= {
2324 .master
= &omap3xxx_l4_core_hwmod
,
2325 .slave
= &omap34xx_mcspi1
,
2326 .clk
= "mcspi1_ick",
2327 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2330 /* l4 core -> mcspi2 interface */
2331 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2
= {
2332 .master
= &omap3xxx_l4_core_hwmod
,
2333 .slave
= &omap34xx_mcspi2
,
2334 .clk
= "mcspi2_ick",
2335 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2338 /* l4 core -> mcspi3 interface */
2339 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3
= {
2340 .master
= &omap3xxx_l4_core_hwmod
,
2341 .slave
= &omap34xx_mcspi3
,
2342 .clk
= "mcspi3_ick",
2343 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2346 /* l4 core -> mcspi4 interface */
2348 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4
= {
2349 .master
= &omap3xxx_l4_core_hwmod
,
2350 .slave
= &omap34xx_mcspi4
,
2351 .clk
= "mcspi4_ick",
2352 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2355 static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2
= {
2356 .master
= &omap3xxx_usb_host_hs_hwmod
,
2357 .slave
= &omap3xxx_l3_main_hwmod
,
2358 .clk
= "core_l3_ick",
2359 .user
= OCP_USER_MPU
,
2363 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs
= {
2364 .master
= &omap3xxx_l4_core_hwmod
,
2365 .slave
= &omap3xxx_usb_host_hs_hwmod
,
2366 .clk
= "usbhost_ick",
2367 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2371 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs
= {
2372 .master
= &omap3xxx_l4_core_hwmod
,
2373 .slave
= &omap3xxx_usb_tll_hs_hwmod
,
2374 .clk
= "usbtll_ick",
2375 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2378 /* l4_core -> hdq1w interface */
2379 static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w
= {
2380 .master
= &omap3xxx_l4_core_hwmod
,
2381 .slave
= &omap3xxx_hdq1w_hwmod
,
2383 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2384 .flags
= OMAP_FIREWALL_L4
| OCPIF_SWSUP_IDLE
,
2387 /* l4_wkup -> 32ksync_counter */
2390 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k
= {
2391 .master
= &omap3xxx_l4_wkup_hwmod
,
2392 .slave
= &omap3xxx_counter_32k_hwmod
,
2393 .clk
= "omap_32ksync_ick",
2394 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2397 /* am35xx has Davinci MDIO & EMAC */
2398 static struct omap_hwmod_class am35xx_mdio_class
= {
2399 .name
= "davinci_mdio",
2402 static struct omap_hwmod am35xx_mdio_hwmod
= {
2403 .name
= "davinci_mdio",
2404 .class = &am35xx_mdio_class
,
2405 .flags
= HWMOD_NO_IDLEST
,
2409 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2410 * but this will probably require some additional hwmod core support,
2411 * so is left as a future to-do item.
2413 static struct omap_hwmod_ocp_if am35xx_mdio__l3
= {
2414 .master
= &am35xx_mdio_hwmod
,
2415 .slave
= &omap3xxx_l3_main_hwmod
,
2417 .user
= OCP_USER_MPU
,
2420 /* l4_core -> davinci mdio */
2422 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2423 * but this will probably require some additional hwmod core support,
2424 * so is left as a future to-do item.
2426 static struct omap_hwmod_ocp_if am35xx_l4_core__mdio
= {
2427 .master
= &omap3xxx_l4_core_hwmod
,
2428 .slave
= &am35xx_mdio_hwmod
,
2430 .user
= OCP_USER_MPU
,
2433 static struct omap_hwmod_class am35xx_emac_class
= {
2434 .name
= "davinci_emac",
2437 static struct omap_hwmod am35xx_emac_hwmod
= {
2438 .name
= "davinci_emac",
2439 .class = &am35xx_emac_class
,
2441 * According to Mark Greer, the MPU will not return from WFI
2442 * when the EMAC signals an interrupt.
2443 * http://www.spinics.net/lists/arm-kernel/msg174734.html
2445 .flags
= (HWMOD_NO_IDLEST
| HWMOD_BLOCK_WFI
),
2448 /* l3_core -> davinci emac interface */
2450 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2451 * but this will probably require some additional hwmod core support,
2452 * so is left as a future to-do item.
2454 static struct omap_hwmod_ocp_if am35xx_emac__l3
= {
2455 .master
= &am35xx_emac_hwmod
,
2456 .slave
= &omap3xxx_l3_main_hwmod
,
2458 .user
= OCP_USER_MPU
,
2461 /* l4_core -> davinci emac */
2463 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2464 * but this will probably require some additional hwmod core support,
2465 * so is left as a future to-do item.
2467 static struct omap_hwmod_ocp_if am35xx_l4_core__emac
= {
2468 .master
= &omap3xxx_l4_core_hwmod
,
2469 .slave
= &am35xx_emac_hwmod
,
2471 .user
= OCP_USER_MPU
,
2474 static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc
= {
2475 .master
= &omap3xxx_l3_main_hwmod
,
2476 .slave
= &omap3xxx_gpmc_hwmod
,
2477 .clk
= "core_l3_ick",
2478 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2481 /* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */
2482 static struct omap_hwmod_class_sysconfig omap3_sham_sysc
= {
2486 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
2487 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
2488 .sysc_fields
= &omap3_sham_sysc_fields
,
2491 static struct omap_hwmod_class omap3xxx_sham_class
= {
2493 .sysc
= &omap3_sham_sysc
,
2498 static struct omap_hwmod omap3xxx_sham_hwmod
= {
2500 .main_clk
= "sha12_ick",
2503 .module_offs
= CORE_MOD
,
2505 .idlest_idle_bit
= OMAP3430_ST_SHA12_SHIFT
,
2508 .class = &omap3xxx_sham_class
,
2512 static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham
= {
2513 .master
= &omap3xxx_l4_core_hwmod
,
2514 .slave
= &omap3xxx_sham_hwmod
,
2516 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2519 /* l4_core -> AES */
2520 static struct omap_hwmod_class_sysconfig omap3_aes_sysc
= {
2524 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
2525 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
2526 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
2527 .sysc_fields
= &omap3xxx_aes_sysc_fields
,
2530 static struct omap_hwmod_class omap3xxx_aes_class
= {
2532 .sysc
= &omap3_aes_sysc
,
2536 static struct omap_hwmod omap3xxx_aes_hwmod
= {
2538 .main_clk
= "aes2_ick",
2541 .module_offs
= CORE_MOD
,
2543 .idlest_idle_bit
= OMAP3430_ST_AES2_SHIFT
,
2546 .class = &omap3xxx_aes_class
,
2550 static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes
= {
2551 .master
= &omap3xxx_l4_core_hwmod
,
2552 .slave
= &omap3xxx_aes_hwmod
,
2554 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2559 * synchronous serial interface (multichannel and full-duplex serial if)
2562 static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc
= {
2564 .sysc_offs
= 0x0010,
2565 .syss_offs
= 0x0014,
2566 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_MIDLEMODE
|
2567 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
),
2568 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
2569 .sysc_fields
= &omap_hwmod_sysc_type1
,
2572 static struct omap_hwmod_class omap3xxx_ssi_hwmod_class
= {
2574 .sysc
= &omap34xx_ssi_sysc
,
2577 static struct omap_hwmod omap3xxx_ssi_hwmod
= {
2579 .class = &omap3xxx_ssi_hwmod_class
,
2580 .clkdm_name
= "core_l4_clkdm",
2581 .main_clk
= "ssi_ssr_fck",
2584 .module_offs
= CORE_MOD
,
2586 .idlest_idle_bit
= OMAP3430ES2_ST_SSI_IDLE_SHIFT
,
2591 /* L4 CORE -> SSI */
2592 static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi
= {
2593 .master
= &omap3xxx_l4_core_hwmod
,
2594 .slave
= &omap3xxx_ssi_hwmod
,
2596 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2599 static struct omap_hwmod_ocp_if
*omap3xxx_hwmod_ocp_ifs
[] __initdata
= {
2600 &omap3xxx_l3_main__l4_core
,
2601 &omap3xxx_l3_main__l4_per
,
2602 &omap3xxx_mpu__l3_main
,
2603 &omap3xxx_l3_main__l4_debugss
,
2604 &omap3xxx_l4_core__l4_wkup
,
2605 &omap3xxx_l4_core__mmc3
,
2606 &omap3_l4_core__uart1
,
2607 &omap3_l4_core__uart2
,
2608 &omap3_l4_per__uart3
,
2609 &omap3_l4_core__i2c1
,
2610 &omap3_l4_core__i2c2
,
2611 &omap3_l4_core__i2c3
,
2612 &omap3xxx_l4_wkup__l4_sec
,
2613 &omap3xxx_l4_wkup__timer1
,
2614 &omap3xxx_l4_per__timer2
,
2615 &omap3xxx_l4_per__timer3
,
2616 &omap3xxx_l4_per__timer4
,
2617 &omap3xxx_l4_per__timer5
,
2618 &omap3xxx_l4_per__timer6
,
2619 &omap3xxx_l4_per__timer7
,
2620 &omap3xxx_l4_per__timer8
,
2621 &omap3xxx_l4_per__timer9
,
2622 &omap3xxx_l4_core__timer10
,
2623 &omap3xxx_l4_core__timer11
,
2624 &omap3xxx_l4_wkup__wd_timer2
,
2625 &omap3xxx_l4_wkup__gpio1
,
2626 &omap3xxx_l4_per__gpio2
,
2627 &omap3xxx_l4_per__gpio3
,
2628 &omap3xxx_l4_per__gpio4
,
2629 &omap3xxx_l4_per__gpio5
,
2630 &omap3xxx_l4_per__gpio6
,
2631 &omap3xxx_dma_system__l3
,
2632 &omap3xxx_l4_core__dma_system
,
2633 &omap3xxx_l4_core__mcbsp1
,
2634 &omap3xxx_l4_per__mcbsp2
,
2635 &omap3xxx_l4_per__mcbsp3
,
2636 &omap3xxx_l4_per__mcbsp4
,
2637 &omap3xxx_l4_core__mcbsp5
,
2638 &omap3xxx_l4_per__mcbsp2_sidetone
,
2639 &omap3xxx_l4_per__mcbsp3_sidetone
,
2640 &omap34xx_l4_core__mcspi1
,
2641 &omap34xx_l4_core__mcspi2
,
2642 &omap34xx_l4_core__mcspi3
,
2643 &omap34xx_l4_core__mcspi4
,
2644 &omap3xxx_l4_wkup__counter_32k
,
2645 &omap3xxx_l3_main__gpmc
,
2649 /* GP-only hwmod links */
2650 static struct omap_hwmod_ocp_if
*omap34xx_gp_hwmod_ocp_ifs
[] __initdata
= {
2651 &omap3xxx_l4_sec__timer12
,
2655 static struct omap_hwmod_ocp_if
*omap36xx_gp_hwmod_ocp_ifs
[] __initdata
= {
2656 &omap3xxx_l4_sec__timer12
,
2660 static struct omap_hwmod_ocp_if
*am35xx_gp_hwmod_ocp_ifs
[] __initdata
= {
2661 &omap3xxx_l4_sec__timer12
,
2665 /* crypto hwmod links */
2666 static struct omap_hwmod_ocp_if
*omap34xx_sham_hwmod_ocp_ifs
[] __initdata
= {
2667 &omap3xxx_l4_core__sham
,
2671 static struct omap_hwmod_ocp_if
*omap34xx_aes_hwmod_ocp_ifs
[] __initdata
= {
2672 &omap3xxx_l4_core__aes
,
2676 static struct omap_hwmod_ocp_if
*omap36xx_sham_hwmod_ocp_ifs
[] __initdata
= {
2677 &omap3xxx_l4_core__sham
,
2681 static struct omap_hwmod_ocp_if
*omap36xx_aes_hwmod_ocp_ifs
[] __initdata
= {
2682 &omap3xxx_l4_core__aes
,
2687 * Apparently the SHA/MD5 and AES accelerator IP blocks are
2688 * only present on some AM35xx chips, and no one knows which
2690 * http://www.spinics.net/lists/arm-kernel/msg215466.html So
2691 * if you need these IP blocks on an AM35xx, try uncommenting
2692 * the following lines.
2694 static struct omap_hwmod_ocp_if
*am35xx_sham_hwmod_ocp_ifs
[] __initdata
= {
2695 /* &omap3xxx_l4_core__sham, */
2699 static struct omap_hwmod_ocp_if
*am35xx_aes_hwmod_ocp_ifs
[] __initdata
= {
2700 /* &omap3xxx_l4_core__aes, */
2704 /* 3430ES1-only hwmod links */
2705 static struct omap_hwmod_ocp_if
*omap3430es1_hwmod_ocp_ifs
[] __initdata
= {
2706 &omap3430es1_dss__l3
,
2707 &omap3430es1_l4_core__dss
,
2711 /* 3430ES2+-only hwmod links */
2712 static struct omap_hwmod_ocp_if
*omap3430es2plus_hwmod_ocp_ifs
[] __initdata
= {
2714 &omap3xxx_l4_core__dss
,
2715 &omap3xxx_usbhsotg__l3
,
2716 &omap3xxx_l4_core__usbhsotg
,
2717 &omap3xxx_usb_host_hs__l3_main_2
,
2718 &omap3xxx_l4_core__usb_host_hs
,
2719 &omap3xxx_l4_core__usb_tll_hs
,
2723 /* <= 3430ES3-only hwmod links */
2724 static struct omap_hwmod_ocp_if
*omap3430_pre_es3_hwmod_ocp_ifs
[] __initdata
= {
2725 &omap3xxx_l4_core__pre_es3_mmc1
,
2726 &omap3xxx_l4_core__pre_es3_mmc2
,
2730 /* 3430ES3+-only hwmod links */
2731 static struct omap_hwmod_ocp_if
*omap3430_es3plus_hwmod_ocp_ifs
[] __initdata
= {
2732 &omap3xxx_l4_core__es3plus_mmc1
,
2733 &omap3xxx_l4_core__es3plus_mmc2
,
2737 /* 34xx-only hwmod links (all ES revisions) */
2738 static struct omap_hwmod_ocp_if
*omap34xx_hwmod_ocp_ifs
[] __initdata
= {
2740 &omap34xx_l4_core__sr1
,
2741 &omap34xx_l4_core__sr2
,
2742 &omap3xxx_l4_core__mailbox
,
2743 &omap3xxx_l4_core__hdq1w
,
2744 &omap3xxx_sad2d__l3
,
2745 &omap3xxx_l4_core__mmu_isp
,
2746 &omap3xxx_l3_main__mmu_iva
,
2747 &omap3xxx_l4_core__ssi
,
2751 /* 36xx-only hwmod links (all ES revisions) */
2752 static struct omap_hwmod_ocp_if
*omap36xx_hwmod_ocp_ifs
[] __initdata
= {
2754 &omap36xx_l4_per__uart4
,
2756 &omap3xxx_l4_core__dss
,
2757 &omap36xx_l4_core__sr1
,
2758 &omap36xx_l4_core__sr2
,
2759 &omap3xxx_usbhsotg__l3
,
2760 &omap3xxx_l4_core__usbhsotg
,
2761 &omap3xxx_l4_core__mailbox
,
2762 &omap3xxx_usb_host_hs__l3_main_2
,
2763 &omap3xxx_l4_core__usb_host_hs
,
2764 &omap3xxx_l4_core__usb_tll_hs
,
2765 &omap3xxx_l4_core__es3plus_mmc1
,
2766 &omap3xxx_l4_core__es3plus_mmc2
,
2767 &omap3xxx_l4_core__hdq1w
,
2768 &omap3xxx_sad2d__l3
,
2769 &omap3xxx_l4_core__mmu_isp
,
2770 &omap3xxx_l3_main__mmu_iva
,
2771 &omap3xxx_l4_core__ssi
,
2775 static struct omap_hwmod_ocp_if
*am35xx_hwmod_ocp_ifs
[] __initdata
= {
2777 &omap3xxx_l4_core__dss
,
2778 &am35xx_usbhsotg__l3
,
2779 &am35xx_l4_core__usbhsotg
,
2780 &am35xx_l4_core__uart4
,
2781 &omap3xxx_usb_host_hs__l3_main_2
,
2782 &omap3xxx_l4_core__usb_host_hs
,
2783 &omap3xxx_l4_core__usb_tll_hs
,
2784 &omap3xxx_l4_core__es3plus_mmc1
,
2785 &omap3xxx_l4_core__es3plus_mmc2
,
2786 &omap3xxx_l4_core__hdq1w
,
2788 &am35xx_l4_core__mdio
,
2790 &am35xx_l4_core__emac
,
2794 static struct omap_hwmod_ocp_if
*omap3xxx_dss_hwmod_ocp_ifs
[] __initdata
= {
2795 &omap3xxx_l4_core__dss_dispc
,
2796 &omap3xxx_l4_core__dss_dsi1
,
2797 &omap3xxx_l4_core__dss_rfbi
,
2798 &omap3xxx_l4_core__dss_venc
,
2803 * omap3xxx_hwmod_is_hs_ip_block_usable - is a security IP block accessible?
2804 * @bus: struct device_node * for the top-level OMAP DT data
2805 * @dev_name: device name used in the DT file
2807 * Determine whether a "secure" IP block @dev_name is usable by Linux.
2808 * There doesn't appear to be a 100% reliable way to determine this,
2809 * so we rely on heuristics. If @bus is null, meaning there's no DT
2810 * data, then we only assume the IP block is accessible if the OMAP is
2811 * fused as a 'general-purpose' SoC. If however DT data is present,
2812 * test to see if the IP block is described in the DT data and set to
2813 * 'status = "okay"'. If so then we assume the ODM has configured the
2814 * OMAP firewalls to allow access to the IP block.
2816 * Return: 0 if device named @dev_name is not likely to be accessible,
2817 * or 1 if it is likely to be accessible.
2819 static bool __init
omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node
*bus
,
2820 const char *dev_name
)
2822 struct device_node
*node
;
2826 return omap_type() == OMAP2_DEVICE_TYPE_GP
;
2828 node
= of_get_child_by_name(bus
, dev_name
);
2829 available
= of_device_is_available(node
);
2835 int __init
omap3xxx_hwmod_init(void)
2838 struct omap_hwmod_ocp_if
**h
= NULL
, **h_gp
= NULL
, **h_sham
= NULL
;
2839 struct omap_hwmod_ocp_if
**h_aes
= NULL
;
2840 struct device_node
*bus
;
2845 /* Register hwmod links common to all OMAP3 */
2846 r
= omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs
);
2853 * Register hwmod links common to individual OMAP3 families, all
2854 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
2855 * All possible revisions should be included in this conditional.
2857 if (rev
== OMAP3430_REV_ES1_0
|| rev
== OMAP3430_REV_ES2_0
||
2858 rev
== OMAP3430_REV_ES2_1
|| rev
== OMAP3430_REV_ES3_0
||
2859 rev
== OMAP3430_REV_ES3_1
|| rev
== OMAP3430_REV_ES3_1_2
) {
2860 h
= omap34xx_hwmod_ocp_ifs
;
2861 h_gp
= omap34xx_gp_hwmod_ocp_ifs
;
2862 h_sham
= omap34xx_sham_hwmod_ocp_ifs
;
2863 h_aes
= omap34xx_aes_hwmod_ocp_ifs
;
2864 } else if (rev
== AM35XX_REV_ES1_0
|| rev
== AM35XX_REV_ES1_1
) {
2865 h
= am35xx_hwmod_ocp_ifs
;
2866 h_gp
= am35xx_gp_hwmod_ocp_ifs
;
2867 h_sham
= am35xx_sham_hwmod_ocp_ifs
;
2868 h_aes
= am35xx_aes_hwmod_ocp_ifs
;
2869 } else if (rev
== OMAP3630_REV_ES1_0
|| rev
== OMAP3630_REV_ES1_1
||
2870 rev
== OMAP3630_REV_ES1_2
) {
2871 h
= omap36xx_hwmod_ocp_ifs
;
2872 h_gp
= omap36xx_gp_hwmod_ocp_ifs
;
2873 h_sham
= omap36xx_sham_hwmod_ocp_ifs
;
2874 h_aes
= omap36xx_aes_hwmod_ocp_ifs
;
2876 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
2880 r
= omap_hwmod_register_links(h
);
2884 /* Register GP-only hwmod links. */
2885 if (h_gp
&& omap_type() == OMAP2_DEVICE_TYPE_GP
) {
2886 r
= omap_hwmod_register_links(h_gp
);
2892 * Register crypto hwmod links only if they are not disabled in DT.
2893 * If DT information is missing, enable them only for GP devices.
2896 bus
= of_find_node_by_name(NULL
, "ocp");
2898 if (h_sham
&& omap3xxx_hwmod_is_hs_ip_block_usable(bus
, "sham")) {
2899 r
= omap_hwmod_register_links(h_sham
);
2904 if (h_aes
&& omap3xxx_hwmod_is_hs_ip_block_usable(bus
, "aes")) {
2905 r
= omap_hwmod_register_links(h_aes
);
2912 * Register hwmod links specific to certain ES levels of a
2913 * particular family of silicon (e.g., 34xx ES1.0)
2916 if (rev
== OMAP3430_REV_ES1_0
) {
2917 h
= omap3430es1_hwmod_ocp_ifs
;
2918 } else if (rev
== OMAP3430_REV_ES2_0
|| rev
== OMAP3430_REV_ES2_1
||
2919 rev
== OMAP3430_REV_ES3_0
|| rev
== OMAP3430_REV_ES3_1
||
2920 rev
== OMAP3430_REV_ES3_1_2
) {
2921 h
= omap3430es2plus_hwmod_ocp_ifs
;
2925 r
= omap_hwmod_register_links(h
);
2931 if (rev
== OMAP3430_REV_ES1_0
|| rev
== OMAP3430_REV_ES2_0
||
2932 rev
== OMAP3430_REV_ES2_1
) {
2933 h
= omap3430_pre_es3_hwmod_ocp_ifs
;
2934 } else if (rev
== OMAP3430_REV_ES3_0
|| rev
== OMAP3430_REV_ES3_1
||
2935 rev
== OMAP3430_REV_ES3_1_2
) {
2936 h
= omap3430_es3plus_hwmod_ocp_ifs
;
2940 r
= omap_hwmod_register_links(h
);
2945 * DSS code presumes that dss_core hwmod is handled first,
2946 * _before_ any other DSS related hwmods so register common
2947 * DSS hwmod links last to ensure that dss_core is already
2948 * registered. Otherwise some change things may happen, for
2949 * ex. if dispc is handled before dss_core and DSS is enabled
2950 * in bootloader DISPC will be reset with outputs enabled
2951 * which sometimes leads to unrecoverable L3 error. XXX The
2952 * long-term fix to this is to ensure hwmods are set up in
2953 * dependency order in the hwmod core code.
2955 r
= omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs
);