3 * Copyright (C) 2013 Texas Instruments Incorporated
5 * Hwmod common for AM335x and AM43x
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation version 2.
11 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
12 * kind, whether express or implied; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
17 #include <linux/platform_data/gpio-omap.h>
18 #include <linux/platform_data/hsmmc-omap.h>
19 #include <linux/platform_data/spi-omap2-mcspi.h>
20 #include "omap_hwmod.h"
25 #include "omap_hwmod_33xx_43xx_common_data.h"
29 #define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl))
30 #define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl))
31 #define RSTST(oh, rstst) ((oh).prcm.omap4.rstst_offs = (rstst))
32 #define PRCM_FLAGS(oh, flag) ((oh).prcm.omap4.flags = (flag))
36 * instance(s): l3_main, l3_s, l3_instr
38 static struct omap_hwmod_class am33xx_l3_hwmod_class
= {
42 struct omap_hwmod am33xx_l3_main_hwmod
= {
44 .class = &am33xx_l3_hwmod_class
,
45 .clkdm_name
= "l3_clkdm",
46 .flags
= HWMOD_INIT_NO_IDLE
,
47 .main_clk
= "l3_gclk",
50 .modulemode
= MODULEMODE_SWCTRL
,
56 struct omap_hwmod am33xx_l3_s_hwmod
= {
58 .class = &am33xx_l3_hwmod_class
,
59 .clkdm_name
= "l3s_clkdm",
63 struct omap_hwmod am33xx_l3_instr_hwmod
= {
65 .class = &am33xx_l3_hwmod_class
,
66 .clkdm_name
= "l3_clkdm",
67 .flags
= HWMOD_INIT_NO_IDLE
,
68 .main_clk
= "l3_gclk",
71 .modulemode
= MODULEMODE_SWCTRL
,
78 * instance(s): l4_ls, l4_hs, l4_wkup, l4_fw
80 struct omap_hwmod_class am33xx_l4_hwmod_class
= {
85 struct omap_hwmod am33xx_l4_ls_hwmod
= {
87 .class = &am33xx_l4_hwmod_class
,
88 .clkdm_name
= "l4ls_clkdm",
89 .flags
= HWMOD_INIT_NO_IDLE
,
90 .main_clk
= "l4ls_gclk",
93 .modulemode
= MODULEMODE_SWCTRL
,
99 struct omap_hwmod am33xx_l4_wkup_hwmod
= {
101 .class = &am33xx_l4_hwmod_class
,
102 .clkdm_name
= "l4_wkup_clkdm",
103 .flags
= HWMOD_INIT_NO_IDLE
,
106 .modulemode
= MODULEMODE_SWCTRL
,
114 static struct omap_hwmod_class am33xx_mpu_hwmod_class
= {
118 struct omap_hwmod am33xx_mpu_hwmod
= {
120 .class = &am33xx_mpu_hwmod_class
,
121 .clkdm_name
= "mpu_clkdm",
122 .flags
= HWMOD_INIT_NO_IDLE
,
123 .main_clk
= "dpll_mpu_m2_ck",
126 .modulemode
= MODULEMODE_SWCTRL
,
133 * Wakeup controller sub-system under wakeup domain
135 struct omap_hwmod_class am33xx_wkup_m3_hwmod_class
= {
141 * Programmable Real-Time Unit and Industrial Communication Subsystem
143 static struct omap_hwmod_class am33xx_pruss_hwmod_class
= {
147 static struct omap_hwmod_rst_info am33xx_pruss_resets
[] = {
148 { .name
= "pruss", .rst_shift
= 1 },
152 /* Pseudo hwmod for reset control purpose only */
153 struct omap_hwmod am33xx_pruss_hwmod
= {
155 .class = &am33xx_pruss_hwmod_class
,
156 .clkdm_name
= "pruss_ocp_clkdm",
157 .main_clk
= "pruss_ocp_gclk",
160 .modulemode
= MODULEMODE_SWCTRL
,
163 .rst_lines
= am33xx_pruss_resets
,
164 .rst_lines_cnt
= ARRAY_SIZE(am33xx_pruss_resets
),
168 /* Pseudo hwmod for reset control purpose only */
169 static struct omap_hwmod_class am33xx_gfx_hwmod_class
= {
173 static struct omap_hwmod_rst_info am33xx_gfx_resets
[] = {
174 { .name
= "gfx", .rst_shift
= 0, .st_shift
= 0},
177 struct omap_hwmod am33xx_gfx_hwmod
= {
179 .class = &am33xx_gfx_hwmod_class
,
180 .clkdm_name
= "gfx_l3_clkdm",
181 .main_clk
= "gfx_fck_div_ck",
184 .modulemode
= MODULEMODE_SWCTRL
,
187 .rst_lines
= am33xx_gfx_resets
,
188 .rst_lines_cnt
= ARRAY_SIZE(am33xx_gfx_resets
),
193 * power and reset manager (whole prcm infrastructure)
195 static struct omap_hwmod_class am33xx_prcm_hwmod_class
= {
200 struct omap_hwmod am33xx_prcm_hwmod
= {
202 .class = &am33xx_prcm_hwmod_class
,
203 .clkdm_name
= "l4_wkup_clkdm",
210 static struct omap_hwmod_class_sysconfig am33xx_emif_sysc
= {
214 struct omap_hwmod_class am33xx_emif_hwmod_class
= {
216 .sysc
= &am33xx_emif_sysc
,
222 static struct omap_hwmod_class_sysconfig am33xx_aes0_sysc
= {
226 .sysc_flags
= SYSS_HAS_RESET_STATUS
,
229 static struct omap_hwmod_class am33xx_aes0_hwmod_class
= {
231 .sysc
= &am33xx_aes0_sysc
,
234 struct omap_hwmod am33xx_aes0_hwmod
= {
236 .class = &am33xx_aes0_hwmod_class
,
237 .clkdm_name
= "l3_clkdm",
238 .main_clk
= "aes0_fck",
241 .modulemode
= MODULEMODE_SWCTRL
,
246 /* sha0 HIB2 (the 'P' (public) device) */
247 static struct omap_hwmod_class_sysconfig am33xx_sha0_sysc
= {
251 .sysc_flags
= SYSS_HAS_RESET_STATUS
,
254 static struct omap_hwmod_class am33xx_sha0_hwmod_class
= {
256 .sysc
= &am33xx_sha0_sysc
,
259 struct omap_hwmod am33xx_sha0_hwmod
= {
261 .class = &am33xx_sha0_hwmod_class
,
262 .clkdm_name
= "l3_clkdm",
263 .main_clk
= "l3_gclk",
266 .modulemode
= MODULEMODE_SWCTRL
,
272 static struct omap_hwmod_class_sysconfig am33xx_rng_sysc
= {
275 .sysc_flags
= SYSC_HAS_AUTOIDLE
| SYSC_HAS_SIDLEMODE
,
276 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
,
277 .sysc_fields
= &omap_hwmod_sysc_type1
,
280 static struct omap_hwmod_class am33xx_rng_hwmod_class
= {
282 .sysc
= &am33xx_rng_sysc
,
285 struct omap_hwmod am33xx_rng_hwmod
= {
287 .class = &am33xx_rng_hwmod_class
,
288 .clkdm_name
= "l4ls_clkdm",
289 .flags
= HWMOD_SWSUP_SIDLE
,
290 .main_clk
= "rng_fck",
293 .modulemode
= MODULEMODE_SWCTRL
,
299 static struct omap_hwmod_class am33xx_ocmcram_hwmod_class
= {
303 struct omap_hwmod am33xx_ocmcram_hwmod
= {
305 .class = &am33xx_ocmcram_hwmod_class
,
306 .clkdm_name
= "l3_clkdm",
307 .flags
= HWMOD_INIT_NO_IDLE
,
308 .main_clk
= "l3_gclk",
311 .modulemode
= MODULEMODE_SWCTRL
,
316 /* 'smartreflex' class */
317 static struct omap_hwmod_class am33xx_smartreflex_hwmod_class
= {
318 .name
= "smartreflex",
322 struct omap_hwmod am33xx_smartreflex0_hwmod
= {
323 .name
= "smartreflex0",
324 .class = &am33xx_smartreflex_hwmod_class
,
325 .clkdm_name
= "l4_wkup_clkdm",
326 .main_clk
= "smartreflex0_fck",
329 .modulemode
= MODULEMODE_SWCTRL
,
335 struct omap_hwmod am33xx_smartreflex1_hwmod
= {
336 .name
= "smartreflex1",
337 .class = &am33xx_smartreflex_hwmod_class
,
338 .clkdm_name
= "l4_wkup_clkdm",
339 .main_clk
= "smartreflex1_fck",
342 .modulemode
= MODULEMODE_SWCTRL
,
348 * 'control' module class
350 struct omap_hwmod_class am33xx_control_hwmod_class
= {
356 * cpsw/cpgmac sub system
358 static struct omap_hwmod_class_sysconfig am33xx_cpgmac_sysc
= {
362 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
|
363 SYSS_HAS_RESET_STATUS
),
364 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| MSTANDBY_FORCE
|
366 .sysc_fields
= &omap_hwmod_sysc_type3
,
369 static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class
= {
371 .sysc
= &am33xx_cpgmac_sysc
,
374 struct omap_hwmod am33xx_cpgmac0_hwmod
= {
376 .class = &am33xx_cpgmac0_hwmod_class
,
377 .clkdm_name
= "cpsw_125mhz_clkdm",
378 .flags
= (HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
),
379 .main_clk
= "cpsw_125mhz_gclk",
383 .modulemode
= MODULEMODE_SWCTRL
,
391 static struct omap_hwmod_class am33xx_mdio_hwmod_class
= {
392 .name
= "davinci_mdio",
395 struct omap_hwmod am33xx_mdio_hwmod
= {
396 .name
= "davinci_mdio",
397 .class = &am33xx_mdio_hwmod_class
,
398 .clkdm_name
= "cpsw_125mhz_clkdm",
399 .main_clk
= "cpsw_125mhz_gclk",
405 static struct omap_hwmod_class am33xx_dcan_hwmod_class
= {
410 struct omap_hwmod am33xx_dcan0_hwmod
= {
412 .class = &am33xx_dcan_hwmod_class
,
413 .clkdm_name
= "l4ls_clkdm",
414 .main_clk
= "dcan0_fck",
417 .modulemode
= MODULEMODE_SWCTRL
,
423 struct omap_hwmod am33xx_dcan1_hwmod
= {
425 .class = &am33xx_dcan_hwmod_class
,
426 .clkdm_name
= "l4ls_clkdm",
427 .main_clk
= "dcan1_fck",
430 .modulemode
= MODULEMODE_SWCTRL
,
436 static struct omap_hwmod_class_sysconfig am33xx_elm_sysc
= {
440 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
441 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
442 SYSS_HAS_RESET_STATUS
),
443 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
444 .sysc_fields
= &omap_hwmod_sysc_type1
,
447 static struct omap_hwmod_class am33xx_elm_hwmod_class
= {
449 .sysc
= &am33xx_elm_sysc
,
452 struct omap_hwmod am33xx_elm_hwmod
= {
454 .class = &am33xx_elm_hwmod_class
,
455 .clkdm_name
= "l4ls_clkdm",
456 .main_clk
= "l4ls_gclk",
459 .modulemode
= MODULEMODE_SWCTRL
,
465 static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc
= {
468 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
),
469 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
470 SIDLE_SMART_WKUP
| MSTANDBY_FORCE
| MSTANDBY_NO
|
471 MSTANDBY_SMART
| MSTANDBY_SMART_WKUP
),
472 .sysc_fields
= &omap_hwmod_sysc_type2
,
475 struct omap_hwmod_class am33xx_epwmss_hwmod_class
= {
477 .sysc
= &am33xx_epwmss_sysc
,
481 struct omap_hwmod am33xx_epwmss0_hwmod
= {
483 .class = &am33xx_epwmss_hwmod_class
,
484 .clkdm_name
= "l4ls_clkdm",
485 .main_clk
= "l4ls_gclk",
488 .modulemode
= MODULEMODE_SWCTRL
,
494 struct omap_hwmod am33xx_epwmss1_hwmod
= {
496 .class = &am33xx_epwmss_hwmod_class
,
497 .clkdm_name
= "l4ls_clkdm",
498 .main_clk
= "l4ls_gclk",
501 .modulemode
= MODULEMODE_SWCTRL
,
507 struct omap_hwmod am33xx_epwmss2_hwmod
= {
509 .class = &am33xx_epwmss_hwmod_class
,
510 .clkdm_name
= "l4ls_clkdm",
511 .main_clk
= "l4ls_gclk",
514 .modulemode
= MODULEMODE_SWCTRL
,
520 * 'gpio' class: for gpio 0,1,2,3
522 static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc
= {
526 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_ENAWAKEUP
|
527 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
528 SYSS_HAS_RESET_STATUS
),
529 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
531 .sysc_fields
= &omap_hwmod_sysc_type1
,
534 struct omap_hwmod_class am33xx_gpio_hwmod_class
= {
536 .sysc
= &am33xx_gpio_sysc
,
540 struct omap_gpio_dev_attr gpio_dev_attr
= {
546 static struct omap_hwmod_opt_clk gpio1_opt_clks
[] = {
547 { .role
= "dbclk", .clk
= "gpio1_dbclk" },
550 struct omap_hwmod am33xx_gpio1_hwmod
= {
552 .class = &am33xx_gpio_hwmod_class
,
553 .clkdm_name
= "l4ls_clkdm",
554 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
555 .main_clk
= "l4ls_gclk",
558 .modulemode
= MODULEMODE_SWCTRL
,
561 .opt_clks
= gpio1_opt_clks
,
562 .opt_clks_cnt
= ARRAY_SIZE(gpio1_opt_clks
),
563 .dev_attr
= &gpio_dev_attr
,
567 static struct omap_hwmod_opt_clk gpio2_opt_clks
[] = {
568 { .role
= "dbclk", .clk
= "gpio2_dbclk" },
571 struct omap_hwmod am33xx_gpio2_hwmod
= {
573 .class = &am33xx_gpio_hwmod_class
,
574 .clkdm_name
= "l4ls_clkdm",
575 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
576 .main_clk
= "l4ls_gclk",
579 .modulemode
= MODULEMODE_SWCTRL
,
582 .opt_clks
= gpio2_opt_clks
,
583 .opt_clks_cnt
= ARRAY_SIZE(gpio2_opt_clks
),
584 .dev_attr
= &gpio_dev_attr
,
588 static struct omap_hwmod_opt_clk gpio3_opt_clks
[] = {
589 { .role
= "dbclk", .clk
= "gpio3_dbclk" },
592 struct omap_hwmod am33xx_gpio3_hwmod
= {
594 .class = &am33xx_gpio_hwmod_class
,
595 .clkdm_name
= "l4ls_clkdm",
596 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
597 .main_clk
= "l4ls_gclk",
600 .modulemode
= MODULEMODE_SWCTRL
,
603 .opt_clks
= gpio3_opt_clks
,
604 .opt_clks_cnt
= ARRAY_SIZE(gpio3_opt_clks
),
605 .dev_attr
= &gpio_dev_attr
,
609 static struct omap_hwmod_class_sysconfig gpmc_sysc
= {
613 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_SIDLEMODE
|
614 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
615 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
616 .sysc_fields
= &omap_hwmod_sysc_type1
,
619 static struct omap_hwmod_class am33xx_gpmc_hwmod_class
= {
624 struct omap_hwmod am33xx_gpmc_hwmod
= {
626 .class = &am33xx_gpmc_hwmod_class
,
627 .clkdm_name
= "l3s_clkdm",
628 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
629 .flags
= DEBUG_OMAP_GPMC_HWMOD_FLAGS
,
630 .main_clk
= "l3s_gclk",
633 .modulemode
= MODULEMODE_SWCTRL
,
639 static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc
= {
642 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
643 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
|
644 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
645 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
647 .sysc_fields
= &omap_hwmod_sysc_type1
,
650 static struct omap_hwmod_class i2c_class
= {
652 .sysc
= &am33xx_i2c_sysc
,
653 .rev
= OMAP_I2C_IP_VERSION_2
,
654 .reset
= &omap_i2c_reset
,
657 static struct omap_i2c_dev_attr i2c_dev_attr
= {
658 .flags
= OMAP_I2C_FLAG_BUS_SHIFT_NONE
,
662 struct omap_hwmod am33xx_i2c1_hwmod
= {
665 .clkdm_name
= "l4_wkup_clkdm",
666 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
667 .main_clk
= "dpll_per_m2_div4_wkupdm_ck",
670 .modulemode
= MODULEMODE_SWCTRL
,
673 .dev_attr
= &i2c_dev_attr
,
677 struct omap_hwmod am33xx_i2c2_hwmod
= {
680 .clkdm_name
= "l4ls_clkdm",
681 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
682 .main_clk
= "dpll_per_m2_div4_ck",
685 .modulemode
= MODULEMODE_SWCTRL
,
688 .dev_attr
= &i2c_dev_attr
,
692 struct omap_hwmod am33xx_i2c3_hwmod
= {
695 .clkdm_name
= "l4ls_clkdm",
696 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
697 .main_clk
= "dpll_per_m2_div4_ck",
700 .modulemode
= MODULEMODE_SWCTRL
,
703 .dev_attr
= &i2c_dev_attr
,
708 * mailbox module allowing communication between the on-chip processors using a
709 * queued mailbox-interrupt mechanism.
711 static struct omap_hwmod_class_sysconfig am33xx_mailbox_sysc
= {
714 .sysc_flags
= (SYSC_HAS_RESET_STATUS
| SYSC_HAS_SIDLEMODE
|
716 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
717 .sysc_fields
= &omap_hwmod_sysc_type2
,
720 static struct omap_hwmod_class am33xx_mailbox_hwmod_class
= {
722 .sysc
= &am33xx_mailbox_sysc
,
725 struct omap_hwmod am33xx_mailbox_hwmod
= {
727 .class = &am33xx_mailbox_hwmod_class
,
728 .clkdm_name
= "l4ls_clkdm",
729 .main_clk
= "l4ls_gclk",
732 .modulemode
= MODULEMODE_SWCTRL
,
740 static struct omap_hwmod_class_sysconfig am33xx_mcasp_sysc
= {
743 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
744 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
745 .sysc_fields
= &omap_hwmod_sysc_type3
,
748 static struct omap_hwmod_class am33xx_mcasp_hwmod_class
= {
750 .sysc
= &am33xx_mcasp_sysc
,
754 struct omap_hwmod am33xx_mcasp0_hwmod
= {
756 .class = &am33xx_mcasp_hwmod_class
,
757 .clkdm_name
= "l3s_clkdm",
758 .main_clk
= "mcasp0_fck",
761 .modulemode
= MODULEMODE_SWCTRL
,
767 struct omap_hwmod am33xx_mcasp1_hwmod
= {
769 .class = &am33xx_mcasp_hwmod_class
,
770 .clkdm_name
= "l3s_clkdm",
771 .main_clk
= "mcasp1_fck",
774 .modulemode
= MODULEMODE_SWCTRL
,
780 static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc
= {
784 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
785 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
786 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
787 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
788 .sysc_fields
= &omap_hwmod_sysc_type1
,
791 static struct omap_hwmod_class am33xx_mmc_hwmod_class
= {
793 .sysc
= &am33xx_mmc_sysc
,
797 static struct omap_hsmmc_dev_attr am33xx_mmc0_dev_attr
= {
798 .flags
= OMAP_HSMMC_SUPPORTS_DUAL_VOLT
,
801 struct omap_hwmod am33xx_mmc0_hwmod
= {
803 .class = &am33xx_mmc_hwmod_class
,
804 .clkdm_name
= "l4ls_clkdm",
805 .main_clk
= "mmc_clk",
808 .modulemode
= MODULEMODE_SWCTRL
,
811 .dev_attr
= &am33xx_mmc0_dev_attr
,
815 static struct omap_hsmmc_dev_attr am33xx_mmc1_dev_attr
= {
816 .flags
= OMAP_HSMMC_SUPPORTS_DUAL_VOLT
,
819 struct omap_hwmod am33xx_mmc1_hwmod
= {
821 .class = &am33xx_mmc_hwmod_class
,
822 .clkdm_name
= "l4ls_clkdm",
823 .main_clk
= "mmc_clk",
826 .modulemode
= MODULEMODE_SWCTRL
,
829 .dev_attr
= &am33xx_mmc1_dev_attr
,
833 static struct omap_hsmmc_dev_attr am33xx_mmc2_dev_attr
= {
834 .flags
= OMAP_HSMMC_SUPPORTS_DUAL_VOLT
,
836 struct omap_hwmod am33xx_mmc2_hwmod
= {
838 .class = &am33xx_mmc_hwmod_class
,
839 .clkdm_name
= "l3s_clkdm",
840 .main_clk
= "mmc_clk",
843 .modulemode
= MODULEMODE_SWCTRL
,
846 .dev_attr
= &am33xx_mmc2_dev_attr
,
853 static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc
= {
856 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
857 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
|
858 SIDLE_SMART
| SIDLE_SMART_WKUP
),
859 .sysc_fields
= &omap_hwmod_sysc_type3
,
862 static struct omap_hwmod_class am33xx_rtc_hwmod_class
= {
864 .sysc
= &am33xx_rtc_sysc
,
865 .unlock
= &omap_hwmod_rtc_unlock
,
866 .lock
= &omap_hwmod_rtc_lock
,
869 struct omap_hwmod am33xx_rtc_hwmod
= {
871 .class = &am33xx_rtc_hwmod_class
,
872 .clkdm_name
= "l4_rtc_clkdm",
873 .main_clk
= "clk_32768_ck",
876 .modulemode
= MODULEMODE_SWCTRL
,
882 static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc
= {
886 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
887 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
888 SYSS_HAS_RESET_STATUS
),
889 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
890 .sysc_fields
= &omap_hwmod_sysc_type1
,
893 struct omap_hwmod_class am33xx_spi_hwmod_class
= {
895 .sysc
= &am33xx_mcspi_sysc
,
896 .rev
= OMAP4_MCSPI_REV
,
900 struct omap2_mcspi_dev_attr mcspi_attrib
= {
903 struct omap_hwmod am33xx_spi0_hwmod
= {
905 .class = &am33xx_spi_hwmod_class
,
906 .clkdm_name
= "l4ls_clkdm",
907 .main_clk
= "dpll_per_m2_div4_ck",
910 .modulemode
= MODULEMODE_SWCTRL
,
913 .dev_attr
= &mcspi_attrib
,
917 struct omap_hwmod am33xx_spi1_hwmod
= {
919 .class = &am33xx_spi_hwmod_class
,
920 .clkdm_name
= "l4ls_clkdm",
921 .main_clk
= "dpll_per_m2_div4_ck",
924 .modulemode
= MODULEMODE_SWCTRL
,
927 .dev_attr
= &mcspi_attrib
,
932 * spinlock provides hardware assistance for synchronizing the
933 * processes running on multiple processors
936 static struct omap_hwmod_class_sysconfig am33xx_spinlock_sysc
= {
940 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
941 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
|
942 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
943 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
944 .sysc_fields
= &omap_hwmod_sysc_type1
,
947 static struct omap_hwmod_class am33xx_spinlock_hwmod_class
= {
949 .sysc
= &am33xx_spinlock_sysc
,
952 struct omap_hwmod am33xx_spinlock_hwmod
= {
954 .class = &am33xx_spinlock_hwmod_class
,
955 .clkdm_name
= "l4ls_clkdm",
956 .main_clk
= "l4ls_gclk",
959 .modulemode
= MODULEMODE_SWCTRL
,
964 /* 'timer 2-7' class */
965 static struct omap_hwmod_class_sysconfig am33xx_timer_sysc
= {
969 .sysc_flags
= SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
970 SYSC_HAS_RESET_STATUS
,
971 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
973 .sysc_fields
= &omap_hwmod_sysc_type2
,
976 struct omap_hwmod_class am33xx_timer_hwmod_class
= {
978 .sysc
= &am33xx_timer_sysc
,
982 static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc
= {
986 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
987 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
988 SYSS_HAS_RESET_STATUS
),
989 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
990 .sysc_fields
= &omap_hwmod_sysc_type1
,
993 static struct omap_hwmod_class am33xx_timer1ms_hwmod_class
= {
995 .sysc
= &am33xx_timer1ms_sysc
,
998 struct omap_hwmod am33xx_timer1_hwmod
= {
1000 .class = &am33xx_timer1ms_hwmod_class
,
1001 .clkdm_name
= "l4_wkup_clkdm",
1002 .main_clk
= "timer1_fck",
1005 .modulemode
= MODULEMODE_SWCTRL
,
1010 struct omap_hwmod am33xx_timer2_hwmod
= {
1012 .class = &am33xx_timer_hwmod_class
,
1013 .clkdm_name
= "l4ls_clkdm",
1014 .main_clk
= "timer2_fck",
1017 .modulemode
= MODULEMODE_SWCTRL
,
1022 struct omap_hwmod am33xx_timer3_hwmod
= {
1024 .class = &am33xx_timer_hwmod_class
,
1025 .clkdm_name
= "l4ls_clkdm",
1026 .main_clk
= "timer3_fck",
1029 .modulemode
= MODULEMODE_SWCTRL
,
1034 struct omap_hwmod am33xx_timer4_hwmod
= {
1036 .class = &am33xx_timer_hwmod_class
,
1037 .clkdm_name
= "l4ls_clkdm",
1038 .main_clk
= "timer4_fck",
1041 .modulemode
= MODULEMODE_SWCTRL
,
1046 struct omap_hwmod am33xx_timer5_hwmod
= {
1048 .class = &am33xx_timer_hwmod_class
,
1049 .clkdm_name
= "l4ls_clkdm",
1050 .main_clk
= "timer5_fck",
1053 .modulemode
= MODULEMODE_SWCTRL
,
1058 struct omap_hwmod am33xx_timer6_hwmod
= {
1060 .class = &am33xx_timer_hwmod_class
,
1061 .clkdm_name
= "l4ls_clkdm",
1062 .main_clk
= "timer6_fck",
1065 .modulemode
= MODULEMODE_SWCTRL
,
1070 struct omap_hwmod am33xx_timer7_hwmod
= {
1072 .class = &am33xx_timer_hwmod_class
,
1073 .clkdm_name
= "l4ls_clkdm",
1074 .main_clk
= "timer7_fck",
1077 .modulemode
= MODULEMODE_SWCTRL
,
1083 static struct omap_hwmod_class am33xx_tpcc_hwmod_class
= {
1087 struct omap_hwmod am33xx_tpcc_hwmod
= {
1089 .class = &am33xx_tpcc_hwmod_class
,
1090 .clkdm_name
= "l3_clkdm",
1091 .main_clk
= "l3_gclk",
1094 .modulemode
= MODULEMODE_SWCTRL
,
1099 static struct omap_hwmod_class_sysconfig am33xx_tptc_sysc
= {
1102 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
1103 SYSC_HAS_MIDLEMODE
),
1104 .idlemodes
= (SIDLE_FORCE
| SIDLE_SMART
| MSTANDBY_FORCE
),
1105 .sysc_fields
= &omap_hwmod_sysc_type2
,
1109 static struct omap_hwmod_class am33xx_tptc_hwmod_class
= {
1111 .sysc
= &am33xx_tptc_sysc
,
1115 struct omap_hwmod am33xx_tptc0_hwmod
= {
1117 .class = &am33xx_tptc_hwmod_class
,
1118 .clkdm_name
= "l3_clkdm",
1119 .flags
= HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
,
1120 .main_clk
= "l3_gclk",
1123 .modulemode
= MODULEMODE_SWCTRL
,
1129 struct omap_hwmod am33xx_tptc1_hwmod
= {
1131 .class = &am33xx_tptc_hwmod_class
,
1132 .clkdm_name
= "l3_clkdm",
1133 .flags
= (HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
),
1134 .main_clk
= "l3_gclk",
1137 .modulemode
= MODULEMODE_SWCTRL
,
1143 struct omap_hwmod am33xx_tptc2_hwmod
= {
1145 .class = &am33xx_tptc_hwmod_class
,
1146 .clkdm_name
= "l3_clkdm",
1147 .flags
= (HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
),
1148 .main_clk
= "l3_gclk",
1151 .modulemode
= MODULEMODE_SWCTRL
,
1157 static struct omap_hwmod_class_sysconfig uart_sysc
= {
1161 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_ENAWAKEUP
|
1162 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
),
1163 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1165 .sysc_fields
= &omap_hwmod_sysc_type1
,
1168 static struct omap_hwmod_class uart_class
= {
1173 struct omap_hwmod am33xx_uart1_hwmod
= {
1175 .class = &uart_class
,
1176 .clkdm_name
= "l4_wkup_clkdm",
1177 .flags
= DEBUG_AM33XXUART1_FLAGS
| HWMOD_SWSUP_SIDLE_ACT
,
1178 .main_clk
= "dpll_per_m2_div4_wkupdm_ck",
1181 .modulemode
= MODULEMODE_SWCTRL
,
1186 struct omap_hwmod am33xx_uart2_hwmod
= {
1188 .class = &uart_class
,
1189 .clkdm_name
= "l4ls_clkdm",
1190 .flags
= HWMOD_SWSUP_SIDLE_ACT
,
1191 .main_clk
= "dpll_per_m2_div4_ck",
1194 .modulemode
= MODULEMODE_SWCTRL
,
1200 struct omap_hwmod am33xx_uart3_hwmod
= {
1202 .class = &uart_class
,
1203 .clkdm_name
= "l4ls_clkdm",
1204 .flags
= HWMOD_SWSUP_SIDLE_ACT
,
1205 .main_clk
= "dpll_per_m2_div4_ck",
1208 .modulemode
= MODULEMODE_SWCTRL
,
1213 struct omap_hwmod am33xx_uart4_hwmod
= {
1215 .class = &uart_class
,
1216 .clkdm_name
= "l4ls_clkdm",
1217 .flags
= HWMOD_SWSUP_SIDLE_ACT
,
1218 .main_clk
= "dpll_per_m2_div4_ck",
1221 .modulemode
= MODULEMODE_SWCTRL
,
1226 struct omap_hwmod am33xx_uart5_hwmod
= {
1228 .class = &uart_class
,
1229 .clkdm_name
= "l4ls_clkdm",
1230 .flags
= HWMOD_SWSUP_SIDLE_ACT
,
1231 .main_clk
= "dpll_per_m2_div4_ck",
1234 .modulemode
= MODULEMODE_SWCTRL
,
1239 struct omap_hwmod am33xx_uart6_hwmod
= {
1241 .class = &uart_class
,
1242 .clkdm_name
= "l4ls_clkdm",
1243 .flags
= HWMOD_SWSUP_SIDLE_ACT
,
1244 .main_clk
= "dpll_per_m2_div4_ck",
1247 .modulemode
= MODULEMODE_SWCTRL
,
1252 /* 'wd_timer' class */
1253 static struct omap_hwmod_class_sysconfig wdt_sysc
= {
1257 .sysc_flags
= (SYSC_HAS_EMUFREE
| SYSC_HAS_SIDLEMODE
|
1258 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
1259 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1261 .sysc_fields
= &omap_hwmod_sysc_type1
,
1264 static struct omap_hwmod_class am33xx_wd_timer_hwmod_class
= {
1267 .pre_shutdown
= &omap2_wd_timer_disable
,
1271 * XXX: device.c file uses hardcoded name for watchdog timer
1272 * driver "wd_timer2, so we are also using same name as of now...
1274 struct omap_hwmod am33xx_wd_timer1_hwmod
= {
1275 .name
= "wd_timer2",
1276 .class = &am33xx_wd_timer_hwmod_class
,
1277 .clkdm_name
= "l4_wkup_clkdm",
1278 .flags
= HWMOD_SWSUP_SIDLE
,
1279 .main_clk
= "wdt1_fck",
1282 .modulemode
= MODULEMODE_SWCTRL
,
1287 static void omap_hwmod_am33xx_clkctrl(void)
1289 CLKCTRL(am33xx_uart2_hwmod
, AM33XX_CM_PER_UART1_CLKCTRL_OFFSET
);
1290 CLKCTRL(am33xx_uart3_hwmod
, AM33XX_CM_PER_UART2_CLKCTRL_OFFSET
);
1291 CLKCTRL(am33xx_uart4_hwmod
, AM33XX_CM_PER_UART3_CLKCTRL_OFFSET
);
1292 CLKCTRL(am33xx_uart5_hwmod
, AM33XX_CM_PER_UART4_CLKCTRL_OFFSET
);
1293 CLKCTRL(am33xx_uart6_hwmod
, AM33XX_CM_PER_UART5_CLKCTRL_OFFSET
);
1294 CLKCTRL(am33xx_dcan0_hwmod
, AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET
);
1295 CLKCTRL(am33xx_dcan1_hwmod
, AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET
);
1296 CLKCTRL(am33xx_elm_hwmod
, AM33XX_CM_PER_ELM_CLKCTRL_OFFSET
);
1297 CLKCTRL(am33xx_epwmss0_hwmod
, AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET
);
1298 CLKCTRL(am33xx_epwmss1_hwmod
, AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET
);
1299 CLKCTRL(am33xx_epwmss2_hwmod
, AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET
);
1300 CLKCTRL(am33xx_gpio1_hwmod
, AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET
);
1301 CLKCTRL(am33xx_gpio2_hwmod
, AM33XX_CM_PER_GPIO2_CLKCTRL_OFFSET
);
1302 CLKCTRL(am33xx_gpio3_hwmod
, AM33XX_CM_PER_GPIO3_CLKCTRL_OFFSET
);
1303 CLKCTRL(am33xx_i2c2_hwmod
, AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET
);
1304 CLKCTRL(am33xx_i2c3_hwmod
, AM33XX_CM_PER_I2C2_CLKCTRL_OFFSET
);
1305 CLKCTRL(am33xx_mailbox_hwmod
, AM33XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET
);
1306 CLKCTRL(am33xx_mcasp0_hwmod
, AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET
);
1307 CLKCTRL(am33xx_mcasp1_hwmod
, AM33XX_CM_PER_MCASP1_CLKCTRL_OFFSET
);
1308 CLKCTRL(am33xx_mmc0_hwmod
, AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET
);
1309 CLKCTRL(am33xx_mmc1_hwmod
, AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET
);
1310 CLKCTRL(am33xx_spi0_hwmod
, AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET
);
1311 CLKCTRL(am33xx_spi1_hwmod
, AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET
);
1312 CLKCTRL(am33xx_spinlock_hwmod
, AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET
);
1313 CLKCTRL(am33xx_timer2_hwmod
, AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET
);
1314 CLKCTRL(am33xx_timer3_hwmod
, AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET
);
1315 CLKCTRL(am33xx_timer4_hwmod
, AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET
);
1316 CLKCTRL(am33xx_timer5_hwmod
, AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET
);
1317 CLKCTRL(am33xx_timer6_hwmod
, AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET
);
1318 CLKCTRL(am33xx_timer7_hwmod
, AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET
);
1319 CLKCTRL(am33xx_smartreflex0_hwmod
,
1320 AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET
);
1321 CLKCTRL(am33xx_smartreflex1_hwmod
,
1322 AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET
);
1323 CLKCTRL(am33xx_uart1_hwmod
, AM33XX_CM_WKUP_UART0_CLKCTRL_OFFSET
);
1324 CLKCTRL(am33xx_timer1_hwmod
, AM33XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET
);
1325 CLKCTRL(am33xx_i2c1_hwmod
, AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET
);
1326 CLKCTRL(am33xx_wd_timer1_hwmod
, AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET
);
1327 CLKCTRL(am33xx_rtc_hwmod
, AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET
);
1328 PRCM_FLAGS(am33xx_rtc_hwmod
, HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET
);
1329 CLKCTRL(am33xx_mmc2_hwmod
, AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET
);
1330 CLKCTRL(am33xx_gpmc_hwmod
, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET
);
1331 CLKCTRL(am33xx_l4_ls_hwmod
, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET
);
1332 CLKCTRL(am33xx_l4_wkup_hwmod
, AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET
);
1333 CLKCTRL(am33xx_l3_main_hwmod
, AM33XX_CM_PER_L3_CLKCTRL_OFFSET
);
1334 CLKCTRL(am33xx_tpcc_hwmod
, AM33XX_CM_PER_TPCC_CLKCTRL_OFFSET
);
1335 CLKCTRL(am33xx_tptc0_hwmod
, AM33XX_CM_PER_TPTC0_CLKCTRL_OFFSET
);
1336 CLKCTRL(am33xx_tptc1_hwmod
, AM33XX_CM_PER_TPTC1_CLKCTRL_OFFSET
);
1337 CLKCTRL(am33xx_tptc2_hwmod
, AM33XX_CM_PER_TPTC2_CLKCTRL_OFFSET
);
1338 CLKCTRL(am33xx_gfx_hwmod
, AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET
);
1339 CLKCTRL(am33xx_cpgmac0_hwmod
, AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET
);
1340 CLKCTRL(am33xx_pruss_hwmod
, AM33XX_CM_PER_PRUSS_CLKCTRL_OFFSET
);
1341 CLKCTRL(am33xx_mpu_hwmod
, AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET
);
1342 CLKCTRL(am33xx_l3_instr_hwmod
, AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET
);
1343 CLKCTRL(am33xx_ocmcram_hwmod
, AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET
);
1344 CLKCTRL(am33xx_sha0_hwmod
, AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET
);
1345 CLKCTRL(am33xx_aes0_hwmod
, AM33XX_CM_PER_AES0_CLKCTRL_OFFSET
);
1346 CLKCTRL(am33xx_rng_hwmod
, AM33XX_CM_PER_RNG_CLKCTRL_OFFSET
);
1349 static void omap_hwmod_am33xx_rst(void)
1351 RSTCTRL(am33xx_pruss_hwmod
, AM33XX_RM_PER_RSTCTRL_OFFSET
);
1352 RSTCTRL(am33xx_gfx_hwmod
, AM33XX_RM_GFX_RSTCTRL_OFFSET
);
1353 RSTST(am33xx_gfx_hwmod
, AM33XX_RM_GFX_RSTST_OFFSET
);
1356 void omap_hwmod_am33xx_reg(void)
1358 omap_hwmod_am33xx_clkctrl();
1359 omap_hwmod_am33xx_rst();
1362 static void omap_hwmod_am43xx_clkctrl(void)
1364 CLKCTRL(am33xx_uart2_hwmod
, AM43XX_CM_PER_UART1_CLKCTRL_OFFSET
);
1365 CLKCTRL(am33xx_uart3_hwmod
, AM43XX_CM_PER_UART2_CLKCTRL_OFFSET
);
1366 CLKCTRL(am33xx_uart4_hwmod
, AM43XX_CM_PER_UART3_CLKCTRL_OFFSET
);
1367 CLKCTRL(am33xx_uart5_hwmod
, AM43XX_CM_PER_UART4_CLKCTRL_OFFSET
);
1368 CLKCTRL(am33xx_uart6_hwmod
, AM43XX_CM_PER_UART5_CLKCTRL_OFFSET
);
1369 CLKCTRL(am33xx_dcan0_hwmod
, AM43XX_CM_PER_DCAN0_CLKCTRL_OFFSET
);
1370 CLKCTRL(am33xx_dcan1_hwmod
, AM43XX_CM_PER_DCAN1_CLKCTRL_OFFSET
);
1371 CLKCTRL(am33xx_elm_hwmod
, AM43XX_CM_PER_ELM_CLKCTRL_OFFSET
);
1372 CLKCTRL(am33xx_epwmss0_hwmod
, AM43XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET
);
1373 CLKCTRL(am33xx_epwmss1_hwmod
, AM43XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET
);
1374 CLKCTRL(am33xx_epwmss2_hwmod
, AM43XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET
);
1375 CLKCTRL(am33xx_gpio1_hwmod
, AM43XX_CM_PER_GPIO1_CLKCTRL_OFFSET
);
1376 CLKCTRL(am33xx_gpio2_hwmod
, AM43XX_CM_PER_GPIO2_CLKCTRL_OFFSET
);
1377 CLKCTRL(am33xx_gpio3_hwmod
, AM43XX_CM_PER_GPIO3_CLKCTRL_OFFSET
);
1378 CLKCTRL(am33xx_i2c2_hwmod
, AM43XX_CM_PER_I2C1_CLKCTRL_OFFSET
);
1379 CLKCTRL(am33xx_i2c3_hwmod
, AM43XX_CM_PER_I2C2_CLKCTRL_OFFSET
);
1380 CLKCTRL(am33xx_mailbox_hwmod
, AM43XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET
);
1381 CLKCTRL(am33xx_mcasp0_hwmod
, AM43XX_CM_PER_MCASP0_CLKCTRL_OFFSET
);
1382 CLKCTRL(am33xx_mcasp1_hwmod
, AM43XX_CM_PER_MCASP1_CLKCTRL_OFFSET
);
1383 CLKCTRL(am33xx_mmc0_hwmod
, AM43XX_CM_PER_MMC0_CLKCTRL_OFFSET
);
1384 CLKCTRL(am33xx_mmc1_hwmod
, AM43XX_CM_PER_MMC1_CLKCTRL_OFFSET
);
1385 CLKCTRL(am33xx_spi0_hwmod
, AM43XX_CM_PER_SPI0_CLKCTRL_OFFSET
);
1386 CLKCTRL(am33xx_spi1_hwmod
, AM43XX_CM_PER_SPI1_CLKCTRL_OFFSET
);
1387 CLKCTRL(am33xx_spinlock_hwmod
, AM43XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET
);
1388 CLKCTRL(am33xx_timer2_hwmod
, AM43XX_CM_PER_TIMER2_CLKCTRL_OFFSET
);
1389 CLKCTRL(am33xx_timer3_hwmod
, AM43XX_CM_PER_TIMER3_CLKCTRL_OFFSET
);
1390 CLKCTRL(am33xx_timer4_hwmod
, AM43XX_CM_PER_TIMER4_CLKCTRL_OFFSET
);
1391 CLKCTRL(am33xx_timer5_hwmod
, AM43XX_CM_PER_TIMER5_CLKCTRL_OFFSET
);
1392 CLKCTRL(am33xx_timer6_hwmod
, AM43XX_CM_PER_TIMER6_CLKCTRL_OFFSET
);
1393 CLKCTRL(am33xx_timer7_hwmod
, AM43XX_CM_PER_TIMER7_CLKCTRL_OFFSET
);
1394 CLKCTRL(am33xx_smartreflex0_hwmod
,
1395 AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET
);
1396 CLKCTRL(am33xx_smartreflex1_hwmod
,
1397 AM43XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET
);
1398 CLKCTRL(am33xx_uart1_hwmod
, AM43XX_CM_WKUP_UART0_CLKCTRL_OFFSET
);
1399 CLKCTRL(am33xx_timer1_hwmod
, AM43XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET
);
1400 CLKCTRL(am33xx_i2c1_hwmod
, AM43XX_CM_WKUP_I2C0_CLKCTRL_OFFSET
);
1401 CLKCTRL(am33xx_wd_timer1_hwmod
, AM43XX_CM_WKUP_WDT1_CLKCTRL_OFFSET
);
1402 CLKCTRL(am33xx_rtc_hwmod
, AM43XX_CM_RTC_RTC_CLKCTRL_OFFSET
);
1403 CLKCTRL(am33xx_mmc2_hwmod
, AM43XX_CM_PER_MMC2_CLKCTRL_OFFSET
);
1404 CLKCTRL(am33xx_gpmc_hwmod
, AM43XX_CM_PER_GPMC_CLKCTRL_OFFSET
);
1405 CLKCTRL(am33xx_l4_ls_hwmod
, AM43XX_CM_PER_L4LS_CLKCTRL_OFFSET
);
1406 CLKCTRL(am33xx_l4_wkup_hwmod
, AM43XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET
);
1407 CLKCTRL(am33xx_l3_main_hwmod
, AM43XX_CM_PER_L3_CLKCTRL_OFFSET
);
1408 CLKCTRL(am33xx_tpcc_hwmod
, AM43XX_CM_PER_TPCC_CLKCTRL_OFFSET
);
1409 CLKCTRL(am33xx_tptc0_hwmod
, AM43XX_CM_PER_TPTC0_CLKCTRL_OFFSET
);
1410 CLKCTRL(am33xx_tptc1_hwmod
, AM43XX_CM_PER_TPTC1_CLKCTRL_OFFSET
);
1411 CLKCTRL(am33xx_tptc2_hwmod
, AM43XX_CM_PER_TPTC2_CLKCTRL_OFFSET
);
1412 CLKCTRL(am33xx_gfx_hwmod
, AM43XX_CM_GFX_GFX_CLKCTRL_OFFSET
);
1413 CLKCTRL(am33xx_cpgmac0_hwmod
, AM43XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET
);
1414 CLKCTRL(am33xx_pruss_hwmod
, AM43XX_CM_PER_PRUSS_CLKCTRL_OFFSET
);
1415 CLKCTRL(am33xx_mpu_hwmod
, AM43XX_CM_MPU_MPU_CLKCTRL_OFFSET
);
1416 CLKCTRL(am33xx_l3_instr_hwmod
, AM43XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET
);
1417 CLKCTRL(am33xx_ocmcram_hwmod
, AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET
);
1418 CLKCTRL(am33xx_sha0_hwmod
, AM43XX_CM_PER_SHA0_CLKCTRL_OFFSET
);
1419 CLKCTRL(am33xx_aes0_hwmod
, AM43XX_CM_PER_AES0_CLKCTRL_OFFSET
);
1420 CLKCTRL(am33xx_rng_hwmod
, AM43XX_CM_PER_RNG_CLKCTRL_OFFSET
);
1423 static void omap_hwmod_am43xx_rst(void)
1425 RSTCTRL(am33xx_pruss_hwmod
, AM43XX_RM_PER_RSTCTRL_OFFSET
);
1426 RSTCTRL(am33xx_gfx_hwmod
, AM43XX_RM_GFX_RSTCTRL_OFFSET
);
1427 RSTST(am33xx_pruss_hwmod
, AM43XX_RM_PER_RSTST_OFFSET
);
1428 RSTST(am33xx_gfx_hwmod
, AM43XX_RM_GFX_RSTST_OFFSET
);
1431 void omap_hwmod_am43xx_reg(void)
1433 omap_hwmod_am43xx_clkctrl();
1434 omap_hwmod_am43xx_rst();