diff options
author | Benoit Cousson <b-cousson@ti.com> | 2011-02-17 07:41:05 -0500 |
---|---|---|
committer | Benoit Cousson <b-cousson@ti.com> | 2011-02-17 12:43:30 -0500 |
commit | 5844c4ead25f53a1fa92a4a8f0e363f9b6b87aea (patch) | |
tree | 8d5653844ce9b1ee2ab2447a84f659405e6a0191 | |
parent | 407a6888f7362cb3dabe69ea6d9dcf3c750dc56a (diff) |
OMAP4: hwmod data: Add USBOTG
OMAP4 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 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: Cousson, Benoit <b-cousson@ti.com>
Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[b-cousson@ti.com: Fix position, opt_clk, and author]
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 96 |
1 files changed, 95 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 989bc9670436..84e795cf0648 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -62,6 +62,7 @@ static struct omap_hwmod omap44xx_mmc1_hwmod; | |||
62 | static struct omap_hwmod omap44xx_mmc2_hwmod; | 62 | static struct omap_hwmod omap44xx_mmc2_hwmod; |
63 | static struct omap_hwmod omap44xx_mpu_hwmod; | 63 | static struct omap_hwmod omap44xx_mpu_hwmod; |
64 | static struct omap_hwmod omap44xx_mpu_private_hwmod; | 64 | static struct omap_hwmod omap44xx_mpu_private_hwmod; |
65 | static struct omap_hwmod omap44xx_usb_otg_hs_hwmod; | ||
65 | 66 | ||
66 | /* | 67 | /* |
67 | * Interconnects omap_hwmod structures | 68 | * Interconnects omap_hwmod structures |
@@ -344,6 +345,14 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = { | |||
344 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 345 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
345 | }; | 346 | }; |
346 | 347 | ||
348 | /* usb_otg_hs -> l3_main_2 */ | ||
349 | static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = { | ||
350 | .master = &omap44xx_usb_otg_hs_hwmod, | ||
351 | .slave = &omap44xx_l3_main_2_hwmod, | ||
352 | .clk = "l3_div_ck", | ||
353 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
354 | }; | ||
355 | |||
347 | /* l3_main_2 slave ports */ | 356 | /* l3_main_2 slave ports */ |
348 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = { | 357 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = { |
349 | &omap44xx_dma_system__l3_main_2, | 358 | &omap44xx_dma_system__l3_main_2, |
@@ -353,6 +362,7 @@ static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = { | |||
353 | &omap44xx_iva__l3_main_2, | 362 | &omap44xx_iva__l3_main_2, |
354 | &omap44xx_l3_main_1__l3_main_2, | 363 | &omap44xx_l3_main_1__l3_main_2, |
355 | &omap44xx_l4_cfg__l3_main_2, | 364 | &omap44xx_l4_cfg__l3_main_2, |
365 | &omap44xx_usb_otg_hs__l3_main_2, | ||
356 | }; | 366 | }; |
357 | 367 | ||
358 | static struct omap_hwmod omap44xx_l3_main_2_hwmod = { | 368 | static struct omap_hwmod omap44xx_l3_main_2_hwmod = { |
@@ -594,7 +604,6 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = { | |||
594 | * slimbus2 | 604 | * slimbus2 |
595 | * usb_host_fs | 605 | * usb_host_fs |
596 | * usb_host_hs | 606 | * usb_host_hs |
597 | * usb_otg_hs | ||
598 | * usb_phy_cm | 607 | * usb_phy_cm |
599 | * usb_tll_hs | 608 | * usb_tll_hs |
600 | * usim | 609 | * usim |
@@ -4725,6 +4734,88 @@ static struct omap_hwmod omap44xx_uart4_hwmod = { | |||
4725 | }; | 4734 | }; |
4726 | 4735 | ||
4727 | /* | 4736 | /* |
4737 | * 'usb_otg_hs' class | ||
4738 | * high-speed on-the-go universal serial bus (usb_otg_hs) controller | ||
4739 | */ | ||
4740 | |||
4741 | static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = { | ||
4742 | .rev_offs = 0x0400, | ||
4743 | .sysc_offs = 0x0404, | ||
4744 | .syss_offs = 0x0408, | ||
4745 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP | | ||
4746 | SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | | ||
4747 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
4748 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
4749 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | ||
4750 | MSTANDBY_SMART), | ||
4751 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
4752 | }; | ||
4753 | |||
4754 | static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = { | ||
4755 | .name = "usb_otg_hs", | ||
4756 | .sysc = &omap44xx_usb_otg_hs_sysc, | ||
4757 | }; | ||
4758 | |||
4759 | /* usb_otg_hs */ | ||
4760 | static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = { | ||
4761 | { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START }, | ||
4762 | { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START }, | ||
4763 | }; | ||
4764 | |||
4765 | /* usb_otg_hs master ports */ | ||
4766 | static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = { | ||
4767 | &omap44xx_usb_otg_hs__l3_main_2, | ||
4768 | }; | ||
4769 | |||
4770 | static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = { | ||
4771 | { | ||
4772 | .pa_start = 0x4a0ab000, | ||
4773 | .pa_end = 0x4a0ab003, | ||
4774 | .flags = ADDR_TYPE_RT | ||
4775 | }, | ||
4776 | }; | ||
4777 | |||
4778 | /* l4_cfg -> usb_otg_hs */ | ||
4779 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = { | ||
4780 | .master = &omap44xx_l4_cfg_hwmod, | ||
4781 | .slave = &omap44xx_usb_otg_hs_hwmod, | ||
4782 | .clk = "l4_div_ck", | ||
4783 | .addr = omap44xx_usb_otg_hs_addrs, | ||
4784 | .addr_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_addrs), | ||
4785 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4786 | }; | ||
4787 | |||
4788 | /* usb_otg_hs slave ports */ | ||
4789 | static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = { | ||
4790 | &omap44xx_l4_cfg__usb_otg_hs, | ||
4791 | }; | ||
4792 | |||
4793 | static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = { | ||
4794 | { .role = "xclk", .clk = "usb_otg_hs_xclk" }, | ||
4795 | }; | ||
4796 | |||
4797 | static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = { | ||
4798 | .name = "usb_otg_hs", | ||
4799 | .class = &omap44xx_usb_otg_hs_hwmod_class, | ||
4800 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, | ||
4801 | .mpu_irqs = omap44xx_usb_otg_hs_irqs, | ||
4802 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_irqs), | ||
4803 | .main_clk = "usb_otg_hs_ick", | ||
4804 | .prcm = { | ||
4805 | .omap4 = { | ||
4806 | .clkctrl_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL, | ||
4807 | }, | ||
4808 | }, | ||
4809 | .opt_clks = usb_otg_hs_opt_clks, | ||
4810 | .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks), | ||
4811 | .slaves = omap44xx_usb_otg_hs_slaves, | ||
4812 | .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves), | ||
4813 | .masters = omap44xx_usb_otg_hs_masters, | ||
4814 | .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters), | ||
4815 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4816 | }; | ||
4817 | |||
4818 | /* | ||
4728 | * 'wd_timer' class | 4819 | * 'wd_timer' class |
4729 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | 4820 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on |
4730 | * overflow condition | 4821 | * overflow condition |
@@ -4995,6 +5086,9 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
4995 | &omap44xx_uart3_hwmod, | 5086 | &omap44xx_uart3_hwmod, |
4996 | &omap44xx_uart4_hwmod, | 5087 | &omap44xx_uart4_hwmod, |
4997 | 5088 | ||
5089 | /* usb_otg_hs class */ | ||
5090 | &omap44xx_usb_otg_hs_hwmod, | ||
5091 | |||
4998 | /* wd_timer class */ | 5092 | /* wd_timer class */ |
4999 | &omap44xx_wd_timer2_hwmod, | 5093 | &omap44xx_wd_timer2_hwmod, |
5000 | &omap44xx_wd_timer3_hwmod, | 5094 | &omap44xx_wd_timer3_hwmod, |