diff options
author | Hema HK <hemahk@ti.com> | 2011-02-17 01:37:17 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-02-17 10:36:45 -0500 |
commit | 44d02acf54114e4d5c905b6b1a6473a7d302312d (patch) | |
tree | 44ca84b8271a11b3bd34c04bc2db3285746981fc /arch/arm | |
parent | 1dbea0f5e23b6c647db72fa4a048cb7140625e13 (diff) |
OMAP2430: hwmod data: Add USBOTG
OMAP2430 hwmod data structures are populated with base address, L3 and L4
interface clocks, IRQs and sysconfig register details.
As per OMAP USBOTG specification, need to configure the USBOTG
to smart idle/standby or no idle/standby during data transfer and
force idle/standby when not in use to support retention and off-mode.
By setting HWMOD_SWSUP_SIDLE and HWMOD_SWSUP_MSTANDBY flags, framework
will take care of configuring to no idle/standby when module is enabled
and force idle/standby when suspended.
Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2430_data.c | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 8ecfbcde13ba..76bbf8a47031 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -89,6 +89,16 @@ static struct omap_hwmod omap2430_uart3_hwmod; | |||
89 | static struct omap_hwmod omap2430_i2c1_hwmod; | 89 | static struct omap_hwmod omap2430_i2c1_hwmod; |
90 | static struct omap_hwmod omap2430_i2c2_hwmod; | 90 | static struct omap_hwmod omap2430_i2c2_hwmod; |
91 | 91 | ||
92 | static struct omap_hwmod omap2430_usbhsotg_hwmod; | ||
93 | |||
94 | /* l3_core -> usbhsotg interface */ | ||
95 | static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = { | ||
96 | .master = &omap2430_usbhsotg_hwmod, | ||
97 | .slave = &omap2430_l3_main_hwmod, | ||
98 | .clk = "core_l3_ck", | ||
99 | .user = OCP_USER_MPU, | ||
100 | }; | ||
101 | |||
92 | /* I2C IP block address space length (in bytes) */ | 102 | /* I2C IP block address space length (in bytes) */ |
93 | #define OMAP2_I2C_AS_LEN 128 | 103 | #define OMAP2_I2C_AS_LEN 128 |
94 | 104 | ||
@@ -189,6 +199,35 @@ static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { | |||
189 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 199 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
190 | }; | 200 | }; |
191 | 201 | ||
202 | /* | ||
203 | * usbhsotg interface data | ||
204 | */ | ||
205 | static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = { | ||
206 | { | ||
207 | .pa_start = OMAP243X_HS_BASE, | ||
208 | .pa_end = OMAP243X_HS_BASE + SZ_4K - 1, | ||
209 | .flags = ADDR_TYPE_RT | ||
210 | }, | ||
211 | }; | ||
212 | |||
213 | /* l4_core ->usbhsotg interface */ | ||
214 | static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = { | ||
215 | .master = &omap2430_l4_core_hwmod, | ||
216 | .slave = &omap2430_usbhsotg_hwmod, | ||
217 | .clk = "usb_l4_ick", | ||
218 | .addr = omap2430_usbhsotg_addrs, | ||
219 | .addr_cnt = ARRAY_SIZE(omap2430_usbhsotg_addrs), | ||
220 | .user = OCP_USER_MPU, | ||
221 | }; | ||
222 | |||
223 | static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = { | ||
224 | &omap2430_usbhsotg__l3, | ||
225 | }; | ||
226 | |||
227 | static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = { | ||
228 | &omap2430_l4_core__usbhsotg, | ||
229 | }; | ||
230 | |||
192 | /* Slave interfaces on the L4_CORE interconnect */ | 231 | /* Slave interfaces on the L4_CORE interconnect */ |
193 | static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = { | 232 | static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = { |
194 | &omap2430_l3_main__l4_core, | 233 | &omap2430_l3_main__l4_core, |
@@ -919,6 +958,62 @@ static struct omap_hwmod omap2430_dma_system_hwmod = { | |||
919 | .flags = HWMOD_NO_IDLEST, | 958 | .flags = HWMOD_NO_IDLEST, |
920 | }; | 959 | }; |
921 | 960 | ||
961 | /* | ||
962 | * usbhsotg | ||
963 | */ | ||
964 | static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = { | ||
965 | .rev_offs = 0x0400, | ||
966 | .sysc_offs = 0x0404, | ||
967 | .syss_offs = 0x0408, | ||
968 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE| | ||
969 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
970 | SYSC_HAS_AUTOIDLE), | ||
971 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
972 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
973 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
974 | }; | ||
975 | |||
976 | static struct omap_hwmod_class usbotg_class = { | ||
977 | .name = "usbotg", | ||
978 | .sysc = &omap2430_usbhsotg_sysc, | ||
979 | }; | ||
980 | |||
981 | /* usb_otg_hs */ | ||
982 | static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = { | ||
983 | |||
984 | { .name = "mc", .irq = 92 }, | ||
985 | { .name = "dma", .irq = 93 }, | ||
986 | }; | ||
987 | |||
988 | static struct omap_hwmod omap2430_usbhsotg_hwmod = { | ||
989 | .name = "usb_otg_hs", | ||
990 | .mpu_irqs = omap2430_usbhsotg_mpu_irqs, | ||
991 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs), | ||
992 | .main_clk = "usbhs_ick", | ||
993 | .prcm = { | ||
994 | .omap2 = { | ||
995 | .prcm_reg_id = 1, | ||
996 | .module_bit = OMAP2430_EN_USBHS_MASK, | ||
997 | .module_offs = CORE_MOD, | ||
998 | .idlest_reg_id = 1, | ||
999 | .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT, | ||
1000 | }, | ||
1001 | }, | ||
1002 | .masters = omap2430_usbhsotg_masters, | ||
1003 | .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters), | ||
1004 | .slaves = omap2430_usbhsotg_slaves, | ||
1005 | .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves), | ||
1006 | .class = &usbotg_class, | ||
1007 | /* | ||
1008 | * Erratum ID: i479 idle_req / idle_ack mechanism potentially | ||
1009 | * broken when autoidle is enabled | ||
1010 | * workaround is to disable the autoidle bit at module level. | ||
1011 | */ | ||
1012 | .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE | ||
1013 | | HWMOD_SWSUP_MSTANDBY, | ||
1014 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
1015 | }; | ||
1016 | |||
922 | static __initdata struct omap_hwmod *omap2430_hwmods[] = { | 1017 | static __initdata struct omap_hwmod *omap2430_hwmods[] = { |
923 | &omap2430_l3_main_hwmod, | 1018 | &omap2430_l3_main_hwmod, |
924 | &omap2430_l4_core_hwmod, | 1019 | &omap2430_l4_core_hwmod, |
@@ -941,6 +1036,9 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = { | |||
941 | 1036 | ||
942 | /* dma_system class*/ | 1037 | /* dma_system class*/ |
943 | &omap2430_dma_system_hwmod, | 1038 | &omap2430_dma_system_hwmod, |
1039 | |||
1040 | /* usbotg class*/ | ||
1041 | &omap2430_usbhsotg_hwmod, | ||
944 | NULL, | 1042 | NULL, |
945 | }; | 1043 | }; |
946 | 1044 | ||