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/spi-omap2-mcspi.h>
19 #include "omap_hwmod.h"
25 #include "omap_hwmod_33xx_43xx_common_data.h"
28 #define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl))
29 #define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl))
30 #define RSTST(oh, rstst) ((oh).prcm.omap4.rstst_offs = (rstst))
34 * instance(s): l3_main, l3_s, l3_instr
36 static struct omap_hwmod_class am33xx_l3_hwmod_class
= {
40 struct omap_hwmod am33xx_l3_main_hwmod
= {
42 .class = &am33xx_l3_hwmod_class
,
43 .clkdm_name
= "l3_clkdm",
44 .flags
= HWMOD_INIT_NO_IDLE
,
45 .main_clk
= "l3_gclk",
48 .modulemode
= MODULEMODE_SWCTRL
,
54 struct omap_hwmod am33xx_l3_s_hwmod
= {
56 .class = &am33xx_l3_hwmod_class
,
57 .clkdm_name
= "l3s_clkdm",
61 struct omap_hwmod am33xx_l3_instr_hwmod
= {
63 .class = &am33xx_l3_hwmod_class
,
64 .clkdm_name
= "l3_clkdm",
65 .flags
= HWMOD_INIT_NO_IDLE
,
66 .main_clk
= "l3_gclk",
69 .modulemode
= MODULEMODE_SWCTRL
,
76 * instance(s): l4_ls, l4_hs, l4_wkup, l4_fw
78 struct omap_hwmod_class am33xx_l4_hwmod_class
= {
83 struct omap_hwmod am33xx_l4_ls_hwmod
= {
85 .class = &am33xx_l4_hwmod_class
,
86 .clkdm_name
= "l4ls_clkdm",
87 .flags
= HWMOD_INIT_NO_IDLE
,
88 .main_clk
= "l4ls_gclk",
91 .modulemode
= MODULEMODE_SWCTRL
,
97 struct omap_hwmod am33xx_l4_wkup_hwmod
= {
99 .class = &am33xx_l4_hwmod_class
,
100 .clkdm_name
= "l4_wkup_clkdm",
101 .flags
= HWMOD_INIT_NO_IDLE
,
104 .modulemode
= MODULEMODE_SWCTRL
,
112 static struct omap_hwmod_class am33xx_mpu_hwmod_class
= {
116 struct omap_hwmod am33xx_mpu_hwmod
= {
118 .class = &am33xx_mpu_hwmod_class
,
119 .clkdm_name
= "mpu_clkdm",
120 .flags
= HWMOD_INIT_NO_IDLE
,
121 .main_clk
= "dpll_mpu_m2_ck",
124 .modulemode
= MODULEMODE_SWCTRL
,
131 * Wakeup controller sub-system under wakeup domain
133 struct omap_hwmod_class am33xx_wkup_m3_hwmod_class
= {
139 * Programmable Real-Time Unit and Industrial Communication Subsystem
141 static struct omap_hwmod_class am33xx_pruss_hwmod_class
= {
145 static struct omap_hwmod_rst_info am33xx_pruss_resets
[] = {
146 { .name
= "pruss", .rst_shift
= 1 },
150 /* Pseudo hwmod for reset control purpose only */
151 struct omap_hwmod am33xx_pruss_hwmod
= {
153 .class = &am33xx_pruss_hwmod_class
,
154 .clkdm_name
= "pruss_ocp_clkdm",
155 .main_clk
= "pruss_ocp_gclk",
158 .modulemode
= MODULEMODE_SWCTRL
,
161 .rst_lines
= am33xx_pruss_resets
,
162 .rst_lines_cnt
= ARRAY_SIZE(am33xx_pruss_resets
),
166 /* Pseudo hwmod for reset control purpose only */
167 static struct omap_hwmod_class am33xx_gfx_hwmod_class
= {
171 static struct omap_hwmod_rst_info am33xx_gfx_resets
[] = {
172 { .name
= "gfx", .rst_shift
= 0, .st_shift
= 0},
175 struct omap_hwmod am33xx_gfx_hwmod
= {
177 .class = &am33xx_gfx_hwmod_class
,
178 .clkdm_name
= "gfx_l3_clkdm",
179 .main_clk
= "gfx_fck_div_ck",
182 .modulemode
= MODULEMODE_SWCTRL
,
185 .rst_lines
= am33xx_gfx_resets
,
186 .rst_lines_cnt
= ARRAY_SIZE(am33xx_gfx_resets
),
191 * power and reset manager (whole prcm infrastructure)
193 static struct omap_hwmod_class am33xx_prcm_hwmod_class
= {
198 struct omap_hwmod am33xx_prcm_hwmod
= {
200 .class = &am33xx_prcm_hwmod_class
,
201 .clkdm_name
= "l4_wkup_clkdm",
207 static struct omap_hwmod_class_sysconfig am33xx_aes0_sysc
= {
211 .sysc_flags
= SYSS_HAS_RESET_STATUS
,
214 static struct omap_hwmod_class am33xx_aes0_hwmod_class
= {
216 .sysc
= &am33xx_aes0_sysc
,
219 struct omap_hwmod am33xx_aes0_hwmod
= {
221 .class = &am33xx_aes0_hwmod_class
,
222 .clkdm_name
= "l3_clkdm",
223 .main_clk
= "aes0_fck",
226 .modulemode
= MODULEMODE_SWCTRL
,
231 /* sha0 HIB2 (the 'P' (public) device) */
232 static struct omap_hwmod_class_sysconfig am33xx_sha0_sysc
= {
236 .sysc_flags
= SYSS_HAS_RESET_STATUS
,
239 static struct omap_hwmod_class am33xx_sha0_hwmod_class
= {
241 .sysc
= &am33xx_sha0_sysc
,
244 struct omap_hwmod am33xx_sha0_hwmod
= {
246 .class = &am33xx_sha0_hwmod_class
,
247 .clkdm_name
= "l3_clkdm",
248 .main_clk
= "l3_gclk",
251 .modulemode
= MODULEMODE_SWCTRL
,
257 static struct omap_hwmod_class am33xx_ocmcram_hwmod_class
= {
261 struct omap_hwmod am33xx_ocmcram_hwmod
= {
263 .class = &am33xx_ocmcram_hwmod_class
,
264 .clkdm_name
= "l3_clkdm",
265 .flags
= HWMOD_INIT_NO_IDLE
,
266 .main_clk
= "l3_gclk",
269 .modulemode
= MODULEMODE_SWCTRL
,
274 /* 'smartreflex' class */
275 static struct omap_hwmod_class am33xx_smartreflex_hwmod_class
= {
276 .name
= "smartreflex",
280 struct omap_hwmod am33xx_smartreflex0_hwmod
= {
281 .name
= "smartreflex0",
282 .class = &am33xx_smartreflex_hwmod_class
,
283 .clkdm_name
= "l4_wkup_clkdm",
284 .main_clk
= "smartreflex0_fck",
287 .modulemode
= MODULEMODE_SWCTRL
,
293 struct omap_hwmod am33xx_smartreflex1_hwmod
= {
294 .name
= "smartreflex1",
295 .class = &am33xx_smartreflex_hwmod_class
,
296 .clkdm_name
= "l4_wkup_clkdm",
297 .main_clk
= "smartreflex1_fck",
300 .modulemode
= MODULEMODE_SWCTRL
,
306 * 'control' module class
308 struct omap_hwmod_class am33xx_control_hwmod_class
= {
314 * cpsw/cpgmac sub system
316 static struct omap_hwmod_class_sysconfig am33xx_cpgmac_sysc
= {
320 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
|
321 SYSS_HAS_RESET_STATUS
),
322 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| MSTANDBY_FORCE
|
324 .sysc_fields
= &omap_hwmod_sysc_type3
,
327 static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class
= {
329 .sysc
= &am33xx_cpgmac_sysc
,
332 struct omap_hwmod am33xx_cpgmac0_hwmod
= {
334 .class = &am33xx_cpgmac0_hwmod_class
,
335 .clkdm_name
= "cpsw_125mhz_clkdm",
336 .flags
= (HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
),
337 .main_clk
= "cpsw_125mhz_gclk",
341 .modulemode
= MODULEMODE_SWCTRL
,
349 static struct omap_hwmod_class am33xx_mdio_hwmod_class
= {
350 .name
= "davinci_mdio",
353 struct omap_hwmod am33xx_mdio_hwmod
= {
354 .name
= "davinci_mdio",
355 .class = &am33xx_mdio_hwmod_class
,
356 .clkdm_name
= "cpsw_125mhz_clkdm",
357 .main_clk
= "cpsw_125mhz_gclk",
363 static struct omap_hwmod_class am33xx_dcan_hwmod_class
= {
368 struct omap_hwmod am33xx_dcan0_hwmod
= {
370 .class = &am33xx_dcan_hwmod_class
,
371 .clkdm_name
= "l4ls_clkdm",
372 .main_clk
= "dcan0_fck",
375 .modulemode
= MODULEMODE_SWCTRL
,
381 struct omap_hwmod am33xx_dcan1_hwmod
= {
383 .class = &am33xx_dcan_hwmod_class
,
384 .clkdm_name
= "l4ls_clkdm",
385 .main_clk
= "dcan1_fck",
388 .modulemode
= MODULEMODE_SWCTRL
,
394 static struct omap_hwmod_class_sysconfig am33xx_elm_sysc
= {
398 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
399 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
400 SYSS_HAS_RESET_STATUS
),
401 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
402 .sysc_fields
= &omap_hwmod_sysc_type1
,
405 static struct omap_hwmod_class am33xx_elm_hwmod_class
= {
407 .sysc
= &am33xx_elm_sysc
,
410 struct omap_hwmod am33xx_elm_hwmod
= {
412 .class = &am33xx_elm_hwmod_class
,
413 .clkdm_name
= "l4ls_clkdm",
414 .main_clk
= "l4ls_gclk",
417 .modulemode
= MODULEMODE_SWCTRL
,
423 static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc
= {
426 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
),
427 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
428 SIDLE_SMART_WKUP
| MSTANDBY_FORCE
| MSTANDBY_NO
|
429 MSTANDBY_SMART
| MSTANDBY_SMART_WKUP
),
430 .sysc_fields
= &omap_hwmod_sysc_type2
,
433 struct omap_hwmod_class am33xx_epwmss_hwmod_class
= {
435 .sysc
= &am33xx_epwmss_sysc
,
438 static struct omap_hwmod_class am33xx_ecap_hwmod_class
= {
442 static struct omap_hwmod_class am33xx_eqep_hwmod_class
= {
446 struct omap_hwmod_class am33xx_ehrpwm_hwmod_class
= {
451 struct omap_hwmod am33xx_epwmss0_hwmod
= {
453 .class = &am33xx_epwmss_hwmod_class
,
454 .clkdm_name
= "l4ls_clkdm",
455 .main_clk
= "l4ls_gclk",
458 .modulemode
= MODULEMODE_SWCTRL
,
464 struct omap_hwmod am33xx_ecap0_hwmod
= {
466 .class = &am33xx_ecap_hwmod_class
,
467 .clkdm_name
= "l4ls_clkdm",
468 .main_clk
= "l4ls_gclk",
472 struct omap_hwmod am33xx_eqep0_hwmod
= {
474 .class = &am33xx_eqep_hwmod_class
,
475 .clkdm_name
= "l4ls_clkdm",
476 .main_clk
= "l4ls_gclk",
480 struct omap_hwmod am33xx_ehrpwm0_hwmod
= {
482 .class = &am33xx_ehrpwm_hwmod_class
,
483 .clkdm_name
= "l4ls_clkdm",
484 .main_clk
= "l4ls_gclk",
488 struct omap_hwmod am33xx_epwmss1_hwmod
= {
490 .class = &am33xx_epwmss_hwmod_class
,
491 .clkdm_name
= "l4ls_clkdm",
492 .main_clk
= "l4ls_gclk",
495 .modulemode
= MODULEMODE_SWCTRL
,
501 struct omap_hwmod am33xx_ecap1_hwmod
= {
503 .class = &am33xx_ecap_hwmod_class
,
504 .clkdm_name
= "l4ls_clkdm",
505 .main_clk
= "l4ls_gclk",
509 struct omap_hwmod am33xx_eqep1_hwmod
= {
511 .class = &am33xx_eqep_hwmod_class
,
512 .clkdm_name
= "l4ls_clkdm",
513 .main_clk
= "l4ls_gclk",
517 struct omap_hwmod am33xx_ehrpwm1_hwmod
= {
519 .class = &am33xx_ehrpwm_hwmod_class
,
520 .clkdm_name
= "l4ls_clkdm",
521 .main_clk
= "l4ls_gclk",
525 struct omap_hwmod am33xx_epwmss2_hwmod
= {
527 .class = &am33xx_epwmss_hwmod_class
,
528 .clkdm_name
= "l4ls_clkdm",
529 .main_clk
= "l4ls_gclk",
532 .modulemode
= MODULEMODE_SWCTRL
,
538 struct omap_hwmod am33xx_ecap2_hwmod
= {
540 .class = &am33xx_ecap_hwmod_class
,
541 .clkdm_name
= "l4ls_clkdm",
542 .main_clk
= "l4ls_gclk",
546 struct omap_hwmod am33xx_eqep2_hwmod
= {
548 .class = &am33xx_eqep_hwmod_class
,
549 .clkdm_name
= "l4ls_clkdm",
550 .main_clk
= "l4ls_gclk",
554 struct omap_hwmod am33xx_ehrpwm2_hwmod
= {
556 .class = &am33xx_ehrpwm_hwmod_class
,
557 .clkdm_name
= "l4ls_clkdm",
558 .main_clk
= "l4ls_gclk",
562 * 'gpio' class: for gpio 0,1,2,3
564 static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc
= {
568 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_ENAWAKEUP
|
569 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
570 SYSS_HAS_RESET_STATUS
),
571 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
573 .sysc_fields
= &omap_hwmod_sysc_type1
,
576 struct omap_hwmod_class am33xx_gpio_hwmod_class
= {
578 .sysc
= &am33xx_gpio_sysc
,
582 struct omap_gpio_dev_attr gpio_dev_attr
= {
588 static struct omap_hwmod_opt_clk gpio1_opt_clks
[] = {
589 { .role
= "dbclk", .clk
= "gpio1_dbclk" },
592 struct omap_hwmod am33xx_gpio1_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
= gpio1_opt_clks
,
604 .opt_clks_cnt
= ARRAY_SIZE(gpio1_opt_clks
),
605 .dev_attr
= &gpio_dev_attr
,
609 static struct omap_hwmod_opt_clk gpio2_opt_clks
[] = {
610 { .role
= "dbclk", .clk
= "gpio2_dbclk" },
613 struct omap_hwmod am33xx_gpio2_hwmod
= {
615 .class = &am33xx_gpio_hwmod_class
,
616 .clkdm_name
= "l4ls_clkdm",
617 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
618 .main_clk
= "l4ls_gclk",
621 .modulemode
= MODULEMODE_SWCTRL
,
624 .opt_clks
= gpio2_opt_clks
,
625 .opt_clks_cnt
= ARRAY_SIZE(gpio2_opt_clks
),
626 .dev_attr
= &gpio_dev_attr
,
630 static struct omap_hwmod_opt_clk gpio3_opt_clks
[] = {
631 { .role
= "dbclk", .clk
= "gpio3_dbclk" },
634 struct omap_hwmod am33xx_gpio3_hwmod
= {
636 .class = &am33xx_gpio_hwmod_class
,
637 .clkdm_name
= "l4ls_clkdm",
638 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
639 .main_clk
= "l4ls_gclk",
642 .modulemode
= MODULEMODE_SWCTRL
,
645 .opt_clks
= gpio3_opt_clks
,
646 .opt_clks_cnt
= ARRAY_SIZE(gpio3_opt_clks
),
647 .dev_attr
= &gpio_dev_attr
,
651 static struct omap_hwmod_class_sysconfig gpmc_sysc
= {
655 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_SIDLEMODE
|
656 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
657 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
658 .sysc_fields
= &omap_hwmod_sysc_type1
,
661 static struct omap_hwmod_class am33xx_gpmc_hwmod_class
= {
666 struct omap_hwmod am33xx_gpmc_hwmod
= {
668 .class = &am33xx_gpmc_hwmod_class
,
669 .clkdm_name
= "l3s_clkdm",
670 .flags
= (HWMOD_INIT_NO_IDLE
| HWMOD_INIT_NO_RESET
),
671 .main_clk
= "l3s_gclk",
674 .modulemode
= MODULEMODE_SWCTRL
,
680 static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc
= {
683 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
684 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
|
685 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
686 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
688 .sysc_fields
= &omap_hwmod_sysc_type1
,
691 static struct omap_hwmod_class i2c_class
= {
693 .sysc
= &am33xx_i2c_sysc
,
694 .rev
= OMAP_I2C_IP_VERSION_2
,
695 .reset
= &omap_i2c_reset
,
698 static struct omap_i2c_dev_attr i2c_dev_attr
= {
699 .flags
= OMAP_I2C_FLAG_BUS_SHIFT_NONE
,
703 struct omap_hwmod am33xx_i2c1_hwmod
= {
706 .clkdm_name
= "l4_wkup_clkdm",
707 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
708 .main_clk
= "dpll_per_m2_div4_wkupdm_ck",
711 .modulemode
= MODULEMODE_SWCTRL
,
714 .dev_attr
= &i2c_dev_attr
,
718 struct omap_hwmod am33xx_i2c2_hwmod
= {
721 .clkdm_name
= "l4ls_clkdm",
722 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
723 .main_clk
= "dpll_per_m2_div4_ck",
726 .modulemode
= MODULEMODE_SWCTRL
,
729 .dev_attr
= &i2c_dev_attr
,
733 struct omap_hwmod am33xx_i2c3_hwmod
= {
736 .clkdm_name
= "l4ls_clkdm",
737 .flags
= HWMOD_16BIT_REG
| HWMOD_SET_DEFAULT_CLOCKACT
,
738 .main_clk
= "dpll_per_m2_div4_ck",
741 .modulemode
= MODULEMODE_SWCTRL
,
744 .dev_attr
= &i2c_dev_attr
,
749 * mailbox module allowing communication between the on-chip processors using a
750 * queued mailbox-interrupt mechanism.
752 static struct omap_hwmod_class_sysconfig am33xx_mailbox_sysc
= {
755 .sysc_flags
= (SYSC_HAS_RESET_STATUS
| SYSC_HAS_SIDLEMODE
|
757 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
758 .sysc_fields
= &omap_hwmod_sysc_type2
,
761 static struct omap_hwmod_class am33xx_mailbox_hwmod_class
= {
763 .sysc
= &am33xx_mailbox_sysc
,
766 struct omap_hwmod am33xx_mailbox_hwmod
= {
768 .class = &am33xx_mailbox_hwmod_class
,
769 .clkdm_name
= "l4ls_clkdm",
770 .main_clk
= "l4ls_gclk",
773 .modulemode
= MODULEMODE_SWCTRL
,
781 static struct omap_hwmod_class_sysconfig am33xx_mcasp_sysc
= {
784 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
785 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
786 .sysc_fields
= &omap_hwmod_sysc_type3
,
789 static struct omap_hwmod_class am33xx_mcasp_hwmod_class
= {
791 .sysc
= &am33xx_mcasp_sysc
,
795 struct omap_hwmod am33xx_mcasp0_hwmod
= {
797 .class = &am33xx_mcasp_hwmod_class
,
798 .clkdm_name
= "l3s_clkdm",
799 .main_clk
= "mcasp0_fck",
802 .modulemode
= MODULEMODE_SWCTRL
,
808 struct omap_hwmod am33xx_mcasp1_hwmod
= {
810 .class = &am33xx_mcasp_hwmod_class
,
811 .clkdm_name
= "l3s_clkdm",
812 .main_clk
= "mcasp1_fck",
815 .modulemode
= MODULEMODE_SWCTRL
,
821 static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc
= {
825 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
826 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
827 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
),
828 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
829 .sysc_fields
= &omap_hwmod_sysc_type1
,
832 static struct omap_hwmod_class am33xx_mmc_hwmod_class
= {
834 .sysc
= &am33xx_mmc_sysc
,
838 static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr
= {
839 .flags
= OMAP_HSMMC_SUPPORTS_DUAL_VOLT
,
842 struct omap_hwmod am33xx_mmc0_hwmod
= {
844 .class = &am33xx_mmc_hwmod_class
,
845 .clkdm_name
= "l4ls_clkdm",
846 .main_clk
= "mmc_clk",
849 .modulemode
= MODULEMODE_SWCTRL
,
852 .dev_attr
= &am33xx_mmc0_dev_attr
,
856 static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr
= {
857 .flags
= OMAP_HSMMC_SUPPORTS_DUAL_VOLT
,
860 struct omap_hwmod am33xx_mmc1_hwmod
= {
862 .class = &am33xx_mmc_hwmod_class
,
863 .clkdm_name
= "l4ls_clkdm",
864 .main_clk
= "mmc_clk",
867 .modulemode
= MODULEMODE_SWCTRL
,
870 .dev_attr
= &am33xx_mmc1_dev_attr
,
874 static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr
= {
875 .flags
= OMAP_HSMMC_SUPPORTS_DUAL_VOLT
,
877 struct omap_hwmod am33xx_mmc2_hwmod
= {
879 .class = &am33xx_mmc_hwmod_class
,
880 .clkdm_name
= "l3s_clkdm",
881 .main_clk
= "mmc_clk",
884 .modulemode
= MODULEMODE_SWCTRL
,
887 .dev_attr
= &am33xx_mmc2_dev_attr
,
894 static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc
= {
897 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
898 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
|
899 SIDLE_SMART
| SIDLE_SMART_WKUP
),
900 .sysc_fields
= &omap_hwmod_sysc_type3
,
903 static struct omap_hwmod_class am33xx_rtc_hwmod_class
= {
905 .sysc
= &am33xx_rtc_sysc
,
908 struct omap_hwmod am33xx_rtc_hwmod
= {
910 .class = &am33xx_rtc_hwmod_class
,
911 .clkdm_name
= "l4_rtc_clkdm",
912 .main_clk
= "clk_32768_ck",
915 .modulemode
= MODULEMODE_SWCTRL
,
921 static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc
= {
925 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
926 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
927 SYSS_HAS_RESET_STATUS
),
928 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
929 .sysc_fields
= &omap_hwmod_sysc_type1
,
932 struct omap_hwmod_class am33xx_spi_hwmod_class
= {
934 .sysc
= &am33xx_mcspi_sysc
,
935 .rev
= OMAP4_MCSPI_REV
,
939 struct omap2_mcspi_dev_attr mcspi_attrib
= {
942 struct omap_hwmod am33xx_spi0_hwmod
= {
944 .class = &am33xx_spi_hwmod_class
,
945 .clkdm_name
= "l4ls_clkdm",
946 .main_clk
= "dpll_per_m2_div4_ck",
949 .modulemode
= MODULEMODE_SWCTRL
,
952 .dev_attr
= &mcspi_attrib
,
956 struct omap_hwmod am33xx_spi1_hwmod
= {
958 .class = &am33xx_spi_hwmod_class
,
959 .clkdm_name
= "l4ls_clkdm",
960 .main_clk
= "dpll_per_m2_div4_ck",
963 .modulemode
= MODULEMODE_SWCTRL
,
966 .dev_attr
= &mcspi_attrib
,
971 * spinlock provides hardware assistance for synchronizing the
972 * processes running on multiple processors
975 static struct omap_hwmod_class_sysconfig am33xx_spinlock_sysc
= {
979 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
980 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
|
981 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
982 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
983 .sysc_fields
= &omap_hwmod_sysc_type1
,
986 static struct omap_hwmod_class am33xx_spinlock_hwmod_class
= {
988 .sysc
= &am33xx_spinlock_sysc
,
991 struct omap_hwmod am33xx_spinlock_hwmod
= {
993 .class = &am33xx_spinlock_hwmod_class
,
994 .clkdm_name
= "l4ls_clkdm",
995 .main_clk
= "l4ls_gclk",
998 .modulemode
= MODULEMODE_SWCTRL
,
1003 /* 'timer 2-7' class */
1004 static struct omap_hwmod_class_sysconfig am33xx_timer_sysc
= {
1006 .sysc_offs
= 0x0010,
1007 .syss_offs
= 0x0014,
1008 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
),
1009 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1011 .sysc_fields
= &omap_hwmod_sysc_type2
,
1014 struct omap_hwmod_class am33xx_timer_hwmod_class
= {
1016 .sysc
= &am33xx_timer_sysc
,
1020 static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc
= {
1022 .sysc_offs
= 0x0010,
1023 .syss_offs
= 0x0014,
1024 .sysc_flags
= (SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1025 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
1026 SYSS_HAS_RESET_STATUS
),
1027 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1028 .sysc_fields
= &omap_hwmod_sysc_type1
,
1031 static struct omap_hwmod_class am33xx_timer1ms_hwmod_class
= {
1033 .sysc
= &am33xx_timer1ms_sysc
,
1036 struct omap_hwmod am33xx_timer1_hwmod
= {
1038 .class = &am33xx_timer1ms_hwmod_class
,
1039 .clkdm_name
= "l4_wkup_clkdm",
1040 .main_clk
= "timer1_fck",
1043 .modulemode
= MODULEMODE_SWCTRL
,
1048 struct omap_hwmod am33xx_timer2_hwmod
= {
1050 .class = &am33xx_timer_hwmod_class
,
1051 .clkdm_name
= "l4ls_clkdm",
1052 .main_clk
= "timer2_fck",
1055 .modulemode
= MODULEMODE_SWCTRL
,
1060 struct omap_hwmod am33xx_timer3_hwmod
= {
1062 .class = &am33xx_timer_hwmod_class
,
1063 .clkdm_name
= "l4ls_clkdm",
1064 .main_clk
= "timer3_fck",
1067 .modulemode
= MODULEMODE_SWCTRL
,
1072 struct omap_hwmod am33xx_timer4_hwmod
= {
1074 .class = &am33xx_timer_hwmod_class
,
1075 .clkdm_name
= "l4ls_clkdm",
1076 .main_clk
= "timer4_fck",
1079 .modulemode
= MODULEMODE_SWCTRL
,
1084 struct omap_hwmod am33xx_timer5_hwmod
= {
1086 .class = &am33xx_timer_hwmod_class
,
1087 .clkdm_name
= "l4ls_clkdm",
1088 .main_clk
= "timer5_fck",
1091 .modulemode
= MODULEMODE_SWCTRL
,
1096 struct omap_hwmod am33xx_timer6_hwmod
= {
1098 .class = &am33xx_timer_hwmod_class
,
1099 .clkdm_name
= "l4ls_clkdm",
1100 .main_clk
= "timer6_fck",
1103 .modulemode
= MODULEMODE_SWCTRL
,
1108 struct omap_hwmod am33xx_timer7_hwmod
= {
1110 .class = &am33xx_timer_hwmod_class
,
1111 .clkdm_name
= "l4ls_clkdm",
1112 .main_clk
= "timer7_fck",
1115 .modulemode
= MODULEMODE_SWCTRL
,
1121 static struct omap_hwmod_class am33xx_tpcc_hwmod_class
= {
1125 struct omap_hwmod am33xx_tpcc_hwmod
= {
1127 .class = &am33xx_tpcc_hwmod_class
,
1128 .clkdm_name
= "l3_clkdm",
1129 .main_clk
= "l3_gclk",
1132 .modulemode
= MODULEMODE_SWCTRL
,
1137 static struct omap_hwmod_class_sysconfig am33xx_tptc_sysc
= {
1140 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
1141 SYSC_HAS_MIDLEMODE
),
1142 .idlemodes
= (SIDLE_FORCE
| SIDLE_SMART
| MSTANDBY_FORCE
),
1143 .sysc_fields
= &omap_hwmod_sysc_type2
,
1147 static struct omap_hwmod_class am33xx_tptc_hwmod_class
= {
1149 .sysc
= &am33xx_tptc_sysc
,
1153 struct omap_hwmod am33xx_tptc0_hwmod
= {
1155 .class = &am33xx_tptc_hwmod_class
,
1156 .clkdm_name
= "l3_clkdm",
1157 .flags
= HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
,
1158 .main_clk
= "l3_gclk",
1161 .modulemode
= MODULEMODE_SWCTRL
,
1167 struct omap_hwmod am33xx_tptc1_hwmod
= {
1169 .class = &am33xx_tptc_hwmod_class
,
1170 .clkdm_name
= "l3_clkdm",
1171 .flags
= (HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
),
1172 .main_clk
= "l3_gclk",
1175 .modulemode
= MODULEMODE_SWCTRL
,
1181 struct omap_hwmod am33xx_tptc2_hwmod
= {
1183 .class = &am33xx_tptc_hwmod_class
,
1184 .clkdm_name
= "l3_clkdm",
1185 .flags
= (HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
),
1186 .main_clk
= "l3_gclk",
1189 .modulemode
= MODULEMODE_SWCTRL
,
1195 static struct omap_hwmod_class_sysconfig uart_sysc
= {
1199 .sysc_flags
= (SYSC_HAS_SIDLEMODE
| SYSC_HAS_ENAWAKEUP
|
1200 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
),
1201 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1203 .sysc_fields
= &omap_hwmod_sysc_type1
,
1206 static struct omap_hwmod_class uart_class
= {
1211 struct omap_hwmod am33xx_uart1_hwmod
= {
1213 .class = &uart_class
,
1214 .clkdm_name
= "l4_wkup_clkdm",
1215 .flags
= DEBUG_AM33XXUART1_FLAGS
| HWMOD_SWSUP_SIDLE_ACT
,
1216 .main_clk
= "dpll_per_m2_div4_wkupdm_ck",
1219 .modulemode
= MODULEMODE_SWCTRL
,
1224 struct omap_hwmod am33xx_uart2_hwmod
= {
1226 .class = &uart_class
,
1227 .clkdm_name
= "l4ls_clkdm",
1228 .flags
= HWMOD_SWSUP_SIDLE_ACT
,
1229 .main_clk
= "dpll_per_m2_div4_ck",
1232 .modulemode
= MODULEMODE_SWCTRL
,
1238 struct omap_hwmod am33xx_uart3_hwmod
= {
1240 .class = &uart_class
,
1241 .clkdm_name
= "l4ls_clkdm",
1242 .flags
= HWMOD_SWSUP_SIDLE_ACT
,
1243 .main_clk
= "dpll_per_m2_div4_ck",
1246 .modulemode
= MODULEMODE_SWCTRL
,
1251 struct omap_hwmod am33xx_uart4_hwmod
= {
1253 .class = &uart_class
,
1254 .clkdm_name
= "l4ls_clkdm",
1255 .flags
= HWMOD_SWSUP_SIDLE_ACT
,
1256 .main_clk
= "dpll_per_m2_div4_ck",
1259 .modulemode
= MODULEMODE_SWCTRL
,
1264 struct omap_hwmod am33xx_uart5_hwmod
= {
1266 .class = &uart_class
,
1267 .clkdm_name
= "l4ls_clkdm",
1268 .flags
= HWMOD_SWSUP_SIDLE_ACT
,
1269 .main_clk
= "dpll_per_m2_div4_ck",
1272 .modulemode
= MODULEMODE_SWCTRL
,
1277 struct omap_hwmod am33xx_uart6_hwmod
= {
1279 .class = &uart_class
,
1280 .clkdm_name
= "l4ls_clkdm",
1281 .flags
= HWMOD_SWSUP_SIDLE_ACT
,
1282 .main_clk
= "dpll_per_m2_div4_ck",
1285 .modulemode
= MODULEMODE_SWCTRL
,
1290 /* 'wd_timer' class */
1291 static struct omap_hwmod_class_sysconfig wdt_sysc
= {
1295 .sysc_flags
= (SYSC_HAS_EMUFREE
| SYSC_HAS_SIDLEMODE
|
1296 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
1297 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1299 .sysc_fields
= &omap_hwmod_sysc_type1
,
1302 static struct omap_hwmod_class am33xx_wd_timer_hwmod_class
= {
1305 .pre_shutdown
= &omap2_wd_timer_disable
,
1309 * XXX: device.c file uses hardcoded name for watchdog timer
1310 * driver "wd_timer2, so we are also using same name as of now...
1312 struct omap_hwmod am33xx_wd_timer1_hwmod
= {
1313 .name
= "wd_timer2",
1314 .class = &am33xx_wd_timer_hwmod_class
,
1315 .clkdm_name
= "l4_wkup_clkdm",
1316 .flags
= HWMOD_SWSUP_SIDLE
,
1317 .main_clk
= "wdt1_fck",
1320 .modulemode
= MODULEMODE_SWCTRL
,
1325 static void omap_hwmod_am33xx_clkctrl(void)
1327 CLKCTRL(am33xx_uart2_hwmod
, AM33XX_CM_PER_UART1_CLKCTRL_OFFSET
);
1328 CLKCTRL(am33xx_uart3_hwmod
, AM33XX_CM_PER_UART2_CLKCTRL_OFFSET
);
1329 CLKCTRL(am33xx_uart4_hwmod
, AM33XX_CM_PER_UART3_CLKCTRL_OFFSET
);
1330 CLKCTRL(am33xx_uart5_hwmod
, AM33XX_CM_PER_UART4_CLKCTRL_OFFSET
);
1331 CLKCTRL(am33xx_uart6_hwmod
, AM33XX_CM_PER_UART5_CLKCTRL_OFFSET
);
1332 CLKCTRL(am33xx_dcan0_hwmod
, AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET
);
1333 CLKCTRL(am33xx_dcan1_hwmod
, AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET
);
1334 CLKCTRL(am33xx_elm_hwmod
, AM33XX_CM_PER_ELM_CLKCTRL_OFFSET
);
1335 CLKCTRL(am33xx_epwmss0_hwmod
, AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET
);
1336 CLKCTRL(am33xx_epwmss1_hwmod
, AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET
);
1337 CLKCTRL(am33xx_epwmss2_hwmod
, AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET
);
1338 CLKCTRL(am33xx_gpio1_hwmod
, AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET
);
1339 CLKCTRL(am33xx_gpio2_hwmod
, AM33XX_CM_PER_GPIO2_CLKCTRL_OFFSET
);
1340 CLKCTRL(am33xx_gpio3_hwmod
, AM33XX_CM_PER_GPIO3_CLKCTRL_OFFSET
);
1341 CLKCTRL(am33xx_i2c2_hwmod
, AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET
);
1342 CLKCTRL(am33xx_i2c3_hwmod
, AM33XX_CM_PER_I2C2_CLKCTRL_OFFSET
);
1343 CLKCTRL(am33xx_mailbox_hwmod
, AM33XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET
);
1344 CLKCTRL(am33xx_mcasp0_hwmod
, AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET
);
1345 CLKCTRL(am33xx_mcasp1_hwmod
, AM33XX_CM_PER_MCASP1_CLKCTRL_OFFSET
);
1346 CLKCTRL(am33xx_mmc0_hwmod
, AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET
);
1347 CLKCTRL(am33xx_mmc1_hwmod
, AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET
);
1348 CLKCTRL(am33xx_spi0_hwmod
, AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET
);
1349 CLKCTRL(am33xx_spi1_hwmod
, AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET
);
1350 CLKCTRL(am33xx_spinlock_hwmod
, AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET
);
1351 CLKCTRL(am33xx_timer2_hwmod
, AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET
);
1352 CLKCTRL(am33xx_timer3_hwmod
, AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET
);
1353 CLKCTRL(am33xx_timer4_hwmod
, AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET
);
1354 CLKCTRL(am33xx_timer5_hwmod
, AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET
);
1355 CLKCTRL(am33xx_timer6_hwmod
, AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET
);
1356 CLKCTRL(am33xx_timer7_hwmod
, AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET
);
1357 CLKCTRL(am33xx_smartreflex0_hwmod
,
1358 AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET
);
1359 CLKCTRL(am33xx_smartreflex1_hwmod
,
1360 AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET
);
1361 CLKCTRL(am33xx_uart1_hwmod
, AM33XX_CM_WKUP_UART0_CLKCTRL_OFFSET
);
1362 CLKCTRL(am33xx_timer1_hwmod
, AM33XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET
);
1363 CLKCTRL(am33xx_i2c1_hwmod
, AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET
);
1364 CLKCTRL(am33xx_wd_timer1_hwmod
, AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET
);
1365 CLKCTRL(am33xx_rtc_hwmod
, AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET
);
1366 CLKCTRL(am33xx_mmc2_hwmod
, AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET
);
1367 CLKCTRL(am33xx_gpmc_hwmod
, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET
);
1368 CLKCTRL(am33xx_l4_ls_hwmod
, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET
);
1369 CLKCTRL(am33xx_l4_wkup_hwmod
, AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET
);
1370 CLKCTRL(am33xx_l3_main_hwmod
, AM33XX_CM_PER_L3_CLKCTRL_OFFSET
);
1371 CLKCTRL(am33xx_tpcc_hwmod
, AM33XX_CM_PER_TPCC_CLKCTRL_OFFSET
);
1372 CLKCTRL(am33xx_tptc0_hwmod
, AM33XX_CM_PER_TPTC0_CLKCTRL_OFFSET
);
1373 CLKCTRL(am33xx_tptc1_hwmod
, AM33XX_CM_PER_TPTC1_CLKCTRL_OFFSET
);
1374 CLKCTRL(am33xx_tptc2_hwmod
, AM33XX_CM_PER_TPTC2_CLKCTRL_OFFSET
);
1375 CLKCTRL(am33xx_gfx_hwmod
, AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET
);
1376 CLKCTRL(am33xx_cpgmac0_hwmod
, AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET
);
1377 CLKCTRL(am33xx_pruss_hwmod
, AM33XX_CM_PER_PRUSS_CLKCTRL_OFFSET
);
1378 CLKCTRL(am33xx_mpu_hwmod
, AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET
);
1379 CLKCTRL(am33xx_l3_instr_hwmod
, AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET
);
1380 CLKCTRL(am33xx_ocmcram_hwmod
, AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET
);
1381 CLKCTRL(am33xx_sha0_hwmod
, AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET
);
1382 CLKCTRL(am33xx_aes0_hwmod
, AM33XX_CM_PER_AES0_CLKCTRL_OFFSET
);
1385 static void omap_hwmod_am33xx_rst(void)
1387 RSTCTRL(am33xx_pruss_hwmod
, AM33XX_RM_PER_RSTCTRL_OFFSET
);
1388 RSTCTRL(am33xx_gfx_hwmod
, AM33XX_RM_GFX_RSTCTRL_OFFSET
);
1389 RSTST(am33xx_gfx_hwmod
, AM33XX_RM_GFX_RSTST_OFFSET
);
1392 void omap_hwmod_am33xx_reg(void)
1394 omap_hwmod_am33xx_clkctrl();
1395 omap_hwmod_am33xx_rst();
1398 static void omap_hwmod_am43xx_clkctrl(void)
1400 CLKCTRL(am33xx_uart2_hwmod
, AM43XX_CM_PER_UART1_CLKCTRL_OFFSET
);
1401 CLKCTRL(am33xx_uart3_hwmod
, AM43XX_CM_PER_UART2_CLKCTRL_OFFSET
);
1402 CLKCTRL(am33xx_uart4_hwmod
, AM43XX_CM_PER_UART3_CLKCTRL_OFFSET
);
1403 CLKCTRL(am33xx_uart5_hwmod
, AM43XX_CM_PER_UART4_CLKCTRL_OFFSET
);
1404 CLKCTRL(am33xx_uart6_hwmod
, AM43XX_CM_PER_UART5_CLKCTRL_OFFSET
);
1405 CLKCTRL(am33xx_dcan0_hwmod
, AM43XX_CM_PER_DCAN0_CLKCTRL_OFFSET
);
1406 CLKCTRL(am33xx_dcan1_hwmod
, AM43XX_CM_PER_DCAN1_CLKCTRL_OFFSET
);
1407 CLKCTRL(am33xx_elm_hwmod
, AM43XX_CM_PER_ELM_CLKCTRL_OFFSET
);
1408 CLKCTRL(am33xx_epwmss0_hwmod
, AM43XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET
);
1409 CLKCTRL(am33xx_epwmss1_hwmod
, AM43XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET
);
1410 CLKCTRL(am33xx_epwmss2_hwmod
, AM43XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET
);
1411 CLKCTRL(am33xx_gpio1_hwmod
, AM43XX_CM_PER_GPIO1_CLKCTRL_OFFSET
);
1412 CLKCTRL(am33xx_gpio2_hwmod
, AM43XX_CM_PER_GPIO2_CLKCTRL_OFFSET
);
1413 CLKCTRL(am33xx_gpio3_hwmod
, AM43XX_CM_PER_GPIO3_CLKCTRL_OFFSET
);
1414 CLKCTRL(am33xx_i2c2_hwmod
, AM43XX_CM_PER_I2C1_CLKCTRL_OFFSET
);
1415 CLKCTRL(am33xx_i2c3_hwmod
, AM43XX_CM_PER_I2C2_CLKCTRL_OFFSET
);
1416 CLKCTRL(am33xx_mailbox_hwmod
, AM43XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET
);
1417 CLKCTRL(am33xx_mcasp0_hwmod
, AM43XX_CM_PER_MCASP0_CLKCTRL_OFFSET
);
1418 CLKCTRL(am33xx_mcasp1_hwmod
, AM43XX_CM_PER_MCASP1_CLKCTRL_OFFSET
);
1419 CLKCTRL(am33xx_mmc0_hwmod
, AM43XX_CM_PER_MMC0_CLKCTRL_OFFSET
);
1420 CLKCTRL(am33xx_mmc1_hwmod
, AM43XX_CM_PER_MMC1_CLKCTRL_OFFSET
);
1421 CLKCTRL(am33xx_spi0_hwmod
, AM43XX_CM_PER_SPI0_CLKCTRL_OFFSET
);
1422 CLKCTRL(am33xx_spi1_hwmod
, AM43XX_CM_PER_SPI1_CLKCTRL_OFFSET
);
1423 CLKCTRL(am33xx_spinlock_hwmod
, AM43XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET
);
1424 CLKCTRL(am33xx_timer2_hwmod
, AM43XX_CM_PER_TIMER2_CLKCTRL_OFFSET
);
1425 CLKCTRL(am33xx_timer3_hwmod
, AM43XX_CM_PER_TIMER3_CLKCTRL_OFFSET
);
1426 CLKCTRL(am33xx_timer4_hwmod
, AM43XX_CM_PER_TIMER4_CLKCTRL_OFFSET
);
1427 CLKCTRL(am33xx_timer5_hwmod
, AM43XX_CM_PER_TIMER5_CLKCTRL_OFFSET
);
1428 CLKCTRL(am33xx_timer6_hwmod
, AM43XX_CM_PER_TIMER6_CLKCTRL_OFFSET
);
1429 CLKCTRL(am33xx_timer7_hwmod
, AM43XX_CM_PER_TIMER7_CLKCTRL_OFFSET
);
1430 CLKCTRL(am33xx_smartreflex0_hwmod
,
1431 AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET
);
1432 CLKCTRL(am33xx_smartreflex1_hwmod
,
1433 AM43XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET
);
1434 CLKCTRL(am33xx_uart1_hwmod
, AM43XX_CM_WKUP_UART0_CLKCTRL_OFFSET
);
1435 CLKCTRL(am33xx_timer1_hwmod
, AM43XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET
);
1436 CLKCTRL(am33xx_i2c1_hwmod
, AM43XX_CM_WKUP_I2C0_CLKCTRL_OFFSET
);
1437 CLKCTRL(am33xx_wd_timer1_hwmod
, AM43XX_CM_WKUP_WDT1_CLKCTRL_OFFSET
);
1438 CLKCTRL(am33xx_rtc_hwmod
, AM43XX_CM_RTC_RTC_CLKCTRL_OFFSET
);
1439 CLKCTRL(am33xx_mmc2_hwmod
, AM43XX_CM_PER_MMC2_CLKCTRL_OFFSET
);
1440 CLKCTRL(am33xx_gpmc_hwmod
, AM43XX_CM_PER_GPMC_CLKCTRL_OFFSET
);
1441 CLKCTRL(am33xx_l4_ls_hwmod
, AM43XX_CM_PER_L4LS_CLKCTRL_OFFSET
);
1442 CLKCTRL(am33xx_l4_wkup_hwmod
, AM43XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET
);
1443 CLKCTRL(am33xx_l3_main_hwmod
, AM43XX_CM_PER_L3_CLKCTRL_OFFSET
);
1444 CLKCTRL(am33xx_tpcc_hwmod
, AM43XX_CM_PER_TPCC_CLKCTRL_OFFSET
);
1445 CLKCTRL(am33xx_tptc0_hwmod
, AM43XX_CM_PER_TPTC0_CLKCTRL_OFFSET
);
1446 CLKCTRL(am33xx_tptc1_hwmod
, AM43XX_CM_PER_TPTC1_CLKCTRL_OFFSET
);
1447 CLKCTRL(am33xx_tptc2_hwmod
, AM43XX_CM_PER_TPTC2_CLKCTRL_OFFSET
);
1448 CLKCTRL(am33xx_gfx_hwmod
, AM43XX_CM_GFX_GFX_CLKCTRL_OFFSET
);
1449 CLKCTRL(am33xx_cpgmac0_hwmod
, AM43XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET
);
1450 CLKCTRL(am33xx_pruss_hwmod
, AM43XX_CM_PER_PRUSS_CLKCTRL_OFFSET
);
1451 CLKCTRL(am33xx_mpu_hwmod
, AM43XX_CM_MPU_MPU_CLKCTRL_OFFSET
);
1452 CLKCTRL(am33xx_l3_instr_hwmod
, AM43XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET
);
1453 CLKCTRL(am33xx_ocmcram_hwmod
, AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET
);
1454 CLKCTRL(am33xx_sha0_hwmod
, AM43XX_CM_PER_SHA0_CLKCTRL_OFFSET
);
1455 CLKCTRL(am33xx_aes0_hwmod
, AM43XX_CM_PER_AES0_CLKCTRL_OFFSET
);
1458 static void omap_hwmod_am43xx_rst(void)
1460 RSTCTRL(am33xx_pruss_hwmod
, AM43XX_RM_PER_RSTCTRL_OFFSET
);
1461 RSTCTRL(am33xx_gfx_hwmod
, AM43XX_RM_GFX_RSTCTRL_OFFSET
);
1462 RSTST(am33xx_gfx_hwmod
, AM43XX_RM_GFX_RSTST_OFFSET
);
1465 void omap_hwmod_am43xx_reg(void)
1467 omap_hwmod_am43xx_clkctrl();
1468 omap_hwmod_am43xx_rst();