2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 * The data in this file should be completely autogeneratable from
13 * the TI hardware database or other technical documentation.
15 * XXX these should be marked initdata for multi-OMAP kernels
18 #include <linux/platform_data/i2c-omap.h>
19 #include <linux/power/smartreflex.h>
20 #include <linux/platform_data/hsmmc-omap.h>
22 #include <linux/omap-dma.h>
27 #include "omap_hwmod.h"
28 #include "omap_hwmod_common_data.h"
29 #include "prm-regbits-34xx.h"
30 #include "cm-regbits-34xx.h"
37 * OMAP3xxx hardware module integration data
39 * All of the data in this section should be autogeneratable from the
40 * TI hardware database or other technical documentation. Data that
41 * is driver-specific or driver-kernel integration-specific belongs
45 #define AM35XX_IPSS_USBOTGSS_BASE 0x5C040000
53 static struct omap_hwmod omap3xxx_l3_main_hwmod
= {
55 .class = &l3_hwmod_class
,
56 .flags
= HWMOD_NO_IDLEST
,
60 static struct omap_hwmod omap3xxx_l4_core_hwmod
= {
62 .class = &l4_hwmod_class
,
63 .flags
= HWMOD_NO_IDLEST
,
67 static struct omap_hwmod omap3xxx_l4_per_hwmod
= {
69 .class = &l4_hwmod_class
,
70 .flags
= HWMOD_NO_IDLEST
,
74 static struct omap_hwmod omap3xxx_l4_wkup_hwmod
= {
76 .class = &l4_hwmod_class
,
77 .flags
= HWMOD_NO_IDLEST
,
81 static struct omap_hwmod omap3xxx_l4_sec_hwmod
= {
83 .class = &l4_hwmod_class
,
84 .flags
= HWMOD_NO_IDLEST
,
89 static struct omap_hwmod omap3xxx_mpu_hwmod
= {
91 .class = &mpu_hwmod_class
,
92 .main_clk
= "arm_fck",
96 static struct omap_hwmod_rst_info omap3xxx_iva_resets
[] = {
97 { .name
= "logic", .rst_shift
= 0, .st_shift
= 8 },
98 { .name
= "seq0", .rst_shift
= 1, .st_shift
= 9 },
99 { .name
= "seq1", .rst_shift
= 2, .st_shift
= 10 },
102 static struct omap_hwmod omap3xxx_iva_hwmod
= {
104 .class = &iva_hwmod_class
,
105 .clkdm_name
= "iva2_clkdm",
106 .rst_lines
= omap3xxx_iva_resets
,
107 .rst_lines_cnt
= ARRAY_SIZE(omap3xxx_iva_resets
),
108 .main_clk
= "iva2_ck",
111 .module_offs
= OMAP3430_IVA2_MOD
,
113 .idlest_idle_bit
= OMAP3430_ST_IVA2_SHIFT
,
120 * debug and emulation sub system
123 static struct omap_hwmod_class omap3xxx_debugss_hwmod_class
= {
128 static struct omap_hwmod omap3xxx_debugss_hwmod
= {
130 .class = &omap3xxx_debugss_hwmod_class
,
131 .clkdm_name
= "emu_clkdm",
132 .main_clk
= "emu_src_ck",
133 .flags
= HWMOD_NO_IDLEST
,
137 static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc
= {
141 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_CLOCKACTIVITY
|
142 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
143 SYSC_HAS_EMUFREE
| SYSC_HAS_AUTOIDLE
|
144 SYSS_HAS_RESET_STATUS
),
145 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
146 .sysc_fields
= &omap_hwmod_sysc_type1
,
149 static struct omap_hwmod_class omap3xxx_timer_hwmod_class
= {
151 .sysc
= &omap3xxx_timer_sysc
,
155 static struct omap_hwmod omap3xxx_timer1_hwmod
= {
157 .main_clk
= "gpt1_fck",
160 .module_offs
= WKUP_MOD
,
162 .idlest_idle_bit
= OMAP3430_ST_GPT1_SHIFT
,
165 .class = &omap3xxx_timer_hwmod_class
,
166 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
170 static struct omap_hwmod omap3xxx_timer2_hwmod
= {
172 .main_clk
= "gpt2_fck",
175 .module_offs
= OMAP3430_PER_MOD
,
177 .idlest_idle_bit
= OMAP3430_ST_GPT2_SHIFT
,
180 .class = &omap3xxx_timer_hwmod_class
,
181 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
185 static struct omap_hwmod omap3xxx_timer3_hwmod
= {
187 .main_clk
= "gpt3_fck",
190 .module_offs
= OMAP3430_PER_MOD
,
192 .idlest_idle_bit
= OMAP3430_ST_GPT3_SHIFT
,
195 .class = &omap3xxx_timer_hwmod_class
,
196 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
200 static struct omap_hwmod omap3xxx_timer4_hwmod
= {
202 .main_clk
= "gpt4_fck",
205 .module_offs
= OMAP3430_PER_MOD
,
207 .idlest_idle_bit
= OMAP3430_ST_GPT4_SHIFT
,
210 .class = &omap3xxx_timer_hwmod_class
,
211 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
215 static struct omap_hwmod omap3xxx_timer5_hwmod
= {
217 .main_clk
= "gpt5_fck",
220 .module_offs
= OMAP3430_PER_MOD
,
222 .idlest_idle_bit
= OMAP3430_ST_GPT5_SHIFT
,
225 .class = &omap3xxx_timer_hwmod_class
,
226 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
230 static struct omap_hwmod omap3xxx_timer6_hwmod
= {
232 .main_clk
= "gpt6_fck",
235 .module_offs
= OMAP3430_PER_MOD
,
237 .idlest_idle_bit
= OMAP3430_ST_GPT6_SHIFT
,
240 .class = &omap3xxx_timer_hwmod_class
,
241 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
245 static struct omap_hwmod omap3xxx_timer7_hwmod
= {
247 .main_clk
= "gpt7_fck",
250 .module_offs
= OMAP3430_PER_MOD
,
252 .idlest_idle_bit
= OMAP3430_ST_GPT7_SHIFT
,
255 .class = &omap3xxx_timer_hwmod_class
,
256 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
260 static struct omap_hwmod omap3xxx_timer8_hwmod
= {
262 .main_clk
= "gpt8_fck",
265 .module_offs
= OMAP3430_PER_MOD
,
267 .idlest_idle_bit
= OMAP3430_ST_GPT8_SHIFT
,
270 .class = &omap3xxx_timer_hwmod_class
,
271 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
275 static struct omap_hwmod omap3xxx_timer9_hwmod
= {
277 .main_clk
= "gpt9_fck",
280 .module_offs
= OMAP3430_PER_MOD
,
282 .idlest_idle_bit
= OMAP3430_ST_GPT9_SHIFT
,
285 .class = &omap3xxx_timer_hwmod_class
,
286 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
290 static struct omap_hwmod omap3xxx_timer10_hwmod
= {
292 .main_clk
= "gpt10_fck",
295 .module_offs
= CORE_MOD
,
297 .idlest_idle_bit
= OMAP3430_ST_GPT10_SHIFT
,
300 .class = &omap3xxx_timer_hwmod_class
,
301 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
305 static struct omap_hwmod omap3xxx_timer11_hwmod
= {
307 .main_clk
= "gpt11_fck",
310 .module_offs
= CORE_MOD
,
312 .idlest_idle_bit
= OMAP3430_ST_GPT11_SHIFT
,
315 .class = &omap3xxx_timer_hwmod_class
,
316 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
320 static struct omap_hwmod omap3xxx_timer12_hwmod
= {
322 .main_clk
= "gpt12_fck",
325 .module_offs
= WKUP_MOD
,
327 .idlest_idle_bit
= OMAP3430_ST_GPT12_SHIFT
,
330 .class = &omap3xxx_timer_hwmod_class
,
331 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
336 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
340 static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc
= {
344 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_EMUFREE
|
345 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
346 SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
347 SYSS_HAS_RESET_STATUS
),
348 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
349 .sysc_fields
= &omap_hwmod_sysc_type1
,
353 static struct omap_hwmod_class_sysconfig i2c_sysc
= {
357 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
358 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
359 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
360 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
361 .sysc_fields
= &omap_hwmod_sysc_type1
,
364 static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class
= {
366 .sysc
= &omap3xxx_wd_timer_sysc
,
367 .pre_shutdown
= &omap2_wd_timer_disable
,
368 .reset
= &omap2_wd_timer_reset
,
371 static struct omap_hwmod omap3xxx_wd_timer2_hwmod
= {
373 .class = &omap3xxx_wd_timer_hwmod_class
,
374 .main_clk
= "wdt2_fck",
377 .module_offs
= WKUP_MOD
,
379 .idlest_idle_bit
= OMAP3430_ST_WDT2_SHIFT
,
383 * XXX: Use software supervised mode, HW supervised smartidle seems to
384 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
386 .flags
= HWMOD_SWSUP_SIDLE
,
390 static struct omap_hwmod omap3xxx_uart1_hwmod
= {
392 .main_clk
= "uart1_fck",
393 .flags
= DEBUG_TI81XXUART1_FLAGS
| HWMOD_SWSUP_SIDLE
,
396 .module_offs
= CORE_MOD
,
398 .idlest_idle_bit
= OMAP3430_EN_UART1_SHIFT
,
401 .class = &omap2_uart_class
,
405 static struct omap_hwmod omap3xxx_uart2_hwmod
= {
407 .main_clk
= "uart2_fck",
408 .flags
= DEBUG_TI81XXUART2_FLAGS
| HWMOD_SWSUP_SIDLE
,
411 .module_offs
= CORE_MOD
,
413 .idlest_idle_bit
= OMAP3430_EN_UART2_SHIFT
,
416 .class = &omap2_uart_class
,
420 static struct omap_hwmod omap3xxx_uart3_hwmod
= {
422 .main_clk
= "uart3_fck",
423 .flags
= DEBUG_OMAP3UART3_FLAGS
| DEBUG_TI81XXUART3_FLAGS
|
427 .module_offs
= OMAP3430_PER_MOD
,
429 .idlest_idle_bit
= OMAP3430_EN_UART3_SHIFT
,
432 .class = &omap2_uart_class
,
438 static struct omap_hwmod omap36xx_uart4_hwmod
= {
440 .main_clk
= "uart4_fck",
441 .flags
= DEBUG_OMAP3UART4_FLAGS
| HWMOD_SWSUP_SIDLE
,
444 .module_offs
= OMAP3430_PER_MOD
,
446 .idlest_idle_bit
= OMAP3630_EN_UART4_SHIFT
,
449 .class = &omap2_uart_class
,
455 * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
456 * uart2_fck being enabled. So we add uart1_fck as an optional clock,
457 * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
458 * should not be needed. The functional clock structure of the AM35xx
459 * UART4 is extremely unclear and opaque; it is unclear what the role
460 * of uart1/2_fck is for the UART4. Any clarification from either
461 * empirical testing or the AM3505/3517 hardware designers would be
464 static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks
[] = {
465 { .role
= "softreset_uart1_fck", .clk
= "uart1_fck" },
468 static struct omap_hwmod am35xx_uart4_hwmod
= {
470 .main_clk
= "uart4_fck",
473 .module_offs
= CORE_MOD
,
475 .idlest_idle_bit
= AM35XX_ST_UART4_SHIFT
,
478 .opt_clks
= am35xx_uart4_opt_clks
,
479 .opt_clks_cnt
= ARRAY_SIZE(am35xx_uart4_opt_clks
),
480 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
481 .class = &omap2_uart_class
,
484 static struct omap_hwmod_class i2c_class
= {
487 .rev
= OMAP_I2C_IP_VERSION_1
,
488 .reset
= &omap_i2c_reset
,
492 static struct omap_hwmod_opt_clk dss_opt_clks
[] = {
494 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
495 * driver does not use these clocks.
497 { .role
= "sys_clk", .clk
= "dss2_alwon_fck" },
498 { .role
= "tv_clk", .clk
= "dss_tv_fck" },
499 /* required only on OMAP3430 */
500 { .role
= "tv_dac_clk", .clk
= "dss_96m_fck" },
503 static struct omap_hwmod omap3430es1_dss_core_hwmod
= {
505 .class = &omap2_dss_hwmod_class
,
506 .main_clk
= "dss1_alwon_fck", /* instead of dss_fck */
509 .module_offs
= OMAP3430_DSS_MOD
,
513 .opt_clks
= dss_opt_clks
,
514 .opt_clks_cnt
= ARRAY_SIZE(dss_opt_clks
),
515 .flags
= HWMOD_NO_IDLEST
| HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
518 static struct omap_hwmod omap3xxx_dss_core_hwmod
= {
520 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
521 .class = &omap2_dss_hwmod_class
,
522 .main_clk
= "dss1_alwon_fck", /* instead of dss_fck */
525 .module_offs
= OMAP3430_DSS_MOD
,
527 .idlest_idle_bit
= OMAP3430ES2_ST_DSS_IDLE_SHIFT
,
530 .opt_clks
= dss_opt_clks
,
531 .opt_clks_cnt
= ARRAY_SIZE(dss_opt_clks
),
539 static struct omap_hwmod_class_sysconfig omap3_dispc_sysc
= {
543 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
|
544 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
546 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
547 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
548 .sysc_fields
= &omap_hwmod_sysc_type1
,
551 static struct omap_hwmod_class omap3_dispc_hwmod_class
= {
553 .sysc
= &omap3_dispc_sysc
,
556 static struct omap_hwmod omap3xxx_dss_dispc_hwmod
= {
558 .class = &omap3_dispc_hwmod_class
,
559 .main_clk
= "dss1_alwon_fck",
562 .module_offs
= OMAP3430_DSS_MOD
,
565 .flags
= HWMOD_NO_IDLEST
,
566 .dev_attr
= &omap2_3_dss_dispc_dev_attr
,
571 * display serial interface controller
574 static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc
= {
578 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
579 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
|
580 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
581 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
582 .sysc_fields
= &omap_hwmod_sysc_type1
,
585 static struct omap_hwmod_class omap3xxx_dsi_hwmod_class
= {
587 .sysc
= &omap3xxx_dsi_sysc
,
591 static struct omap_hwmod_opt_clk dss_dsi1_opt_clks
[] = {
592 { .role
= "sys_clk", .clk
= "dss2_alwon_fck" },
595 static struct omap_hwmod omap3xxx_dss_dsi1_hwmod
= {
597 .class = &omap3xxx_dsi_hwmod_class
,
598 .main_clk
= "dss1_alwon_fck",
601 .module_offs
= OMAP3430_DSS_MOD
,
604 .opt_clks
= dss_dsi1_opt_clks
,
605 .opt_clks_cnt
= ARRAY_SIZE(dss_dsi1_opt_clks
),
606 .flags
= HWMOD_NO_IDLEST
,
609 static struct omap_hwmod_opt_clk dss_rfbi_opt_clks
[] = {
610 { .role
= "ick", .clk
= "dss_ick" },
613 static struct omap_hwmod omap3xxx_dss_rfbi_hwmod
= {
615 .class = &omap2_rfbi_hwmod_class
,
616 .main_clk
= "dss1_alwon_fck",
619 .module_offs
= OMAP3430_DSS_MOD
,
622 .opt_clks
= dss_rfbi_opt_clks
,
623 .opt_clks_cnt
= ARRAY_SIZE(dss_rfbi_opt_clks
),
624 .flags
= HWMOD_NO_IDLEST
,
627 static struct omap_hwmod_opt_clk dss_venc_opt_clks
[] = {
628 /* required only on OMAP3430 */
629 { .role
= "tv_dac_clk", .clk
= "dss_96m_fck" },
632 static struct omap_hwmod omap3xxx_dss_venc_hwmod
= {
634 .class = &omap2_venc_hwmod_class
,
635 .main_clk
= "dss_tv_fck",
638 .module_offs
= OMAP3430_DSS_MOD
,
641 .opt_clks
= dss_venc_opt_clks
,
642 .opt_clks_cnt
= ARRAY_SIZE(dss_venc_opt_clks
),
643 .flags
= HWMOD_NO_IDLEST
,
647 static struct omap_hwmod omap3xxx_i2c1_hwmod
= {
649 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
650 .main_clk
= "i2c1_fck",
653 .module_offs
= CORE_MOD
,
655 .idlest_idle_bit
= OMAP3430_ST_I2C1_SHIFT
,
662 static struct omap_hwmod omap3xxx_i2c2_hwmod
= {
664 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
665 .main_clk
= "i2c2_fck",
668 .module_offs
= CORE_MOD
,
670 .idlest_idle_bit
= OMAP3430_ST_I2C2_SHIFT
,
677 static struct omap_hwmod omap3xxx_i2c3_hwmod
= {
679 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
680 .main_clk
= "i2c3_fck",
683 .module_offs
= CORE_MOD
,
685 .idlest_idle_bit
= OMAP3430_ST_I2C3_SHIFT
,
693 * general purpose io module
696 static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc
= {
700 .sysc_flags
= (SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
|
701 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
702 SYSS_HAS_RESET_STATUS
),
703 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
704 .sysc_fields
= &omap_hwmod_sysc_type1
,
707 static struct omap_hwmod_class omap3xxx_gpio_hwmod_class
= {
709 .sysc
= &omap3xxx_gpio_sysc
,
714 static struct omap_hwmod_opt_clk gpio1_opt_clks
[] = {
715 { .role
= "dbclk", .clk
= "gpio1_dbck", },
718 static struct omap_hwmod omap3xxx_gpio1_hwmod
= {
720 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
721 .main_clk
= "gpio1_ick",
722 .opt_clks
= gpio1_opt_clks
,
723 .opt_clks_cnt
= ARRAY_SIZE(gpio1_opt_clks
),
726 .module_offs
= WKUP_MOD
,
728 .idlest_idle_bit
= OMAP3430_ST_GPIO1_SHIFT
,
731 .class = &omap3xxx_gpio_hwmod_class
,
735 static struct omap_hwmod_opt_clk gpio2_opt_clks
[] = {
736 { .role
= "dbclk", .clk
= "gpio2_dbck", },
739 static struct omap_hwmod omap3xxx_gpio2_hwmod
= {
741 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
742 .main_clk
= "gpio2_ick",
743 .opt_clks
= gpio2_opt_clks
,
744 .opt_clks_cnt
= ARRAY_SIZE(gpio2_opt_clks
),
747 .module_offs
= OMAP3430_PER_MOD
,
749 .idlest_idle_bit
= OMAP3430_ST_GPIO2_SHIFT
,
752 .class = &omap3xxx_gpio_hwmod_class
,
756 static struct omap_hwmod_opt_clk gpio3_opt_clks
[] = {
757 { .role
= "dbclk", .clk
= "gpio3_dbck", },
760 static struct omap_hwmod omap3xxx_gpio3_hwmod
= {
762 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
763 .main_clk
= "gpio3_ick",
764 .opt_clks
= gpio3_opt_clks
,
765 .opt_clks_cnt
= ARRAY_SIZE(gpio3_opt_clks
),
768 .module_offs
= OMAP3430_PER_MOD
,
770 .idlest_idle_bit
= OMAP3430_ST_GPIO3_SHIFT
,
773 .class = &omap3xxx_gpio_hwmod_class
,
777 static struct omap_hwmod_opt_clk gpio4_opt_clks
[] = {
778 { .role
= "dbclk", .clk
= "gpio4_dbck", },
781 static struct omap_hwmod omap3xxx_gpio4_hwmod
= {
783 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
784 .main_clk
= "gpio4_ick",
785 .opt_clks
= gpio4_opt_clks
,
786 .opt_clks_cnt
= ARRAY_SIZE(gpio4_opt_clks
),
789 .module_offs
= OMAP3430_PER_MOD
,
791 .idlest_idle_bit
= OMAP3430_ST_GPIO4_SHIFT
,
794 .class = &omap3xxx_gpio_hwmod_class
,
799 static struct omap_hwmod_opt_clk gpio5_opt_clks
[] = {
800 { .role
= "dbclk", .clk
= "gpio5_dbck", },
803 static struct omap_hwmod omap3xxx_gpio5_hwmod
= {
805 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
806 .main_clk
= "gpio5_ick",
807 .opt_clks
= gpio5_opt_clks
,
808 .opt_clks_cnt
= ARRAY_SIZE(gpio5_opt_clks
),
811 .module_offs
= OMAP3430_PER_MOD
,
813 .idlest_idle_bit
= OMAP3430_ST_GPIO5_SHIFT
,
816 .class = &omap3xxx_gpio_hwmod_class
,
821 static struct omap_hwmod_opt_clk gpio6_opt_clks
[] = {
822 { .role
= "dbclk", .clk
= "gpio6_dbck", },
825 static struct omap_hwmod omap3xxx_gpio6_hwmod
= {
827 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
828 .main_clk
= "gpio6_ick",
829 .opt_clks
= gpio6_opt_clks
,
830 .opt_clks_cnt
= ARRAY_SIZE(gpio6_opt_clks
),
833 .module_offs
= OMAP3430_PER_MOD
,
835 .idlest_idle_bit
= OMAP3430_ST_GPIO6_SHIFT
,
838 .class = &omap3xxx_gpio_hwmod_class
,
842 static struct omap_dma_dev_attr dma_dev_attr
= {
843 .dev_caps
= RESERVE_CHANNEL
| DMA_LINKED_LCH
| GLOBAL_PRIORITY
|
844 IS_CSSA_32
| IS_CDSA_32
| IS_RW_PRIORITY
,
848 static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc
= {
852 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
853 SYSC_HAS_MIDLEMODE
| SYSC_HAS_CLOCKACTIVITY
|
854 SYSC_HAS_EMUFREE
| SYSC_HAS_AUTOIDLE
|
855 SYSS_HAS_RESET_STATUS
),
856 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
857 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
858 .sysc_fields
= &omap_hwmod_sysc_type1
,
861 static struct omap_hwmod_class omap3xxx_dma_hwmod_class
= {
863 .sysc
= &omap3xxx_dma_sysc
,
867 static struct omap_hwmod omap3xxx_dma_system_hwmod
= {
869 .class = &omap3xxx_dma_hwmod_class
,
870 .main_clk
= "core_l3_ick",
873 .module_offs
= CORE_MOD
,
875 .idlest_idle_bit
= OMAP3430_ST_SDMA_SHIFT
,
878 .dev_attr
= &dma_dev_attr
,
879 .flags
= HWMOD_NO_IDLEST
,
884 * multi channel buffered serial port controller
887 static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc
= {
890 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_ENAWAKEUP
|
891 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
),
892 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
893 .sysc_fields
= &omap_hwmod_sysc_type1
,
896 static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class
= {
898 .sysc
= &omap3xxx_mcbsp_sysc
,
901 /* McBSP functional clock mapping */
902 static struct omap_hwmod_opt_clk mcbsp15_opt_clks
[] = {
903 { .role
= "pad_fck", .clk
= "mcbsp_clks" },
904 { .role
= "prcm_fck", .clk
= "core_96m_fck" },
907 static struct omap_hwmod_opt_clk mcbsp234_opt_clks
[] = {
908 { .role
= "pad_fck", .clk
= "mcbsp_clks" },
909 { .role
= "prcm_fck", .clk
= "per_96m_fck" },
913 static struct omap_hwmod omap3xxx_mcbsp1_hwmod
= {
915 .class = &omap3xxx_mcbsp_hwmod_class
,
916 .main_clk
= "mcbsp1_fck",
919 .module_offs
= CORE_MOD
,
921 .idlest_idle_bit
= OMAP3430_ST_MCBSP1_SHIFT
,
924 .opt_clks
= mcbsp15_opt_clks
,
925 .opt_clks_cnt
= ARRAY_SIZE(mcbsp15_opt_clks
),
929 static struct omap_hwmod omap3xxx_mcbsp2_hwmod
= {
931 .class = &omap3xxx_mcbsp_hwmod_class
,
932 .main_clk
= "mcbsp2_fck",
935 .module_offs
= OMAP3430_PER_MOD
,
937 .idlest_idle_bit
= OMAP3430_ST_MCBSP2_SHIFT
,
940 .opt_clks
= mcbsp234_opt_clks
,
941 .opt_clks_cnt
= ARRAY_SIZE(mcbsp234_opt_clks
),
945 static struct omap_hwmod omap3xxx_mcbsp3_hwmod
= {
947 .class = &omap3xxx_mcbsp_hwmod_class
,
948 .main_clk
= "mcbsp3_fck",
951 .module_offs
= OMAP3430_PER_MOD
,
953 .idlest_idle_bit
= OMAP3430_ST_MCBSP3_SHIFT
,
956 .opt_clks
= mcbsp234_opt_clks
,
957 .opt_clks_cnt
= ARRAY_SIZE(mcbsp234_opt_clks
),
961 static struct omap_hwmod omap3xxx_mcbsp4_hwmod
= {
963 .class = &omap3xxx_mcbsp_hwmod_class
,
964 .main_clk
= "mcbsp4_fck",
967 .module_offs
= OMAP3430_PER_MOD
,
969 .idlest_idle_bit
= OMAP3430_ST_MCBSP4_SHIFT
,
972 .opt_clks
= mcbsp234_opt_clks
,
973 .opt_clks_cnt
= ARRAY_SIZE(mcbsp234_opt_clks
),
977 static struct omap_hwmod omap3xxx_mcbsp5_hwmod
= {
979 .class = &omap3xxx_mcbsp_hwmod_class
,
980 .main_clk
= "mcbsp5_fck",
983 .module_offs
= CORE_MOD
,
985 .idlest_idle_bit
= OMAP3430_ST_MCBSP5_SHIFT
,
988 .opt_clks
= mcbsp15_opt_clks
,
989 .opt_clks_cnt
= ARRAY_SIZE(mcbsp15_opt_clks
),
992 /* 'mcbsp sidetone' class */
993 static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc
= {
996 .sysc_flags
= SYSC_HAS_AUTOIDLE
,
997 .sysc_fields
= &omap_hwmod_sysc_type1
,
1000 static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class
= {
1001 .name
= "mcbsp_sidetone",
1002 .sysc
= &omap3xxx_mcbsp_sidetone_sysc
,
1005 /* mcbsp2_sidetone */
1006 static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod
= {
1007 .name
= "mcbsp2_sidetone",
1008 .class = &omap3xxx_mcbsp_sidetone_hwmod_class
,
1009 .main_clk
= "mcbsp2_ick",
1010 .flags
= HWMOD_NO_IDLEST
,
1013 /* mcbsp3_sidetone */
1014 static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod
= {
1015 .name
= "mcbsp3_sidetone",
1016 .class = &omap3xxx_mcbsp_sidetone_hwmod_class
,
1017 .main_clk
= "mcbsp3_ick",
1018 .flags
= HWMOD_NO_IDLEST
,
1022 static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc
= {
1023 .rev_offs
= -ENODEV
,
1025 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_NO_CACHE
),
1026 .sysc_fields
= &omap34xx_sr_sysc_fields
,
1029 static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class
= {
1030 .name
= "smartreflex",
1031 .sysc
= &omap34xx_sr_sysc
,
1035 static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc
= {
1036 .rev_offs
= -ENODEV
,
1038 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1039 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_ENAWAKEUP
|
1041 .sysc_fields
= &omap36xx_sr_sysc_fields
,
1044 static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class
= {
1045 .name
= "smartreflex",
1046 .sysc
= &omap36xx_sr_sysc
,
1051 static struct omap_smartreflex_dev_attr sr1_dev_attr
= {
1052 .sensor_voltdm_name
= "mpu_iva",
1056 static struct omap_hwmod omap34xx_sr1_hwmod
= {
1057 .name
= "smartreflex_mpu_iva",
1058 .class = &omap34xx_smartreflex_hwmod_class
,
1059 .main_clk
= "sr1_fck",
1062 .module_offs
= WKUP_MOD
,
1064 .idlest_idle_bit
= OMAP3430_EN_SR1_SHIFT
,
1067 .dev_attr
= &sr1_dev_attr
,
1068 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
1071 static struct omap_hwmod omap36xx_sr1_hwmod
= {
1072 .name
= "smartreflex_mpu_iva",
1073 .class = &omap36xx_smartreflex_hwmod_class
,
1074 .main_clk
= "sr1_fck",
1077 .module_offs
= WKUP_MOD
,
1079 .idlest_idle_bit
= OMAP3430_EN_SR1_SHIFT
,
1082 .dev_attr
= &sr1_dev_attr
,
1086 static struct omap_smartreflex_dev_attr sr2_dev_attr
= {
1087 .sensor_voltdm_name
= "core",
1091 static struct omap_hwmod omap34xx_sr2_hwmod
= {
1092 .name
= "smartreflex_core",
1093 .class = &omap34xx_smartreflex_hwmod_class
,
1094 .main_clk
= "sr2_fck",
1097 .module_offs
= WKUP_MOD
,
1099 .idlest_idle_bit
= OMAP3430_EN_SR2_SHIFT
,
1102 .dev_attr
= &sr2_dev_attr
,
1103 .flags
= HWMOD_SET_DEFAULT_CLOCKACT
,
1106 static struct omap_hwmod omap36xx_sr2_hwmod
= {
1107 .name
= "smartreflex_core",
1108 .class = &omap36xx_smartreflex_hwmod_class
,
1109 .main_clk
= "sr2_fck",
1112 .module_offs
= WKUP_MOD
,
1114 .idlest_idle_bit
= OMAP3430_EN_SR2_SHIFT
,
1117 .dev_attr
= &sr2_dev_attr
,
1122 * mailbox module allowing communication between the on-chip processors
1123 * using a queued mailbox-interrupt mechanism.
1126 static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc
= {
1130 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1131 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
),
1132 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1133 .sysc_fields
= &omap_hwmod_sysc_type1
,
1136 static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class
= {
1138 .sysc
= &omap3xxx_mailbox_sysc
,
1141 static struct omap_hwmod omap3xxx_mailbox_hwmod
= {
1143 .class = &omap3xxx_mailbox_hwmod_class
,
1144 .main_clk
= "mailboxes_ick",
1147 .module_offs
= CORE_MOD
,
1149 .idlest_idle_bit
= OMAP3430_ST_MAILBOXES_SHIFT
,
1156 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1160 static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc
= {
1162 .sysc_offs
= 0x0010,
1163 .syss_offs
= 0x0014,
1164 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1165 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1166 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
1167 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1168 .sysc_fields
= &omap_hwmod_sysc_type1
,
1171 static struct omap_hwmod_class omap34xx_mcspi_class
= {
1173 .sysc
= &omap34xx_mcspi_sysc
,
1177 static struct omap_hwmod omap34xx_mcspi1
= {
1179 .main_clk
= "mcspi1_fck",
1182 .module_offs
= CORE_MOD
,
1184 .idlest_idle_bit
= OMAP3430_ST_MCSPI1_SHIFT
,
1187 .class = &omap34xx_mcspi_class
,
1191 static struct omap_hwmod omap34xx_mcspi2
= {
1193 .main_clk
= "mcspi2_fck",
1196 .module_offs
= CORE_MOD
,
1198 .idlest_idle_bit
= OMAP3430_ST_MCSPI2_SHIFT
,
1201 .class = &omap34xx_mcspi_class
,
1205 static struct omap_hwmod omap34xx_mcspi3
= {
1207 .main_clk
= "mcspi3_fck",
1210 .module_offs
= CORE_MOD
,
1212 .idlest_idle_bit
= OMAP3430_ST_MCSPI3_SHIFT
,
1215 .class = &omap34xx_mcspi_class
,
1219 static struct omap_hwmod omap34xx_mcspi4
= {
1221 .main_clk
= "mcspi4_fck",
1224 .module_offs
= CORE_MOD
,
1226 .idlest_idle_bit
= OMAP3430_ST_MCSPI4_SHIFT
,
1229 .class = &omap34xx_mcspi_class
,
1233 static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc
= {
1235 .sysc_offs
= 0x0404,
1236 .syss_offs
= 0x0408,
1237 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
|
1238 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1240 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1241 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
1242 .sysc_fields
= &omap_hwmod_sysc_type1
,
1245 static struct omap_hwmod_class usbotg_class
= {
1247 .sysc
= &omap3xxx_usbhsotg_sysc
,
1252 static struct omap_hwmod omap3xxx_usbhsotg_hwmod
= {
1253 .name
= "usb_otg_hs",
1254 .main_clk
= "hsotgusb_ick",
1257 .module_offs
= CORE_MOD
,
1259 .idlest_idle_bit
= OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT
,
1262 .class = &usbotg_class
,
1265 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1266 * broken when autoidle is enabled
1267 * workaround is to disable the autoidle bit at module level.
1269 * Enabling the device in any other MIDLEMODE setting but force-idle
1270 * causes core_pwrdm not enter idle states at least on OMAP3630.
1271 * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY
1272 * signal when MIDLEMODE is set to force-idle.
1274 .flags
= HWMOD_NO_OCP_AUTOIDLE
| HWMOD_SWSUP_SIDLE
|
1275 HWMOD_FORCE_MSTANDBY
| HWMOD_RECONFIG_IO_CHAIN
,
1280 static struct omap_hwmod_class am35xx_usbotg_class
= {
1281 .name
= "am35xx_usbotg",
1284 static struct omap_hwmod am35xx_usbhsotg_hwmod
= {
1285 .name
= "am35x_otg_hs",
1286 .main_clk
= "hsotgusb_fck",
1287 .class = &am35xx_usbotg_class
,
1288 .flags
= HWMOD_NO_IDLEST
,
1291 /* MMC/SD/SDIO common */
1292 static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc
= {
1296 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1297 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1298 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
1299 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1300 .sysc_fields
= &omap_hwmod_sysc_type1
,
1303 static struct omap_hwmod_class omap34xx_mmc_class
= {
1305 .sysc
= &omap34xx_mmc_sysc
,
1312 static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks
[] = {
1313 { .role
= "dbck", .clk
= "omap_32k_fck", },
1316 static struct omap_hsmmc_dev_attr mmc1_dev_attr
= {
1317 .flags
= OMAP_HSMMC_SUPPORTS_DUAL_VOLT
,
1320 /* See 35xx errata 2.1.1.128 in SPRZ278F */
1321 static struct omap_hsmmc_dev_attr mmc1_pre_es3_dev_attr
= {
1322 .flags
= (OMAP_HSMMC_SUPPORTS_DUAL_VOLT
|
1323 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ
),
1326 static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod
= {
1328 .opt_clks
= omap34xx_mmc1_opt_clks
,
1329 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc1_opt_clks
),
1330 .main_clk
= "mmchs1_fck",
1333 .module_offs
= CORE_MOD
,
1335 .idlest_idle_bit
= OMAP3430_ST_MMC1_SHIFT
,
1338 .dev_attr
= &mmc1_pre_es3_dev_attr
,
1339 .class = &omap34xx_mmc_class
,
1342 static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod
= {
1344 .opt_clks
= omap34xx_mmc1_opt_clks
,
1345 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc1_opt_clks
),
1346 .main_clk
= "mmchs1_fck",
1349 .module_offs
= CORE_MOD
,
1351 .idlest_idle_bit
= OMAP3430_ST_MMC1_SHIFT
,
1354 .dev_attr
= &mmc1_dev_attr
,
1355 .class = &omap34xx_mmc_class
,
1362 static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks
[] = {
1363 { .role
= "dbck", .clk
= "omap_32k_fck", },
1366 /* See 35xx errata 2.1.1.128 in SPRZ278F */
1367 static struct omap_hsmmc_dev_attr mmc2_pre_es3_dev_attr
= {
1368 .flags
= OMAP_HSMMC_BROKEN_MULTIBLOCK_READ
,
1371 static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod
= {
1373 .opt_clks
= omap34xx_mmc2_opt_clks
,
1374 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc2_opt_clks
),
1375 .main_clk
= "mmchs2_fck",
1378 .module_offs
= CORE_MOD
,
1380 .idlest_idle_bit
= OMAP3430_ST_MMC2_SHIFT
,
1383 .dev_attr
= &mmc2_pre_es3_dev_attr
,
1384 .class = &omap34xx_mmc_class
,
1387 static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod
= {
1389 .opt_clks
= omap34xx_mmc2_opt_clks
,
1390 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc2_opt_clks
),
1391 .main_clk
= "mmchs2_fck",
1394 .module_offs
= CORE_MOD
,
1396 .idlest_idle_bit
= OMAP3430_ST_MMC2_SHIFT
,
1399 .class = &omap34xx_mmc_class
,
1406 static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks
[] = {
1407 { .role
= "dbck", .clk
= "omap_32k_fck", },
1410 static struct omap_hwmod omap3xxx_mmc3_hwmod
= {
1412 .opt_clks
= omap34xx_mmc3_opt_clks
,
1413 .opt_clks_cnt
= ARRAY_SIZE(omap34xx_mmc3_opt_clks
),
1414 .main_clk
= "mmchs3_fck",
1417 .module_offs
= CORE_MOD
,
1419 .idlest_idle_bit
= OMAP3430_ST_MMC3_SHIFT
,
1422 .class = &omap34xx_mmc_class
,
1426 * 'usb_host_hs' class
1427 * high-speed multi-port usb host controller
1430 static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc
= {
1432 .sysc_offs
= 0x0010,
1433 .syss_offs
= 0x0014,
1434 .sysc_flags
= (SYSC_HAS_MIDLEMODE
| SYSC_HAS_CLOCKACTIVITY
|
1435 SYSC_HAS_SIDLEMODE
| SYSC_HAS_ENAWAKEUP
|
1436 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
1437 SYSS_HAS_RESET_STATUS
),
1438 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1439 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
1440 .sysc_fields
= &omap_hwmod_sysc_type1
,
1443 static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class
= {
1444 .name
= "usb_host_hs",
1445 .sysc
= &omap3xxx_usb_host_hs_sysc
,
1449 static struct omap_hwmod omap3xxx_usb_host_hs_hwmod
= {
1450 .name
= "usb_host_hs",
1451 .class = &omap3xxx_usb_host_hs_hwmod_class
,
1452 .clkdm_name
= "usbhost_clkdm",
1453 .main_clk
= "usbhost_48m_fck",
1456 .module_offs
= OMAP3430ES2_USBHOST_MOD
,
1458 .idlest_idle_bit
= OMAP3430ES2_ST_USBHOST_IDLE_SHIFT
,
1463 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1467 * In the following configuration :
1468 * - USBHOST module is set to smart-idle mode
1469 * - PRCM asserts idle_req to the USBHOST module ( This typically
1470 * happens when the system is going to a low power mode : all ports
1471 * have been suspended, the master part of the USBHOST module has
1472 * entered the standby state, and SW has cut the functional clocks)
1473 * - an USBHOST interrupt occurs before the module is able to answer
1474 * idle_ack, typically a remote wakeup IRQ.
1475 * Then the USB HOST module will enter a deadlock situation where it
1476 * is no more accessible nor functional.
1479 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1483 * Errata: USB host EHCI may stall when entering smart-standby mode
1487 * When the USBHOST module is set to smart-standby mode, and when it is
1488 * ready to enter the standby state (i.e. all ports are suspended and
1489 * all attached devices are in suspend mode), then it can wrongly assert
1490 * the Mstandby signal too early while there are still some residual OCP
1491 * transactions ongoing. If this condition occurs, the internal state
1492 * machine may go to an undefined state and the USB link may be stuck
1493 * upon the next resume.
1496 * Don't use smart standby; use only force standby,
1497 * hence HWMOD_SWSUP_MSTANDBY
1500 .flags
= HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
,
1504 * 'usb_tll_hs' class
1505 * usb_tll_hs module is the adapter on the usb_host_hs ports
1507 static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc
= {
1509 .sysc_offs
= 0x0010,
1510 .syss_offs
= 0x0014,
1511 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1512 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1514 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1515 .sysc_fields
= &omap_hwmod_sysc_type1
,
1518 static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class
= {
1519 .name
= "usb_tll_hs",
1520 .sysc
= &omap3xxx_usb_tll_hs_sysc
,
1524 static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod
= {
1525 .name
= "usb_tll_hs",
1526 .class = &omap3xxx_usb_tll_hs_hwmod_class
,
1527 .clkdm_name
= "core_l4_clkdm",
1528 .main_clk
= "usbtll_fck",
1531 .module_offs
= CORE_MOD
,
1533 .idlest_idle_bit
= OMAP3430ES2_ST_USBTLL_SHIFT
,
1538 static struct omap_hwmod omap3xxx_hdq1w_hwmod
= {
1540 .main_clk
= "hdq_fck",
1543 .module_offs
= CORE_MOD
,
1545 .idlest_idle_bit
= OMAP3430_ST_HDQ_SHIFT
,
1548 .class = &omap2_hdq1w_class
,
1552 static struct omap_hwmod_rst_info omap3xxx_sad2d_resets
[] = {
1553 { .name
= "rst_modem_pwron_sw", .rst_shift
= 0 },
1554 { .name
= "rst_modem_sw", .rst_shift
= 1 },
1557 static struct omap_hwmod_class omap3xxx_sad2d_class
= {
1561 static struct omap_hwmod omap3xxx_sad2d_hwmod
= {
1563 .rst_lines
= omap3xxx_sad2d_resets
,
1564 .rst_lines_cnt
= ARRAY_SIZE(omap3xxx_sad2d_resets
),
1565 .main_clk
= "sad2d_ick",
1568 .module_offs
= CORE_MOD
,
1570 .idlest_idle_bit
= OMAP3430_ST_SAD2D_SHIFT
,
1573 .class = &omap3xxx_sad2d_class
,
1577 * '32K sync counter' class
1578 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
1580 static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc
= {
1582 .sysc_offs
= 0x0004,
1583 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
1584 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
),
1585 .sysc_fields
= &omap_hwmod_sysc_type1
,
1588 static struct omap_hwmod_class omap3xxx_counter_hwmod_class
= {
1590 .sysc
= &omap3xxx_counter_sysc
,
1593 static struct omap_hwmod omap3xxx_counter_32k_hwmod
= {
1594 .name
= "counter_32k",
1595 .class = &omap3xxx_counter_hwmod_class
,
1596 .clkdm_name
= "wkup_clkdm",
1597 .flags
= HWMOD_SWSUP_SIDLE
,
1598 .main_clk
= "wkup_32k_fck",
1601 .module_offs
= WKUP_MOD
,
1603 .idlest_idle_bit
= OMAP3430_ST_32KSYNC_SHIFT
,
1610 * general purpose memory controller
1613 static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc
= {
1615 .sysc_offs
= 0x0010,
1616 .syss_offs
= 0x0014,
1617 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_SIDLEMODE
|
1618 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
1619 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1620 .sysc_fields
= &omap_hwmod_sysc_type1
,
1623 static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class
= {
1625 .sysc
= &omap3xxx_gpmc_sysc
,
1628 static struct omap_hwmod omap3xxx_gpmc_hwmod
= {
1630 .class = &omap3xxx_gpmc_hwmod_class
,
1631 .clkdm_name
= "core_l3_clkdm",
1632 .main_clk
= "gpmc_fck",
1633 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
1634 .flags
= HWMOD_NO_IDLEST
| DEBUG_OMAP_GPMC_HWMOD_FLAGS
,
1641 /* L3 -> L4_CORE interface */
1642 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core
= {
1643 .master
= &omap3xxx_l3_main_hwmod
,
1644 .slave
= &omap3xxx_l4_core_hwmod
,
1645 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1648 /* L3 -> L4_PER interface */
1649 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per
= {
1650 .master
= &omap3xxx_l3_main_hwmod
,
1651 .slave
= &omap3xxx_l4_per_hwmod
,
1652 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1656 /* MPU -> L3 interface */
1657 static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main
= {
1658 .master
= &omap3xxx_mpu_hwmod
,
1659 .slave
= &omap3xxx_l3_main_hwmod
,
1660 .user
= OCP_USER_MPU
,
1665 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss
= {
1666 .master
= &omap3xxx_l3_main_hwmod
,
1667 .slave
= &omap3xxx_debugss_hwmod
,
1668 .user
= OCP_USER_MPU
,
1672 static struct omap_hwmod_ocp_if omap3430es1_dss__l3
= {
1673 .master
= &omap3430es1_dss_core_hwmod
,
1674 .slave
= &omap3xxx_l3_main_hwmod
,
1675 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1678 static struct omap_hwmod_ocp_if omap3xxx_dss__l3
= {
1679 .master
= &omap3xxx_dss_core_hwmod
,
1680 .slave
= &omap3xxx_l3_main_hwmod
,
1683 .l3_perm_bit
= OMAP3_L3_CORE_FW_INIT_ID_DSS
,
1684 .flags
= OMAP_FIREWALL_L3
,
1687 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1690 /* l3_core -> usbhsotg interface */
1691 static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3
= {
1692 .master
= &omap3xxx_usbhsotg_hwmod
,
1693 .slave
= &omap3xxx_l3_main_hwmod
,
1694 .clk
= "core_l3_ick",
1695 .user
= OCP_USER_MPU
,
1698 /* l3_core -> am35xx_usbhsotg interface */
1699 static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3
= {
1700 .master
= &am35xx_usbhsotg_hwmod
,
1701 .slave
= &omap3xxx_l3_main_hwmod
,
1702 .clk
= "hsotgusb_ick",
1703 .user
= OCP_USER_MPU
,
1706 /* l3_core -> sad2d interface */
1707 static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3
= {
1708 .master
= &omap3xxx_sad2d_hwmod
,
1709 .slave
= &omap3xxx_l3_main_hwmod
,
1710 .clk
= "core_l3_ick",
1711 .user
= OCP_USER_MPU
,
1714 /* L4_CORE -> L4_WKUP interface */
1715 static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup
= {
1716 .master
= &omap3xxx_l4_core_hwmod
,
1717 .slave
= &omap3xxx_l4_wkup_hwmod
,
1718 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1721 /* L4 CORE -> MMC1 interface */
1722 static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1
= {
1723 .master
= &omap3xxx_l4_core_hwmod
,
1724 .slave
= &omap3xxx_pre_es3_mmc1_hwmod
,
1725 .clk
= "mmchs1_ick",
1726 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1727 .flags
= OMAP_FIREWALL_L4
,
1730 static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1
= {
1731 .master
= &omap3xxx_l4_core_hwmod
,
1732 .slave
= &omap3xxx_es3plus_mmc1_hwmod
,
1733 .clk
= "mmchs1_ick",
1734 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1735 .flags
= OMAP_FIREWALL_L4
,
1738 /* L4 CORE -> MMC2 interface */
1739 static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2
= {
1740 .master
= &omap3xxx_l4_core_hwmod
,
1741 .slave
= &omap3xxx_pre_es3_mmc2_hwmod
,
1742 .clk
= "mmchs2_ick",
1743 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1744 .flags
= OMAP_FIREWALL_L4
,
1747 static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2
= {
1748 .master
= &omap3xxx_l4_core_hwmod
,
1749 .slave
= &omap3xxx_es3plus_mmc2_hwmod
,
1750 .clk
= "mmchs2_ick",
1751 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1752 .flags
= OMAP_FIREWALL_L4
,
1755 /* L4 CORE -> MMC3 interface */
1757 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3
= {
1758 .master
= &omap3xxx_l4_core_hwmod
,
1759 .slave
= &omap3xxx_mmc3_hwmod
,
1760 .clk
= "mmchs3_ick",
1761 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1762 .flags
= OMAP_FIREWALL_L4
,
1765 /* L4 CORE -> UART1 interface */
1767 static struct omap_hwmod_ocp_if omap3_l4_core__uart1
= {
1768 .master
= &omap3xxx_l4_core_hwmod
,
1769 .slave
= &omap3xxx_uart1_hwmod
,
1771 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1774 /* L4 CORE -> UART2 interface */
1776 static struct omap_hwmod_ocp_if omap3_l4_core__uart2
= {
1777 .master
= &omap3xxx_l4_core_hwmod
,
1778 .slave
= &omap3xxx_uart2_hwmod
,
1780 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1783 /* L4 PER -> UART3 interface */
1785 static struct omap_hwmod_ocp_if omap3_l4_per__uart3
= {
1786 .master
= &omap3xxx_l4_per_hwmod
,
1787 .slave
= &omap3xxx_uart3_hwmod
,
1789 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1792 /* L4 PER -> UART4 interface */
1794 static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4
= {
1795 .master
= &omap3xxx_l4_per_hwmod
,
1796 .slave
= &omap36xx_uart4_hwmod
,
1798 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1801 /* AM35xx: L4 CORE -> UART4 interface */
1803 static struct omap_hwmod_ocp_if am35xx_l4_core__uart4
= {
1804 .master
= &omap3xxx_l4_core_hwmod
,
1805 .slave
= &am35xx_uart4_hwmod
,
1807 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1810 /* L4 CORE -> I2C1 interface */
1811 static struct omap_hwmod_ocp_if omap3_l4_core__i2c1
= {
1812 .master
= &omap3xxx_l4_core_hwmod
,
1813 .slave
= &omap3xxx_i2c1_hwmod
,
1817 .l4_fw_region
= OMAP3_L4_CORE_FW_I2C1_REGION
,
1819 .flags
= OMAP_FIREWALL_L4
,
1822 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1825 /* L4 CORE -> I2C2 interface */
1826 static struct omap_hwmod_ocp_if omap3_l4_core__i2c2
= {
1827 .master
= &omap3xxx_l4_core_hwmod
,
1828 .slave
= &omap3xxx_i2c2_hwmod
,
1832 .l4_fw_region
= OMAP3_L4_CORE_FW_I2C2_REGION
,
1834 .flags
= OMAP_FIREWALL_L4
,
1837 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1840 /* L4 CORE -> I2C3 interface */
1842 static struct omap_hwmod_ocp_if omap3_l4_core__i2c3
= {
1843 .master
= &omap3xxx_l4_core_hwmod
,
1844 .slave
= &omap3xxx_i2c3_hwmod
,
1848 .l4_fw_region
= OMAP3_L4_CORE_FW_I2C3_REGION
,
1850 .flags
= OMAP_FIREWALL_L4
,
1853 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1856 /* L4 CORE -> SR1 interface */
1857 static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1
= {
1858 .master
= &omap3xxx_l4_core_hwmod
,
1859 .slave
= &omap34xx_sr1_hwmod
,
1861 .user
= OCP_USER_MPU
,
1864 static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1
= {
1865 .master
= &omap3xxx_l4_core_hwmod
,
1866 .slave
= &omap36xx_sr1_hwmod
,
1868 .user
= OCP_USER_MPU
,
1871 /* L4 CORE -> SR2 interface */
1873 static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2
= {
1874 .master
= &omap3xxx_l4_core_hwmod
,
1875 .slave
= &omap34xx_sr2_hwmod
,
1877 .user
= OCP_USER_MPU
,
1880 static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2
= {
1881 .master
= &omap3xxx_l4_core_hwmod
,
1882 .slave
= &omap36xx_sr2_hwmod
,
1884 .user
= OCP_USER_MPU
,
1888 /* l4_core -> usbhsotg */
1889 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg
= {
1890 .master
= &omap3xxx_l4_core_hwmod
,
1891 .slave
= &omap3xxx_usbhsotg_hwmod
,
1893 .user
= OCP_USER_MPU
,
1897 /* l4_core -> usbhsotg */
1898 static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg
= {
1899 .master
= &omap3xxx_l4_core_hwmod
,
1900 .slave
= &am35xx_usbhsotg_hwmod
,
1901 .clk
= "hsotgusb_ick",
1902 .user
= OCP_USER_MPU
,
1905 /* L4_WKUP -> L4_SEC interface */
1906 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec
= {
1907 .master
= &omap3xxx_l4_wkup_hwmod
,
1908 .slave
= &omap3xxx_l4_sec_hwmod
,
1909 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1912 /* IVA2 <- L3 interface */
1913 static struct omap_hwmod_ocp_if omap3xxx_l3__iva
= {
1914 .master
= &omap3xxx_l3_main_hwmod
,
1915 .slave
= &omap3xxx_iva_hwmod
,
1916 .clk
= "core_l3_ick",
1917 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1921 /* l4_wkup -> timer1 */
1922 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1
= {
1923 .master
= &omap3xxx_l4_wkup_hwmod
,
1924 .slave
= &omap3xxx_timer1_hwmod
,
1926 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1930 /* l4_per -> timer2 */
1931 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2
= {
1932 .master
= &omap3xxx_l4_per_hwmod
,
1933 .slave
= &omap3xxx_timer2_hwmod
,
1935 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1939 /* l4_per -> timer3 */
1940 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3
= {
1941 .master
= &omap3xxx_l4_per_hwmod
,
1942 .slave
= &omap3xxx_timer3_hwmod
,
1944 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1948 /* l4_per -> timer4 */
1949 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4
= {
1950 .master
= &omap3xxx_l4_per_hwmod
,
1951 .slave
= &omap3xxx_timer4_hwmod
,
1953 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1957 /* l4_per -> timer5 */
1958 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5
= {
1959 .master
= &omap3xxx_l4_per_hwmod
,
1960 .slave
= &omap3xxx_timer5_hwmod
,
1962 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1966 /* l4_per -> timer6 */
1967 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6
= {
1968 .master
= &omap3xxx_l4_per_hwmod
,
1969 .slave
= &omap3xxx_timer6_hwmod
,
1971 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1975 /* l4_per -> timer7 */
1976 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7
= {
1977 .master
= &omap3xxx_l4_per_hwmod
,
1978 .slave
= &omap3xxx_timer7_hwmod
,
1980 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1984 /* l4_per -> timer8 */
1985 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8
= {
1986 .master
= &omap3xxx_l4_per_hwmod
,
1987 .slave
= &omap3xxx_timer8_hwmod
,
1989 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1993 /* l4_per -> timer9 */
1994 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9
= {
1995 .master
= &omap3xxx_l4_per_hwmod
,
1996 .slave
= &omap3xxx_timer9_hwmod
,
1998 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2001 /* l4_core -> timer10 */
2002 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10
= {
2003 .master
= &omap3xxx_l4_core_hwmod
,
2004 .slave
= &omap3xxx_timer10_hwmod
,
2006 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2009 /* l4_core -> timer11 */
2010 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11
= {
2011 .master
= &omap3xxx_l4_core_hwmod
,
2012 .slave
= &omap3xxx_timer11_hwmod
,
2014 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2018 /* l4_core -> timer12 */
2019 static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12
= {
2020 .master
= &omap3xxx_l4_sec_hwmod
,
2021 .slave
= &omap3xxx_timer12_hwmod
,
2023 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2026 /* l4_wkup -> wd_timer2 */
2028 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2
= {
2029 .master
= &omap3xxx_l4_wkup_hwmod
,
2030 .slave
= &omap3xxx_wd_timer2_hwmod
,
2032 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2035 /* l4_core -> dss */
2036 static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss
= {
2037 .master
= &omap3xxx_l4_core_hwmod
,
2038 .slave
= &omap3430es1_dss_core_hwmod
,
2042 .l4_fw_region
= OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION
,
2043 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2044 .flags
= OMAP_FIREWALL_L4
,
2047 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2050 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss
= {
2051 .master
= &omap3xxx_l4_core_hwmod
,
2052 .slave
= &omap3xxx_dss_core_hwmod
,
2056 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_CORE_REGION
,
2057 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2058 .flags
= OMAP_FIREWALL_L4
,
2061 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2064 /* l4_core -> dss_dispc */
2065 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc
= {
2066 .master
= &omap3xxx_l4_core_hwmod
,
2067 .slave
= &omap3xxx_dss_dispc_hwmod
,
2071 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_DISPC_REGION
,
2072 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2073 .flags
= OMAP_FIREWALL_L4
,
2076 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2079 /* l4_core -> dss_dsi1 */
2080 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1
= {
2081 .master
= &omap3xxx_l4_core_hwmod
,
2082 .slave
= &omap3xxx_dss_dsi1_hwmod
,
2086 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_DSI_REGION
,
2087 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2088 .flags
= OMAP_FIREWALL_L4
,
2091 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2094 /* l4_core -> dss_rfbi */
2095 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi
= {
2096 .master
= &omap3xxx_l4_core_hwmod
,
2097 .slave
= &omap3xxx_dss_rfbi_hwmod
,
2101 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_RFBI_REGION
,
2102 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2103 .flags
= OMAP_FIREWALL_L4
,
2106 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2109 /* l4_core -> dss_venc */
2110 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc
= {
2111 .master
= &omap3xxx_l4_core_hwmod
,
2112 .slave
= &omap3xxx_dss_venc_hwmod
,
2116 .l4_fw_region
= OMAP3_L4_CORE_FW_DSS_VENC_REGION
,
2117 .l4_prot_group
= OMAP3_L4_CORE_FW_DSS_PROT_GROUP
,
2118 .flags
= OMAP_FIREWALL_L4
,
2121 .flags
= OCPIF_SWSUP_IDLE
,
2122 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2125 /* l4_wkup -> gpio1 */
2127 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1
= {
2128 .master
= &omap3xxx_l4_wkup_hwmod
,
2129 .slave
= &omap3xxx_gpio1_hwmod
,
2130 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2133 /* l4_per -> gpio2 */
2135 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2
= {
2136 .master
= &omap3xxx_l4_per_hwmod
,
2137 .slave
= &omap3xxx_gpio2_hwmod
,
2138 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2141 /* l4_per -> gpio3 */
2143 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3
= {
2144 .master
= &omap3xxx_l4_per_hwmod
,
2145 .slave
= &omap3xxx_gpio3_hwmod
,
2146 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2151 * The memory management unit performs virtual to physical address translation
2152 * for its requestors.
2155 static struct omap_hwmod_class_sysconfig mmu_sysc
= {
2159 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
2160 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
),
2161 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
2162 .sysc_fields
= &omap_hwmod_sysc_type1
,
2165 static struct omap_hwmod_class omap3xxx_mmu_hwmod_class
= {
2171 static struct omap_hwmod omap3xxx_mmu_isp_hwmod
;
2173 /* l4_core -> mmu isp */
2174 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp
= {
2175 .master
= &omap3xxx_l4_core_hwmod
,
2176 .slave
= &omap3xxx_mmu_isp_hwmod
,
2177 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2180 static struct omap_hwmod omap3xxx_mmu_isp_hwmod
= {
2182 .class = &omap3xxx_mmu_hwmod_class
,
2183 .main_clk
= "cam_ick",
2184 .flags
= HWMOD_NO_IDLEST
,
2189 static struct omap_hwmod omap3xxx_mmu_iva_hwmod
;
2191 static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets
[] = {
2192 { .name
= "mmu", .rst_shift
= 1, .st_shift
= 9 },
2195 /* l3_main -> iva mmu */
2196 static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva
= {
2197 .master
= &omap3xxx_l3_main_hwmod
,
2198 .slave
= &omap3xxx_mmu_iva_hwmod
,
2199 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2202 static struct omap_hwmod omap3xxx_mmu_iva_hwmod
= {
2204 .class = &omap3xxx_mmu_hwmod_class
,
2205 .clkdm_name
= "iva2_clkdm",
2206 .rst_lines
= omap3xxx_mmu_iva_resets
,
2207 .rst_lines_cnt
= ARRAY_SIZE(omap3xxx_mmu_iva_resets
),
2208 .main_clk
= "iva2_ck",
2211 .module_offs
= OMAP3430_IVA2_MOD
,
2213 .idlest_idle_bit
= OMAP3430_ST_IVA2_SHIFT
,
2216 .flags
= HWMOD_NO_IDLEST
,
2219 /* l4_per -> gpio4 */
2221 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4
= {
2222 .master
= &omap3xxx_l4_per_hwmod
,
2223 .slave
= &omap3xxx_gpio4_hwmod
,
2224 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2227 /* l4_per -> gpio5 */
2229 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5
= {
2230 .master
= &omap3xxx_l4_per_hwmod
,
2231 .slave
= &omap3xxx_gpio5_hwmod
,
2232 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2235 /* l4_per -> gpio6 */
2237 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6
= {
2238 .master
= &omap3xxx_l4_per_hwmod
,
2239 .slave
= &omap3xxx_gpio6_hwmod
,
2240 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2243 /* dma_system -> L3 */
2244 static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3
= {
2245 .master
= &omap3xxx_dma_system_hwmod
,
2246 .slave
= &omap3xxx_l3_main_hwmod
,
2247 .clk
= "core_l3_ick",
2248 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2251 /* l4_cfg -> dma_system */
2252 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system
= {
2253 .master
= &omap3xxx_l4_core_hwmod
,
2254 .slave
= &omap3xxx_dma_system_hwmod
,
2255 .clk
= "core_l4_ick",
2256 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2260 /* l4_core -> mcbsp1 */
2261 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1
= {
2262 .master
= &omap3xxx_l4_core_hwmod
,
2263 .slave
= &omap3xxx_mcbsp1_hwmod
,
2264 .clk
= "mcbsp1_ick",
2265 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2269 /* l4_per -> mcbsp2 */
2270 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2
= {
2271 .master
= &omap3xxx_l4_per_hwmod
,
2272 .slave
= &omap3xxx_mcbsp2_hwmod
,
2273 .clk
= "mcbsp2_ick",
2274 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2278 /* l4_per -> mcbsp3 */
2279 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3
= {
2280 .master
= &omap3xxx_l4_per_hwmod
,
2281 .slave
= &omap3xxx_mcbsp3_hwmod
,
2282 .clk
= "mcbsp3_ick",
2283 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2287 /* l4_per -> mcbsp4 */
2288 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4
= {
2289 .master
= &omap3xxx_l4_per_hwmod
,
2290 .slave
= &omap3xxx_mcbsp4_hwmod
,
2291 .clk
= "mcbsp4_ick",
2292 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2296 /* l4_core -> mcbsp5 */
2297 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5
= {
2298 .master
= &omap3xxx_l4_core_hwmod
,
2299 .slave
= &omap3xxx_mcbsp5_hwmod
,
2300 .clk
= "mcbsp5_ick",
2301 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2305 /* l4_per -> mcbsp2_sidetone */
2306 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone
= {
2307 .master
= &omap3xxx_l4_per_hwmod
,
2308 .slave
= &omap3xxx_mcbsp2_sidetone_hwmod
,
2309 .clk
= "mcbsp2_ick",
2310 .user
= OCP_USER_MPU
,
2314 /* l4_per -> mcbsp3_sidetone */
2315 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone
= {
2316 .master
= &omap3xxx_l4_per_hwmod
,
2317 .slave
= &omap3xxx_mcbsp3_sidetone_hwmod
,
2318 .clk
= "mcbsp3_ick",
2319 .user
= OCP_USER_MPU
,
2322 /* l4_core -> mailbox */
2323 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox
= {
2324 .master
= &omap3xxx_l4_core_hwmod
,
2325 .slave
= &omap3xxx_mailbox_hwmod
,
2326 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2329 /* l4 core -> mcspi1 interface */
2330 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1
= {
2331 .master
= &omap3xxx_l4_core_hwmod
,
2332 .slave
= &omap34xx_mcspi1
,
2333 .clk
= "mcspi1_ick",
2334 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2337 /* l4 core -> mcspi2 interface */
2338 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2
= {
2339 .master
= &omap3xxx_l4_core_hwmod
,
2340 .slave
= &omap34xx_mcspi2
,
2341 .clk
= "mcspi2_ick",
2342 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2345 /* l4 core -> mcspi3 interface */
2346 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3
= {
2347 .master
= &omap3xxx_l4_core_hwmod
,
2348 .slave
= &omap34xx_mcspi3
,
2349 .clk
= "mcspi3_ick",
2350 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2353 /* l4 core -> mcspi4 interface */
2355 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4
= {
2356 .master
= &omap3xxx_l4_core_hwmod
,
2357 .slave
= &omap34xx_mcspi4
,
2358 .clk
= "mcspi4_ick",
2359 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2362 static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2
= {
2363 .master
= &omap3xxx_usb_host_hs_hwmod
,
2364 .slave
= &omap3xxx_l3_main_hwmod
,
2365 .clk
= "core_l3_ick",
2366 .user
= OCP_USER_MPU
,
2370 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs
= {
2371 .master
= &omap3xxx_l4_core_hwmod
,
2372 .slave
= &omap3xxx_usb_host_hs_hwmod
,
2373 .clk
= "usbhost_ick",
2374 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2378 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs
= {
2379 .master
= &omap3xxx_l4_core_hwmod
,
2380 .slave
= &omap3xxx_usb_tll_hs_hwmod
,
2381 .clk
= "usbtll_ick",
2382 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2385 /* l4_core -> hdq1w interface */
2386 static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w
= {
2387 .master
= &omap3xxx_l4_core_hwmod
,
2388 .slave
= &omap3xxx_hdq1w_hwmod
,
2390 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2391 .flags
= OMAP_FIREWALL_L4
| OCPIF_SWSUP_IDLE
,
2394 /* l4_wkup -> 32ksync_counter */
2397 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k
= {
2398 .master
= &omap3xxx_l4_wkup_hwmod
,
2399 .slave
= &omap3xxx_counter_32k_hwmod
,
2400 .clk
= "omap_32ksync_ick",
2401 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2404 /* am35xx has Davinci MDIO & EMAC */
2405 static struct omap_hwmod_class am35xx_mdio_class
= {
2406 .name
= "davinci_mdio",
2409 static struct omap_hwmod am35xx_mdio_hwmod
= {
2410 .name
= "davinci_mdio",
2411 .class = &am35xx_mdio_class
,
2412 .flags
= HWMOD_NO_IDLEST
,
2416 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2417 * but this will probably require some additional hwmod core support,
2418 * so is left as a future to-do item.
2420 static struct omap_hwmod_ocp_if am35xx_mdio__l3
= {
2421 .master
= &am35xx_mdio_hwmod
,
2422 .slave
= &omap3xxx_l3_main_hwmod
,
2424 .user
= OCP_USER_MPU
,
2427 /* l4_core -> davinci mdio */
2429 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2430 * but this will probably require some additional hwmod core support,
2431 * so is left as a future to-do item.
2433 static struct omap_hwmod_ocp_if am35xx_l4_core__mdio
= {
2434 .master
= &omap3xxx_l4_core_hwmod
,
2435 .slave
= &am35xx_mdio_hwmod
,
2437 .user
= OCP_USER_MPU
,
2440 static struct omap_hwmod_class am35xx_emac_class
= {
2441 .name
= "davinci_emac",
2444 static struct omap_hwmod am35xx_emac_hwmod
= {
2445 .name
= "davinci_emac",
2446 .class = &am35xx_emac_class
,
2448 * According to Mark Greer, the MPU will not return from WFI
2449 * when the EMAC signals an interrupt.
2450 * http://www.spinics.net/lists/arm-kernel/msg174734.html
2452 .flags
= (HWMOD_NO_IDLEST
| HWMOD_BLOCK_WFI
),
2455 /* l3_core -> davinci emac interface */
2457 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2458 * but this will probably require some additional hwmod core support,
2459 * so is left as a future to-do item.
2461 static struct omap_hwmod_ocp_if am35xx_emac__l3
= {
2462 .master
= &am35xx_emac_hwmod
,
2463 .slave
= &omap3xxx_l3_main_hwmod
,
2465 .user
= OCP_USER_MPU
,
2468 /* l4_core -> davinci emac */
2470 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2471 * but this will probably require some additional hwmod core support,
2472 * so is left as a future to-do item.
2474 static struct omap_hwmod_ocp_if am35xx_l4_core__emac
= {
2475 .master
= &omap3xxx_l4_core_hwmod
,
2476 .slave
= &am35xx_emac_hwmod
,
2478 .user
= OCP_USER_MPU
,
2481 static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc
= {
2482 .master
= &omap3xxx_l3_main_hwmod
,
2483 .slave
= &omap3xxx_gpmc_hwmod
,
2484 .clk
= "core_l3_ick",
2485 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2488 /* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */
2489 static struct omap_hwmod_class_sysconfig omap3_sham_sysc
= {
2493 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
2494 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
2495 .sysc_fields
= &omap3_sham_sysc_fields
,
2498 static struct omap_hwmod_class omap3xxx_sham_class
= {
2500 .sysc
= &omap3_sham_sysc
,
2505 static struct omap_hwmod omap3xxx_sham_hwmod
= {
2507 .main_clk
= "sha12_ick",
2510 .module_offs
= CORE_MOD
,
2512 .idlest_idle_bit
= OMAP3430_ST_SHA12_SHIFT
,
2515 .class = &omap3xxx_sham_class
,
2519 static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham
= {
2520 .master
= &omap3xxx_l4_core_hwmod
,
2521 .slave
= &omap3xxx_sham_hwmod
,
2523 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2526 /* l4_core -> AES */
2527 static struct omap_hwmod_class_sysconfig omap3_aes_sysc
= {
2531 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
2532 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
2533 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
2534 .sysc_fields
= &omap3xxx_aes_sysc_fields
,
2537 static struct omap_hwmod_class omap3xxx_aes_class
= {
2539 .sysc
= &omap3_aes_sysc
,
2543 static struct omap_hwmod omap3xxx_aes_hwmod
= {
2545 .main_clk
= "aes2_ick",
2548 .module_offs
= CORE_MOD
,
2550 .idlest_idle_bit
= OMAP3430_ST_AES2_SHIFT
,
2553 .class = &omap3xxx_aes_class
,
2557 static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes
= {
2558 .master
= &omap3xxx_l4_core_hwmod
,
2559 .slave
= &omap3xxx_aes_hwmod
,
2561 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2566 * synchronous serial interface (multichannel and full-duplex serial if)
2569 static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc
= {
2571 .sysc_offs
= 0x0010,
2572 .syss_offs
= 0x0014,
2573 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_MIDLEMODE
|
2574 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
),
2575 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
2576 .sysc_fields
= &omap_hwmod_sysc_type1
,
2579 static struct omap_hwmod_class omap3xxx_ssi_hwmod_class
= {
2581 .sysc
= &omap34xx_ssi_sysc
,
2584 static struct omap_hwmod omap3xxx_ssi_hwmod
= {
2586 .class = &omap3xxx_ssi_hwmod_class
,
2587 .clkdm_name
= "core_l4_clkdm",
2588 .main_clk
= "ssi_ssr_fck",
2591 .module_offs
= CORE_MOD
,
2593 .idlest_idle_bit
= OMAP3430ES2_ST_SSI_IDLE_SHIFT
,
2598 /* L4 CORE -> SSI */
2599 static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi
= {
2600 .master
= &omap3xxx_l4_core_hwmod
,
2601 .slave
= &omap3xxx_ssi_hwmod
,
2603 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2606 static struct omap_hwmod_ocp_if
*omap3xxx_hwmod_ocp_ifs
[] __initdata
= {
2607 &omap3xxx_l3_main__l4_core
,
2608 &omap3xxx_l3_main__l4_per
,
2609 &omap3xxx_mpu__l3_main
,
2610 &omap3xxx_l3_main__l4_debugss
,
2611 &omap3xxx_l4_core__l4_wkup
,
2612 &omap3xxx_l4_core__mmc3
,
2613 &omap3_l4_core__uart1
,
2614 &omap3_l4_core__uart2
,
2615 &omap3_l4_per__uart3
,
2616 &omap3_l4_core__i2c1
,
2617 &omap3_l4_core__i2c2
,
2618 &omap3_l4_core__i2c3
,
2619 &omap3xxx_l4_wkup__l4_sec
,
2620 &omap3xxx_l4_wkup__timer1
,
2621 &omap3xxx_l4_per__timer2
,
2622 &omap3xxx_l4_per__timer3
,
2623 &omap3xxx_l4_per__timer4
,
2624 &omap3xxx_l4_per__timer5
,
2625 &omap3xxx_l4_per__timer6
,
2626 &omap3xxx_l4_per__timer7
,
2627 &omap3xxx_l4_per__timer8
,
2628 &omap3xxx_l4_per__timer9
,
2629 &omap3xxx_l4_core__timer10
,
2630 &omap3xxx_l4_core__timer11
,
2631 &omap3xxx_l4_wkup__wd_timer2
,
2632 &omap3xxx_l4_wkup__gpio1
,
2633 &omap3xxx_l4_per__gpio2
,
2634 &omap3xxx_l4_per__gpio3
,
2635 &omap3xxx_l4_per__gpio4
,
2636 &omap3xxx_l4_per__gpio5
,
2637 &omap3xxx_l4_per__gpio6
,
2638 &omap3xxx_dma_system__l3
,
2639 &omap3xxx_l4_core__dma_system
,
2640 &omap3xxx_l4_core__mcbsp1
,
2641 &omap3xxx_l4_per__mcbsp2
,
2642 &omap3xxx_l4_per__mcbsp3
,
2643 &omap3xxx_l4_per__mcbsp4
,
2644 &omap3xxx_l4_core__mcbsp5
,
2645 &omap3xxx_l4_per__mcbsp2_sidetone
,
2646 &omap3xxx_l4_per__mcbsp3_sidetone
,
2647 &omap34xx_l4_core__mcspi1
,
2648 &omap34xx_l4_core__mcspi2
,
2649 &omap34xx_l4_core__mcspi3
,
2650 &omap34xx_l4_core__mcspi4
,
2651 &omap3xxx_l4_wkup__counter_32k
,
2652 &omap3xxx_l3_main__gpmc
,
2656 /* GP-only hwmod links */
2657 static struct omap_hwmod_ocp_if
*omap34xx_gp_hwmod_ocp_ifs
[] __initdata
= {
2658 &omap3xxx_l4_sec__timer12
,
2662 static struct omap_hwmod_ocp_if
*omap36xx_gp_hwmod_ocp_ifs
[] __initdata
= {
2663 &omap3xxx_l4_sec__timer12
,
2667 static struct omap_hwmod_ocp_if
*am35xx_gp_hwmod_ocp_ifs
[] __initdata
= {
2668 &omap3xxx_l4_sec__timer12
,
2672 /* crypto hwmod links */
2673 static struct omap_hwmod_ocp_if
*omap34xx_sham_hwmod_ocp_ifs
[] __initdata
= {
2674 &omap3xxx_l4_core__sham
,
2678 static struct omap_hwmod_ocp_if
*omap34xx_aes_hwmod_ocp_ifs
[] __initdata
= {
2679 &omap3xxx_l4_core__aes
,
2683 static struct omap_hwmod_ocp_if
*omap36xx_sham_hwmod_ocp_ifs
[] __initdata
= {
2684 &omap3xxx_l4_core__sham
,
2688 static struct omap_hwmod_ocp_if
*omap36xx_aes_hwmod_ocp_ifs
[] __initdata
= {
2689 &omap3xxx_l4_core__aes
,
2694 * Apparently the SHA/MD5 and AES accelerator IP blocks are
2695 * only present on some AM35xx chips, and no one knows which
2697 * http://www.spinics.net/lists/arm-kernel/msg215466.html So
2698 * if you need these IP blocks on an AM35xx, try uncommenting
2699 * the following lines.
2701 static struct omap_hwmod_ocp_if
*am35xx_sham_hwmod_ocp_ifs
[] __initdata
= {
2702 /* &omap3xxx_l4_core__sham, */
2706 static struct omap_hwmod_ocp_if
*am35xx_aes_hwmod_ocp_ifs
[] __initdata
= {
2707 /* &omap3xxx_l4_core__aes, */
2711 /* 3430ES1-only hwmod links */
2712 static struct omap_hwmod_ocp_if
*omap3430es1_hwmod_ocp_ifs
[] __initdata
= {
2713 &omap3430es1_dss__l3
,
2714 &omap3430es1_l4_core__dss
,
2718 /* 3430ES2+-only hwmod links */
2719 static struct omap_hwmod_ocp_if
*omap3430es2plus_hwmod_ocp_ifs
[] __initdata
= {
2721 &omap3xxx_l4_core__dss
,
2722 &omap3xxx_usbhsotg__l3
,
2723 &omap3xxx_l4_core__usbhsotg
,
2724 &omap3xxx_usb_host_hs__l3_main_2
,
2725 &omap3xxx_l4_core__usb_host_hs
,
2726 &omap3xxx_l4_core__usb_tll_hs
,
2730 /* <= 3430ES3-only hwmod links */
2731 static struct omap_hwmod_ocp_if
*omap3430_pre_es3_hwmod_ocp_ifs
[] __initdata
= {
2732 &omap3xxx_l4_core__pre_es3_mmc1
,
2733 &omap3xxx_l4_core__pre_es3_mmc2
,
2737 /* 3430ES3+-only hwmod links */
2738 static struct omap_hwmod_ocp_if
*omap3430_es3plus_hwmod_ocp_ifs
[] __initdata
= {
2739 &omap3xxx_l4_core__es3plus_mmc1
,
2740 &omap3xxx_l4_core__es3plus_mmc2
,
2744 /* 34xx-only hwmod links (all ES revisions) */
2745 static struct omap_hwmod_ocp_if
*omap34xx_hwmod_ocp_ifs
[] __initdata
= {
2747 &omap34xx_l4_core__sr1
,
2748 &omap34xx_l4_core__sr2
,
2749 &omap3xxx_l4_core__mailbox
,
2750 &omap3xxx_l4_core__hdq1w
,
2751 &omap3xxx_sad2d__l3
,
2752 &omap3xxx_l4_core__mmu_isp
,
2753 &omap3xxx_l3_main__mmu_iva
,
2754 &omap3xxx_l4_core__ssi
,
2758 /* 36xx-only hwmod links (all ES revisions) */
2759 static struct omap_hwmod_ocp_if
*omap36xx_hwmod_ocp_ifs
[] __initdata
= {
2761 &omap36xx_l4_per__uart4
,
2763 &omap3xxx_l4_core__dss
,
2764 &omap36xx_l4_core__sr1
,
2765 &omap36xx_l4_core__sr2
,
2766 &omap3xxx_usbhsotg__l3
,
2767 &omap3xxx_l4_core__usbhsotg
,
2768 &omap3xxx_l4_core__mailbox
,
2769 &omap3xxx_usb_host_hs__l3_main_2
,
2770 &omap3xxx_l4_core__usb_host_hs
,
2771 &omap3xxx_l4_core__usb_tll_hs
,
2772 &omap3xxx_l4_core__es3plus_mmc1
,
2773 &omap3xxx_l4_core__es3plus_mmc2
,
2774 &omap3xxx_l4_core__hdq1w
,
2775 &omap3xxx_sad2d__l3
,
2776 &omap3xxx_l4_core__mmu_isp
,
2777 &omap3xxx_l3_main__mmu_iva
,
2778 &omap3xxx_l4_core__ssi
,
2782 static struct omap_hwmod_ocp_if
*am35xx_hwmod_ocp_ifs
[] __initdata
= {
2784 &omap3xxx_l4_core__dss
,
2785 &am35xx_usbhsotg__l3
,
2786 &am35xx_l4_core__usbhsotg
,
2787 &am35xx_l4_core__uart4
,
2788 &omap3xxx_usb_host_hs__l3_main_2
,
2789 &omap3xxx_l4_core__usb_host_hs
,
2790 &omap3xxx_l4_core__usb_tll_hs
,
2791 &omap3xxx_l4_core__es3plus_mmc1
,
2792 &omap3xxx_l4_core__es3plus_mmc2
,
2793 &omap3xxx_l4_core__hdq1w
,
2795 &am35xx_l4_core__mdio
,
2797 &am35xx_l4_core__emac
,
2801 static struct omap_hwmod_ocp_if
*omap3xxx_dss_hwmod_ocp_ifs
[] __initdata
= {
2802 &omap3xxx_l4_core__dss_dispc
,
2803 &omap3xxx_l4_core__dss_dsi1
,
2804 &omap3xxx_l4_core__dss_rfbi
,
2805 &omap3xxx_l4_core__dss_venc
,
2810 * omap3xxx_hwmod_is_hs_ip_block_usable - is a security IP block accessible?
2811 * @bus: struct device_node * for the top-level OMAP DT data
2812 * @dev_name: device name used in the DT file
2814 * Determine whether a "secure" IP block @dev_name is usable by Linux.
2815 * There doesn't appear to be a 100% reliable way to determine this,
2816 * so we rely on heuristics. If @bus is null, meaning there's no DT
2817 * data, then we only assume the IP block is accessible if the OMAP is
2818 * fused as a 'general-purpose' SoC. If however DT data is present,
2819 * test to see if the IP block is described in the DT data and set to
2820 * 'status = "okay"'. If so then we assume the ODM has configured the
2821 * OMAP firewalls to allow access to the IP block.
2823 * Return: 0 if device named @dev_name is not likely to be accessible,
2824 * or 1 if it is likely to be accessible.
2826 static bool __init
omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node
*bus
,
2827 const char *dev_name
)
2829 struct device_node
*node
;
2833 return omap_type() == OMAP2_DEVICE_TYPE_GP
;
2835 node
= of_get_child_by_name(bus
, dev_name
);
2836 available
= of_device_is_available(node
);
2842 int __init
omap3xxx_hwmod_init(void)
2845 struct omap_hwmod_ocp_if
**h
= NULL
, **h_gp
= NULL
, **h_sham
= NULL
;
2846 struct omap_hwmod_ocp_if
**h_aes
= NULL
;
2847 struct device_node
*bus
;
2852 /* Register hwmod links common to all OMAP3 */
2853 r
= omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs
);
2860 * Register hwmod links common to individual OMAP3 families, all
2861 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
2862 * All possible revisions should be included in this conditional.
2864 if (rev
== OMAP3430_REV_ES1_0
|| rev
== OMAP3430_REV_ES2_0
||
2865 rev
== OMAP3430_REV_ES2_1
|| rev
== OMAP3430_REV_ES3_0
||
2866 rev
== OMAP3430_REV_ES3_1
|| rev
== OMAP3430_REV_ES3_1_2
) {
2867 h
= omap34xx_hwmod_ocp_ifs
;
2868 h_gp
= omap34xx_gp_hwmod_ocp_ifs
;
2869 h_sham
= omap34xx_sham_hwmod_ocp_ifs
;
2870 h_aes
= omap34xx_aes_hwmod_ocp_ifs
;
2871 } else if (rev
== AM35XX_REV_ES1_0
|| rev
== AM35XX_REV_ES1_1
) {
2872 h
= am35xx_hwmod_ocp_ifs
;
2873 h_gp
= am35xx_gp_hwmod_ocp_ifs
;
2874 h_sham
= am35xx_sham_hwmod_ocp_ifs
;
2875 h_aes
= am35xx_aes_hwmod_ocp_ifs
;
2876 } else if (rev
== OMAP3630_REV_ES1_0
|| rev
== OMAP3630_REV_ES1_1
||
2877 rev
== OMAP3630_REV_ES1_2
) {
2878 h
= omap36xx_hwmod_ocp_ifs
;
2879 h_gp
= omap36xx_gp_hwmod_ocp_ifs
;
2880 h_sham
= omap36xx_sham_hwmod_ocp_ifs
;
2881 h_aes
= omap36xx_aes_hwmod_ocp_ifs
;
2883 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
2887 r
= omap_hwmod_register_links(h
);
2891 /* Register GP-only hwmod links. */
2892 if (h_gp
&& omap_type() == OMAP2_DEVICE_TYPE_GP
) {
2893 r
= omap_hwmod_register_links(h_gp
);
2899 * Register crypto hwmod links only if they are not disabled in DT.
2900 * If DT information is missing, enable them only for GP devices.
2903 bus
= of_find_node_by_name(NULL
, "ocp");
2905 if (h_sham
&& omap3xxx_hwmod_is_hs_ip_block_usable(bus
, "sham")) {
2906 r
= omap_hwmod_register_links(h_sham
);
2911 if (h_aes
&& omap3xxx_hwmod_is_hs_ip_block_usable(bus
, "aes")) {
2912 r
= omap_hwmod_register_links(h_aes
);
2919 * Register hwmod links specific to certain ES levels of a
2920 * particular family of silicon (e.g., 34xx ES1.0)
2923 if (rev
== OMAP3430_REV_ES1_0
) {
2924 h
= omap3430es1_hwmod_ocp_ifs
;
2925 } else if (rev
== OMAP3430_REV_ES2_0
|| rev
== OMAP3430_REV_ES2_1
||
2926 rev
== OMAP3430_REV_ES3_0
|| rev
== OMAP3430_REV_ES3_1
||
2927 rev
== OMAP3430_REV_ES3_1_2
) {
2928 h
= omap3430es2plus_hwmod_ocp_ifs
;
2932 r
= omap_hwmod_register_links(h
);
2938 if (rev
== OMAP3430_REV_ES1_0
|| rev
== OMAP3430_REV_ES2_0
||
2939 rev
== OMAP3430_REV_ES2_1
) {
2940 h
= omap3430_pre_es3_hwmod_ocp_ifs
;
2941 } else if (rev
== OMAP3430_REV_ES3_0
|| rev
== OMAP3430_REV_ES3_1
||
2942 rev
== OMAP3430_REV_ES3_1_2
) {
2943 h
= omap3430_es3plus_hwmod_ocp_ifs
;
2947 r
= omap_hwmod_register_links(h
);
2952 * DSS code presumes that dss_core hwmod is handled first,
2953 * _before_ any other DSS related hwmods so register common
2954 * DSS hwmod links last to ensure that dss_core is already
2955 * registered. Otherwise some change things may happen, for
2956 * ex. if dispc is handled before dss_core and DSS is enabled
2957 * in bootloader DISPC will be reset with outputs enabled
2958 * which sometimes leads to unrecoverable L3 error. XXX The
2959 * long-term fix to this is to ensure hwmods are set up in
2960 * dependency order in the hwmod core code.
2962 r
= omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs
);