aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorHema HK <hemahk@ti.com>2011-02-17 01:37:18 -0500
committerFelipe Balbi <balbi@ti.com>2011-02-17 10:36:46 -0500
commit870ea2b8e750f40fe5681b902ce0d5445297e610 (patch)
tree4f382a2295061ee459f49bddffa6e86429fc3bdc /arch/arm/mach-omap2
parent44d02acf54114e4d5c905b6b1a6473a7d302312d (diff)
OMAP3xxx: hwmod data: Add USBOTG
OMAP3 hwmod data structures are populated for USBOTG with base address, L3 and L4 interface clocks, IRQs and sysconfig register details. This is applicable for OMAP3430 amd OMAP3630. 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 offmode. 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 idled. 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/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c101
1 files changed, 101 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 8d8181334f86..cce09fdb9041 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -107,6 +107,15 @@ static struct omap_hwmod omap3xxx_uart1_hwmod;
107static struct omap_hwmod omap3xxx_uart2_hwmod; 107static struct omap_hwmod omap3xxx_uart2_hwmod;
108static struct omap_hwmod omap3xxx_uart3_hwmod; 108static struct omap_hwmod omap3xxx_uart3_hwmod;
109static struct omap_hwmod omap3xxx_uart4_hwmod; 109static struct omap_hwmod omap3xxx_uart4_hwmod;
110static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
111
112/* l3_core -> usbhsotg interface */
113static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
114 .master = &omap3xxx_usbhsotg_hwmod,
115 .slave = &omap3xxx_l3_main_hwmod,
116 .clk = "core_l3_ick",
117 .user = OCP_USER_MPU,
118};
110 119
111/* L4_CORE -> L4_WKUP interface */ 120/* L4_CORE -> L4_WKUP interface */
112static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { 121static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
@@ -301,6 +310,36 @@ static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
301 .user = OCP_USER_MPU, 310 .user = OCP_USER_MPU,
302}; 311};
303 312
313/*
314* usbhsotg interface data
315*/
316
317static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
318 {
319 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
320 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
321 .flags = ADDR_TYPE_RT
322 },
323};
324
325/* l4_core -> usbhsotg */
326static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
327 .master = &omap3xxx_l4_core_hwmod,
328 .slave = &omap3xxx_usbhsotg_hwmod,
329 .clk = "l4_ick",
330 .addr = omap3xxx_usbhsotg_addrs,
331 .addr_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_addrs),
332 .user = OCP_USER_MPU,
333};
334
335static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = {
336 &omap3xxx_usbhsotg__l3,
337};
338
339static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = {
340 &omap3xxx_l4_core__usbhsotg,
341};
342
304/* Slave interfaces on the L4_CORE interconnect */ 343/* Slave interfaces on the L4_CORE interconnect */
305static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { 344static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
306 &omap3xxx_l3_main__l4_core, 345 &omap3xxx_l3_main__l4_core,
@@ -1356,6 +1395,64 @@ static struct omap_hwmod omap36xx_sr2_hwmod = {
1356 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1), 1395 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
1357}; 1396};
1358 1397
1398/*
1399 * usbhsotg
1400 */
1401static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
1402 .rev_offs = 0x0400,
1403 .sysc_offs = 0x0404,
1404 .syss_offs = 0x0408,
1405 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1406 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1407 SYSC_HAS_AUTOIDLE),
1408 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1409 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1410 .sysc_fields = &omap_hwmod_sysc_type1,
1411};
1412
1413static struct omap_hwmod_class usbotg_class = {
1414 .name = "usbotg",
1415 .sysc = &omap3xxx_usbhsotg_sysc,
1416};
1417
1418/* usb_otg_hs */
1419static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
1420
1421 { .name = "mc", .irq = 92 },
1422 { .name = "dma", .irq = 93 },
1423};
1424
1425static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1426 .name = "usb_otg_hs",
1427 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
1428 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_mpu_irqs),
1429 .main_clk = "hsotgusb_ick",
1430 .prcm = {
1431 .omap2 = {
1432 .prcm_reg_id = 1,
1433 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1434 .module_offs = CORE_MOD,
1435 .idlest_reg_id = 1,
1436 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
1437 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
1438 },
1439 },
1440 .masters = omap3xxx_usbhsotg_masters,
1441 .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
1442 .slaves = omap3xxx_usbhsotg_slaves,
1443 .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
1444 .class = &usbotg_class,
1445
1446 /*
1447 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1448 * broken when autoidle is enabled
1449 * workaround is to disable the autoidle bit at module level.
1450 */
1451 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
1452 | HWMOD_SWSUP_MSTANDBY,
1453 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
1454};
1455
1359static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { 1456static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
1360 &omap3xxx_l3_main_hwmod, 1457 &omap3xxx_l3_main_hwmod,
1361 &omap3xxx_l4_core_hwmod, 1458 &omap3xxx_l4_core_hwmod,
@@ -1387,6 +1484,10 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
1387 1484
1388 /* dma_system class*/ 1485 /* dma_system class*/
1389 &omap3xxx_dma_system_hwmod, 1486 &omap3xxx_dma_system_hwmod,
1487
1488 /* usbotg class */
1489 &omap3xxx_usbhsotg_hwmod,
1490
1390 NULL, 1491 NULL,
1391}; 1492};
1392 1493