diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2420_data.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2430_data.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 53 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_common_data.h | 1 |
5 files changed, 112 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index 85419f86b280..a7640d1b215e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -519,6 +519,24 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__hdq1w = { | |||
519 | }; | 519 | }; |
520 | 520 | ||
521 | 521 | ||
522 | /* l4_wkup -> 32ksync_counter */ | ||
523 | static struct omap_hwmod_addr_space omap2420_counter_32k_addrs[] = { | ||
524 | { | ||
525 | .pa_start = 0x48004000, | ||
526 | .pa_end = 0x4800401f, | ||
527 | .flags = ADDR_TYPE_RT | ||
528 | }, | ||
529 | { } | ||
530 | }; | ||
531 | |||
532 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = { | ||
533 | .master = &omap2xxx_l4_wkup_hwmod, | ||
534 | .slave = &omap2xxx_counter_32k_hwmod, | ||
535 | .clk = "sync_32k_ick", | ||
536 | .addr = omap2420_counter_32k_addrs, | ||
537 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
538 | }; | ||
539 | |||
522 | static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { | 540 | static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { |
523 | &omap2xxx_l3_main__l4_core, | 541 | &omap2xxx_l3_main__l4_core, |
524 | &omap2xxx_mpu__l3_main, | 542 | &omap2xxx_mpu__l3_main, |
@@ -561,6 +579,7 @@ static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { | |||
561 | &omap2420_l4_core__mcbsp2, | 579 | &omap2420_l4_core__mcbsp2, |
562 | &omap2420_l4_core__msdi1, | 580 | &omap2420_l4_core__msdi1, |
563 | &omap2420_l4_core__hdq1w, | 581 | &omap2420_l4_core__hdq1w, |
582 | &omap2420_l4_wkup__counter_32k, | ||
564 | NULL, | 583 | NULL, |
565 | }; | 584 | }; |
566 | 585 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index ff93a8dbf427..4d7264981230 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -865,6 +865,24 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__hdq1w = { | |||
865 | .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE, | 865 | .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE, |
866 | }; | 866 | }; |
867 | 867 | ||
868 | /* l4_wkup -> 32ksync_counter */ | ||
869 | static struct omap_hwmod_addr_space omap2430_counter_32k_addrs[] = { | ||
870 | { | ||
871 | .pa_start = 0x49020000, | ||
872 | .pa_end = 0x4902001f, | ||
873 | .flags = ADDR_TYPE_RT | ||
874 | }, | ||
875 | { } | ||
876 | }; | ||
877 | |||
878 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = { | ||
879 | .master = &omap2xxx_l4_wkup_hwmod, | ||
880 | .slave = &omap2xxx_counter_32k_hwmod, | ||
881 | .clk = "sync_32k_ick", | ||
882 | .addr = omap2430_counter_32k_addrs, | ||
883 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
884 | }; | ||
885 | |||
868 | static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = { | 886 | static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = { |
869 | &omap2xxx_l3_main__l4_core, | 887 | &omap2xxx_l3_main__l4_core, |
870 | &omap2xxx_mpu__l3_main, | 888 | &omap2xxx_mpu__l3_main, |
@@ -914,6 +932,7 @@ static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = { | |||
914 | &omap2430_l4_core__mcbsp4, | 932 | &omap2430_l4_core__mcbsp4, |
915 | &omap2430_l4_core__mcbsp5, | 933 | &omap2430_l4_core__mcbsp5, |
916 | &omap2430_l4_core__hdq1w, | 934 | &omap2430_l4_core__hdq1w, |
935 | &omap2430_l4_wkup__counter_32k, | ||
917 | NULL, | 936 | NULL, |
918 | }; | 937 | }; |
919 | 938 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c index 45aaa07e3025..5941f14130a1 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | |||
@@ -732,3 +732,23 @@ struct omap_hwmod omap2xxx_mcspi2_hwmod = { | |||
732 | .class = &omap2xxx_mcspi_class, | 732 | .class = &omap2xxx_mcspi_class, |
733 | .dev_attr = &omap_mcspi2_dev_attr, | 733 | .dev_attr = &omap_mcspi2_dev_attr, |
734 | }; | 734 | }; |
735 | |||
736 | |||
737 | static struct omap_hwmod_class omap2xxx_counter_hwmod_class = { | ||
738 | .name = "counter", | ||
739 | }; | ||
740 | |||
741 | struct omap_hwmod omap2xxx_counter_32k_hwmod = { | ||
742 | .name = "counter_32k", | ||
743 | .main_clk = "func_32k_ck", | ||
744 | .prcm = { | ||
745 | .omap2 = { | ||
746 | .module_offs = WKUP_MOD, | ||
747 | .prcm_reg_id = 1, | ||
748 | .module_bit = OMAP24XX_ST_32KSYNC_SHIFT, | ||
749 | .idlest_reg_id = 1, | ||
750 | .idlest_idle_bit = OMAP24XX_ST_32KSYNC_SHIFT, | ||
751 | }, | ||
752 | }, | ||
753 | .class = &omap2xxx_counter_hwmod_class, | ||
754 | }; | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 87742e20cd5f..2432574123c6 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -1997,6 +1997,40 @@ static struct omap_hwmod omap3xxx_hdq1w_hwmod = { | |||
1997 | }; | 1997 | }; |
1998 | 1998 | ||
1999 | /* | 1999 | /* |
2000 | * '32K sync counter' class | ||
2001 | * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock | ||
2002 | */ | ||
2003 | static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = { | ||
2004 | .rev_offs = 0x0000, | ||
2005 | .sysc_offs = 0x0004, | ||
2006 | .sysc_flags = SYSC_HAS_SIDLEMODE, | ||
2007 | .idlemodes = (SIDLE_FORCE | SIDLE_NO), | ||
2008 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2009 | }; | ||
2010 | |||
2011 | static struct omap_hwmod_class omap3xxx_counter_hwmod_class = { | ||
2012 | .name = "counter", | ||
2013 | .sysc = &omap3xxx_counter_sysc, | ||
2014 | }; | ||
2015 | |||
2016 | static struct omap_hwmod omap3xxx_counter_32k_hwmod = { | ||
2017 | .name = "counter_32k", | ||
2018 | .class = &omap3xxx_counter_hwmod_class, | ||
2019 | .clkdm_name = "wkup_clkdm", | ||
2020 | .flags = HWMOD_SWSUP_SIDLE, | ||
2021 | .main_clk = "wkup_32k_fck", | ||
2022 | .prcm = { | ||
2023 | .omap2 = { | ||
2024 | .module_offs = WKUP_MOD, | ||
2025 | .prcm_reg_id = 1, | ||
2026 | .module_bit = OMAP3430_ST_32KSYNC_SHIFT, | ||
2027 | .idlest_reg_id = 1, | ||
2028 | .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT, | ||
2029 | }, | ||
2030 | }, | ||
2031 | }; | ||
2032 | |||
2033 | /* | ||
2000 | * interfaces | 2034 | * interfaces |
2001 | */ | 2035 | */ |
2002 | 2036 | ||
@@ -3085,6 +3119,24 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = { | |||
3085 | .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE, | 3119 | .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE, |
3086 | }; | 3120 | }; |
3087 | 3121 | ||
3122 | /* l4_wkup -> 32ksync_counter */ | ||
3123 | static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = { | ||
3124 | { | ||
3125 | .pa_start = 0x48320000, | ||
3126 | .pa_end = 0x4832001f, | ||
3127 | .flags = ADDR_TYPE_RT | ||
3128 | }, | ||
3129 | { } | ||
3130 | }; | ||
3131 | |||
3132 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = { | ||
3133 | .master = &omap3xxx_l4_wkup_hwmod, | ||
3134 | .slave = &omap3xxx_counter_32k_hwmod, | ||
3135 | .clk = "omap_32ksync_ick", | ||
3136 | .addr = omap3xxx_counter_32k_addrs, | ||
3137 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3138 | }; | ||
3139 | |||
3088 | static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { | 3140 | static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { |
3089 | &omap3xxx_l3_main__l4_core, | 3141 | &omap3xxx_l3_main__l4_core, |
3090 | &omap3xxx_l3_main__l4_per, | 3142 | &omap3xxx_l3_main__l4_per, |
@@ -3129,6 +3181,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { | |||
3129 | &omap34xx_l4_core__mcspi2, | 3181 | &omap34xx_l4_core__mcspi2, |
3130 | &omap34xx_l4_core__mcspi3, | 3182 | &omap34xx_l4_core__mcspi3, |
3131 | &omap34xx_l4_core__mcspi4, | 3183 | &omap34xx_l4_core__mcspi4, |
3184 | &omap3xxx_l4_wkup__counter_32k, | ||
3132 | NULL, | 3185 | NULL, |
3133 | }; | 3186 | }; |
3134 | 3187 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h index e244829308bd..e7e8eeae95e5 100644 --- a/arch/arm/mach-omap2/omap_hwmod_common_data.h +++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h | |||
@@ -75,6 +75,7 @@ extern struct omap_hwmod omap2xxx_gpio3_hwmod; | |||
75 | extern struct omap_hwmod omap2xxx_gpio4_hwmod; | 75 | extern struct omap_hwmod omap2xxx_gpio4_hwmod; |
76 | extern struct omap_hwmod omap2xxx_mcspi1_hwmod; | 76 | extern struct omap_hwmod omap2xxx_mcspi1_hwmod; |
77 | extern struct omap_hwmod omap2xxx_mcspi2_hwmod; | 77 | extern struct omap_hwmod omap2xxx_mcspi2_hwmod; |
78 | extern struct omap_hwmod omap2xxx_counter_32k_hwmod; | ||
78 | 79 | ||
79 | /* Common interface data across OMAP2xxx */ | 80 | /* Common interface data across OMAP2xxx */ |
80 | extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core; | 81 | extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core; |