From: b-cousson@ti.com (Cousson, Benoit)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch-v2.6.39 6/7] OMAP4430: hwmod data: Adding USBOTG
Date: Thu, 17 Feb 2011 14:43:21 +0100 [thread overview]
Message-ID: <4D5D25F9.8030907@ti.com> (raw)
In-Reply-To: <1297946466-9565-7-git-send-email-balbi@ti.com>
Hi Felipe and Hema,
Sorry for this late review, but I have a couple of comments on this one.
Since I was planning to send usb hwmod data file to Tony directly like I
did for the other drivers, I can handle the update myself if you want.
On 2/17/2011 1:41 PM, Balbi, Felipe wrote:
> From: Hema HK<hemahk@ti.com>
The authorship is not correct. It should be me.
[...]
> +static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = {
> + .rev_offs = 0x0400,
> + .sysc_offs = 0x0404,
> + .syss_offs = 0x0408,
> + .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
> + SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
> + SYSC_HAS_AUTOIDLE),
These flags does not contains the latest reset flag
(SYSS_HAS_RESET_STATUS) introduced in 2.6.37.
[...]
> +static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
> + {
> + .pa_start = OMAP44XX_HSUSB_OTG_BASE,
> + .pa_end = OMAP44XX_HSUSB_OTG_BASE + SZ_4K - 1,
You should not use the defines anymore, since the only user of the
physical address should be this file.
[...]
> +static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
> + { .role = "xclk", .clk = "otg_60m_gfclk_ck" },
That optional clock does not exist anymore, it should be "usb_otg_hs_xclk".
[...]
> @@ -2068,6 +2159,8 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
> &omap44xx_wd_timer2_hwmod,
> &omap44xx_wd_timer3_hwmod,
>
> + /* hsusb otg class */
> + &omap44xx_usb_otg_hs_hwmod,
"usb_otb_hs" should be before "wd_timer2".
For information, the updated version is below. It is based on rc5 +
for_2.6.39/omap4_hwmod_data series I've just sent.
Regards,
Benoit
---
From 5c2017f9405588127bf0b41f718409411d01abf8 Mon Sep 17 00:00:00 2001
From: Benoit Cousson <b-cousson@ti.com>
Date: Thu, 17 Feb 2011 12:41:05 +0000
Subject: [PATCH] OMAP4430: 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 at ti.com: Fix position, opt_clk, and author]
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 95
++++++++++++++++++++++++++++
1 files changed, 95 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 989bc96..b27e1e3 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;
static struct omap_hwmod omap44xx_mmc2_hwmod;
static struct omap_hwmod omap44xx_mpu_hwmod;
static struct omap_hwmod omap44xx_mpu_private_hwmod;
+static struct omap_hwmod omap44xx_usb_otg_hs_hwmod;
/*
* Interconnects omap_hwmod structures
@@ -344,6 +345,14 @@ static struct omap_hwmod_ocp_if
omap44xx_l4_cfg__l3_main_2 = {
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
+/* usb_otg_hs -> l3_main_2 */
+static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = {
+ .master = &omap44xx_usb_otg_hs_hwmod,
+ .slave = &omap44xx_l3_main_2_hwmod,
+ .clk = "l3_div_ck",
+ .user = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
/* l3_main_2 slave ports */
static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
&omap44xx_dma_system__l3_main_2,
@@ -353,6 +362,7 @@ static struct omap_hwmod_ocp_if
*omap44xx_l3_main_2_slaves[] = {
&omap44xx_iva__l3_main_2,
&omap44xx_l3_main_1__l3_main_2,
&omap44xx_l4_cfg__l3_main_2,
+ &omap44xx_usb_otg_hs__l3_main_2,
};
static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
@@ -4725,6 +4735,88 @@ static struct omap_hwmod omap44xx_uart4_hwmod = {
};
/*
+ * 'usb_otg_hs' class
+ * high-speed on-the-go universal serial bus (usb_otg_hs) controller
+ */
+
+static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = {
+ .rev_offs = 0x0400,
+ .sysc_offs = 0x0404,
+ .syss_offs = 0x0408,
+ .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
+ SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
+ SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+ SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
+ MSTANDBY_SMART),
+ .sysc_fields = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = {
+ .name = "usb_otg_hs",
+ .sysc = &omap44xx_usb_otg_hs_sysc,
+};
+
+/* usb_otg_hs */
+static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
+ { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START },
+ { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START },
+};
+
+/* usb_otg_hs master ports */
+static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = {
+ &omap44xx_usb_otg_hs__l3_main_2,
+};
+
+static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
+ {
+ .pa_start = 0x4a0ab000,
+ .pa_end = 0x4a0ab003,
+ .flags = ADDR_TYPE_RT
+ },
+};
+
+/* l4_cfg -> usb_otg_hs */
+static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
+ .master = &omap44xx_l4_cfg_hwmod,
+ .slave = &omap44xx_usb_otg_hs_hwmod,
+ .clk = "l4_div_ck",
+ .addr = omap44xx_usb_otg_hs_addrs,
+ .addr_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_addrs),
+ .user = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* usb_otg_hs slave ports */
+static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = {
+ &omap44xx_l4_cfg__usb_otg_hs,
+};
+
+static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
+ { .role = "xclk", .clk = "otg_60m_gfclk_ck" },
+};
+
+static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
+ .name = "usb_otg_hs",
+ .class = &omap44xx_usb_otg_hs_hwmod_class,
+ .mpu_irqs = omap44xx_usb_otg_hs_irqs,
+ .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_irqs),
+ .main_clk = "usb_otg_hs_ick",
+ .prcm = {
+ .omap4 = {
+ .clkctrl_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
+ },
+ },
+ .opt_clks = usb_otg_hs_opt_clks,
+ .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
+ .slaves = omap44xx_usb_otg_hs_slaves,
+ .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves),
+ .masters = omap44xx_usb_otg_hs_masters,
+ .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters),
+ .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
+};
+
+/*
* 'wd_timer' class
* 32-bit watchdog upward counter that generates a pulse on the reset
pin on
* overflow condition
@@ -4995,6 +5087,9 @@ static __initdata struct omap_hwmod
*omap44xx_hwmods[] = {
&omap44xx_uart3_hwmod,
&omap44xx_uart4_hwmod,
+ /* usb_otg_hs class */
+ &omap44xx_usb_otg_hs_hwmod,
+
/* wd_timer class */
&omap44xx_wd_timer2_hwmod,
&omap44xx_wd_timer3_hwmod,
--
1.7.0.4
next prev parent reply other threads:[~2011-02-17 13:43 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-17 12:40 [patch-v2.6.39 0/7] Patches for next merge window Felipe Balbi
2011-02-17 12:41 ` [patch-v2.6.39 1/7] arm: omap4: usb: explicitly configure MUSB pads Felipe Balbi
2011-02-17 12:41 ` [patch-v2.6.39 2/7] arm: omap4: 4430sdp: drop ehci support Felipe Balbi
2011-02-17 12:41 ` [patch-v2.6.39 3/7] OMAP2430: hwmod data: Add USBOTG Felipe Balbi
2011-02-17 12:41 ` [patch-v2.6.39 4/7] OMAP3xxx: " Felipe Balbi
2011-02-17 12:41 ` [patch-v2.6.39 5/7] AM35xx: " Felipe Balbi
2011-02-18 11:29 ` Premi, Sanjeev
2011-02-18 13:07 ` Hema Kalliguddi
2011-02-18 13:31 ` Premi, Sanjeev
2011-02-17 12:41 ` [patch-v2.6.39 6/7] OMAP4430: hwmod data: Adding USBOTG Felipe Balbi
2011-02-17 13:43 ` Cousson, Benoit [this message]
2011-02-17 14:07 ` Hema Kalliguddi
2011-02-17 15:15 ` Felipe Balbi
2011-02-17 15:18 ` Felipe Balbi
2011-02-17 15:21 ` Cousson, Benoit
2011-02-17 15:26 ` Felipe Balbi
2011-02-17 15:54 ` Cousson, Benoit
2011-02-17 16:20 ` Tony Lindgren
2011-02-17 16:22 ` Felipe Balbi
2011-02-17 16:59 ` Tony Lindgren
2011-02-17 17:14 ` Cousson, Benoit
2011-02-17 17:17 ` Felipe Balbi
2011-02-17 17:17 ` Felipe Balbi
2011-02-17 17:24 ` Cousson, Benoit
2011-02-17 17:37 ` Felipe Balbi
2011-02-17 17:46 ` Cousson, Benoit
2011-02-17 17:52 ` Felipe Balbi
2011-02-17 18:01 ` Felipe Balbi
2011-02-17 18:18 ` Tony Lindgren
2011-02-17 19:08 ` Felipe Balbi
2011-02-17 21:16 ` Tony Lindgren
2011-02-18 14:11 ` Cousson, Benoit
2011-02-18 15:41 ` Felipe Balbi
2011-02-18 15:55 ` Cousson, Benoit
2011-02-18 16:50 ` Cousson, Benoit
2011-02-21 18:22 ` Tony Lindgren
2011-02-21 21:36 ` Cousson, Benoit
2011-02-21 22:08 ` Tony Lindgren
2011-02-21 22:53 ` Cousson, Benoit
2011-02-21 23:09 ` Tony Lindgren
2011-02-21 23:28 ` Russell King - ARM Linux
2011-02-22 18:27 ` Paul Walmsley
2011-02-17 16:21 ` Tony Lindgren
2011-02-17 16:31 ` Felipe Balbi
2011-02-17 12:41 ` [patch-v2.6.39 7/7] OMAP2+: musb: hwmod adaptation for musb registration Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D5D25F9.8030907@ti.com \
--to=b-cousson@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).