public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] usb: ehci-omap: add OMAP4 support
@ 2010-11-21 18:40 Anand Gadiyar
  2010-11-21 18:40 ` [PATCH 01/11] usb: ehci-omap: update clock names to be more generic Anand Gadiyar
  2010-11-30 17:44 ` [PATCH 00/12] usb: ehci-omap: add OMAP4 support Greg KH
  0 siblings, 2 replies; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-21 18:40 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: Tony Lindgren, Greg KH, Anand Gadiyar

This series adds support for the EHCI controller on
OMAP4 chips. (This enables the ethernet controller
on the Pandaboard - finally!).

I'm sorry for the really long delay - I know this has
been in the works for a while.

I've tested the series on an OMAP4 SDP and a Pandaboard.
I'll be testing OMAP3 tomorrow.

Dependencies:
One patch depends on the mux framework patches by Benoit
- which are already in linux-next; however the series
compiles cleanly against current Linus' tree.

What's pending:
- OHCI support
- Support for TLL and HSIC modes
- Factoring out code common to ehci-omap and ohci-omap3
- Conversion to use omap_device and the hwmod database
- Runtime PM support

- Anand

Anand Gadiyar (8):
  omap: clock: add clkdev aliases for EHCI clocks
  usb: ehci-omap: use clkdev aliases for functional clocks
  usb: ehci-omap: add helpers for checking port mode
  arm: omap4: add USBHOST and related base addresses
  usb: omap4: add platform init code for EHCI driver
  omap: usb: ehci: introduce HSIC mode
  usb: ehci-omap: Add OMAP4 support
  arm: omap4: select USB_ARCH_HAS_EHCI

Keshava Munegowda (3):
  usb: ehci-omap: update clock names to be more generic
  usb: ehci-omap: don't hard-code TLL channel count
  usb: ehci: introduce CONFIG_USB_EHCI_HCD_OMAP

 arch/arm/mach-omap2/Kconfig                |    1 +
 arch/arm/mach-omap2/clock3xxx_data.c       |    5 +
 arch/arm/mach-omap2/clock44xx_data.c       |    5 +
 arch/arm/mach-omap2/usb-ehci.c             |  144 ++++++++++++-
 arch/arm/plat-omap/include/plat/omap44xx.h |    5 +
 arch/arm/plat-omap/include/plat/usb.h      |    1 +
 drivers/usb/host/Kconfig                   |    8 +
 drivers/usb/host/ehci-hcd.c                |    2 +-
 drivers/usb/host/ehci-omap.c               |  314 +++++++++++++++++++++------
 9 files changed, 406 insertions(+), 79 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 01/11] usb: ehci-omap: update clock names to be more generic
  2010-11-21 18:40 [PATCH 00/12] usb: ehci-omap: add OMAP4 support Anand Gadiyar
@ 2010-11-21 18:40 ` Anand Gadiyar
       [not found]   ` <1290364814-4417-2-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
  2010-11-30 17:44 ` [PATCH 00/12] usb: ehci-omap: add OMAP4 support Greg KH
  1 sibling, 1 reply; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-21 18:40 UTC (permalink / raw)
  To: linux-usb, linux-omap
  Cc: Tony Lindgren, Greg KH, Keshava Munegowda, Anand Gadiyar

From: Keshava Munegowda <keshava_mgowda@ti.com>

Rename usbhost2_120m_fck to usbhost_hs_fck and usbhost1_48m_fck
to usbhost_fs_fck, to better reflect the clocks' functionalities.

In OMAP4, the frequencies for the corresponding clocks are not
necessarily the same as with OMAP3, however the functionalities
are.

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
 drivers/usb/host/ehci-omap.c |   44 +++++++++++++++++++++---------------------
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 116ae28..d042bde 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -156,8 +156,8 @@ struct ehci_hcd_omap {
 	struct device		*dev;
 
 	struct clk		*usbhost_ick;
-	struct clk		*usbhost2_120m_fck;
-	struct clk		*usbhost1_48m_fck;
+	struct clk		*usbhost_hs_fck;
+	struct clk		*usbhost_fs_fck;
 	struct clk		*usbtll_fck;
 	struct clk		*usbtll_ick;
 
@@ -286,19 +286,19 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 	}
 	clk_enable(omap->usbhost_ick);
 
-	omap->usbhost2_120m_fck = clk_get(omap->dev, "usbhost_120m_fck");
-	if (IS_ERR(omap->usbhost2_120m_fck)) {
-		ret = PTR_ERR(omap->usbhost2_120m_fck);
+	omap->usbhost_hs_fck = clk_get(omap->dev, "usbhost_120m_fck");
+	if (IS_ERR(omap->usbhost_hs_fck)) {
+		ret = PTR_ERR(omap->usbhost_hs_fck);
 		goto err_host_120m_fck;
 	}
-	clk_enable(omap->usbhost2_120m_fck);
+	clk_enable(omap->usbhost_hs_fck);
 
-	omap->usbhost1_48m_fck = clk_get(omap->dev, "usbhost_48m_fck");
-	if (IS_ERR(omap->usbhost1_48m_fck)) {
-		ret = PTR_ERR(omap->usbhost1_48m_fck);
+	omap->usbhost_fs_fck = clk_get(omap->dev, "usbhost_48m_fck");
+	if (IS_ERR(omap->usbhost_fs_fck)) {
+		ret = PTR_ERR(omap->usbhost_fs_fck);
 		goto err_host_48m_fck;
 	}
-	clk_enable(omap->usbhost1_48m_fck);
+	clk_enable(omap->usbhost_fs_fck);
 
 	if (omap->phy_reset) {
 		/* Refer: ISSUE1 */
@@ -472,8 +472,8 @@ err_tll_ick:
 	clk_put(omap->usbtll_fck);
 
 err_tll_fck:
-	clk_disable(omap->usbhost1_48m_fck);
-	clk_put(omap->usbhost1_48m_fck);
+	clk_disable(omap->usbhost_fs_fck);
+	clk_put(omap->usbhost_fs_fck);
 
 	if (omap->phy_reset) {
 		if (gpio_is_valid(omap->reset_gpio_port[0]))
@@ -484,8 +484,8 @@ err_tll_fck:
 	}
 
 err_host_48m_fck:
-	clk_disable(omap->usbhost2_120m_fck);
-	clk_put(omap->usbhost2_120m_fck);
+	clk_disable(omap->usbhost_hs_fck);
+	clk_put(omap->usbhost_hs_fck);
 
 err_host_120m_fck:
 	clk_disable(omap->usbhost_ick);
@@ -550,16 +550,16 @@ static void omap_stop_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 		omap->usbhost_ick = NULL;
 	}
 
-	if (omap->usbhost1_48m_fck != NULL) {
-		clk_disable(omap->usbhost1_48m_fck);
-		clk_put(omap->usbhost1_48m_fck);
-		omap->usbhost1_48m_fck = NULL;
+	if (omap->usbhost_fs_fck != NULL) {
+		clk_disable(omap->usbhost_fs_fck);
+		clk_put(omap->usbhost_fs_fck);
+		omap->usbhost_fs_fck = NULL;
 	}
 
-	if (omap->usbhost2_120m_fck != NULL) {
-		clk_disable(omap->usbhost2_120m_fck);
-		clk_put(omap->usbhost2_120m_fck);
-		omap->usbhost2_120m_fck = NULL;
+	if (omap->usbhost_hs_fck != NULL) {
+		clk_disable(omap->usbhost_hs_fck);
+		clk_put(omap->usbhost_hs_fck);
+		omap->usbhost_hs_fck = NULL;
 	}
 
 	if (omap->usbtll_ick != NULL) {
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 02/11] usb: ehci-omap: don't hard-code TLL channel count
       [not found]   ` <1290364814-4417-2-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
@ 2010-11-21 18:40     ` Anand Gadiyar
  2010-11-21 18:40       ` [PATCH 03/11] usb: ehci: introduce CONFIG_USB_EHCI_HCD_OMAP Anand Gadiyar
  0 siblings, 1 reply; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-21 18:40 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: Tony Lindgren, Greg KH, Keshava Munegowda, Anand Gadiyar

From: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org>

Make the TLL channel count a parameter instead of a hardcoded
value. This allows us to be flexible with future OMAP revisions
which could have a different number of channels.

Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org>
Signed-off-by: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
---
 drivers/usb/host/ehci-omap.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index d042bde..d60efdc 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -191,13 +191,14 @@ struct ehci_hcd_omap {
 
 /*-------------------------------------------------------------------------*/
 
-static void omap_usb_utmi_init(struct ehci_hcd_omap *omap, u8 tll_channel_mask)
+static void omap_usb_utmi_init(struct ehci_hcd_omap *omap, u8 tll_channel_mask,
+				u8 tll_channel_count)
 {
 	unsigned reg;
 	int i;
 
 	/* Program the 3 TLL channels upfront */
-	for (i = 0; i < OMAP_TLL_CHANNEL_COUNT; i++) {
+	for (i = 0; i < tll_channel_count; i++) {
 		reg = ehci_omap_readl(omap->tll_base, OMAP_TLL_CHANNEL_CONF(i));
 
 		/* Disable AutoIdle, BitStuffing and use SDR Mode */
@@ -217,7 +218,7 @@ static void omap_usb_utmi_init(struct ehci_hcd_omap *omap, u8 tll_channel_mask)
 	ehci_omap_writel(omap->tll_base, OMAP_TLL_SHARED_CONF, reg);
 
 	/* Enable channels now */
-	for (i = 0; i < OMAP_TLL_CHANNEL_COUNT; i++) {
+	for (i = 0; i < tll_channel_count; i++) {
 		reg = ehci_omap_readl(omap->tll_base, OMAP_TLL_CHANNEL_CONF(i));
 
 		/* Enable only the reg that is needed */
@@ -438,7 +439,7 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 			tll_ch_mask |= OMAP_TLL_CHANNEL_3_EN_MASK;
 
 		/* Enable UTMI mode for required TLL channels */
-		omap_usb_utmi_init(omap, tll_ch_mask);
+		omap_usb_utmi_init(omap, tll_ch_mask, OMAP_TLL_CHANNEL_COUNT);
 	}
 
 	if (omap->phy_reset) {
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 03/11] usb: ehci: introduce CONFIG_USB_EHCI_HCD_OMAP
  2010-11-21 18:40     ` [PATCH 02/11] usb: ehci-omap: don't hard-code TLL channel count Anand Gadiyar
@ 2010-11-21 18:40       ` Anand Gadiyar
  2010-11-21 18:40         ` [PATCH 04/11] omap: clock: add clkdev aliases for EHCI clocks Anand Gadiyar
  0 siblings, 1 reply; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-21 18:40 UTC (permalink / raw)
  To: linux-usb, linux-omap
  Cc: Tony Lindgren, Greg KH, Keshava Munegowda, Anand Gadiyar

From: Keshava Munegowda <keshava_mgowda@ti.com>

Introduce the CONFIG_USB_EHCI_HCD_OMAP option to select
EHCI support on OMAP3 and later chips. This scales better
than having a long line of dependencies for each new OMAP
with EHCI support.

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
 drivers/usb/host/Kconfig    |    8 ++++++++
 drivers/usb/host/ehci-hcd.c |    2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 2391c39..6a7c688 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -133,6 +133,14 @@ config USB_EHCI_MXC
 	---help---
 	  Variation of ARC USB block used in some Freescale chips.
 
+config USB_EHCI_HCD_OMAP
+	bool "EHCI support for OMAP3 and later chips"
+	depends on USB_EHCI_HCD && ARCH_OMAP
+	default y
+	--- help ---
+	  Enables support for the on-chip EHCI controller on
+	  OMAP3 and later chips.
+
 config USB_EHCI_HCD_PPC_OF
 	bool "EHCI support for PPC USB controller on OF platform bus"
 	depends on USB_EHCI_HCD && PPC_OF
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 87157db..2f06ba4 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1171,7 +1171,7 @@ MODULE_LICENSE ("GPL");
 #define	PLATFORM_DRIVER		ehci_hcd_au1xxx_driver
 #endif
 
-#ifdef CONFIG_ARCH_OMAP3
+#ifdef CONFIG_USB_EHCI_HCD_OMAP
 #include "ehci-omap.c"
 #define        PLATFORM_DRIVER         ehci_hcd_omap_driver
 #endif
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 04/11] omap: clock: add clkdev aliases for EHCI clocks
  2010-11-21 18:40       ` [PATCH 03/11] usb: ehci: introduce CONFIG_USB_EHCI_HCD_OMAP Anand Gadiyar
@ 2010-11-21 18:40         ` Anand Gadiyar
       [not found]           ` <1290364814-4417-5-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
  2010-11-22 10:19           ` [PATCH 04/11] omap: clock: add clkdev aliases for EHCI clocks Felipe Balbi
  0 siblings, 2 replies; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-21 18:40 UTC (permalink / raw)
  To: linux-usb, linux-omap; +Cc: Tony Lindgren, Greg KH, Anand Gadiyar

Add clkdev aliases for the USBHOST and USBTLL clocks on OMAP3 and
OMAP4, so that the driver can refer to the clocks using a common alias.

This will disappear when the driver is converted to use the hwmod
database, but until then this patch is needed.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
 arch/arm/mach-omap2/clock3xxx_data.c |    5 +++++
 arch/arm/mach-omap2/clock44xx_data.c |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index d85ecd5..a04cb03 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3278,6 +3278,7 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"cpefuse_fck",	&cpefuse_fck,	CK_3430ES2 | CK_AM35XX),
 	CLK(NULL,	"ts_fck",	&ts_fck,	CK_3430ES2 | CK_AM35XX),
 	CLK(NULL,	"usbtll_fck",	&usbtll_fck,	CK_3430ES2 | CK_AM35XX),
+	CLK("ehci-omap.0",	"usbtll_fck",	&usbtll_fck,	CK_3430ES2 | CK_AM35XX),
 	CLK("omap-mcbsp.1",	"prcm_fck",	&core_96m_fck,	CK_3XXX),
 	CLK("omap-mcbsp.5",	"prcm_fck",	&core_96m_fck,	CK_3XXX),
 	CLK(NULL,	"core_96m_fck",	&core_96m_fck,	CK_3XXX),
@@ -3313,6 +3314,7 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"pka_ick",	&pka_ick,	CK_343X),
 	CLK(NULL,	"core_l4_ick",	&core_l4_ick,	CK_3XXX),
 	CLK(NULL,	"usbtll_ick",	&usbtll_ick,	CK_3430ES2 | CK_AM35XX),
+	CLK("ehci-omap.0",	"usbtll_ick",	&usbtll_ick,	CK_3430ES2 | CK_AM35XX),
 	CLK("mmci-omap-hs.2",	"ick",	&mmchs3_ick,	CK_3430ES2 | CK_AM35XX),
 	CLK(NULL,	"icr_ick",	&icr_ick,	CK_343X),
 	CLK("omap-aes",	"ick",	&aes2_ick,	CK_343X),
@@ -3358,8 +3360,11 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"cam_ick",	&cam_ick,	CK_343X),
 	CLK(NULL,	"csi2_96m_fck",	&csi2_96m_fck,	CK_343X),
 	CLK(NULL,	"usbhost_120m_fck", &usbhost_120m_fck, CK_3430ES2 | CK_AM35XX),
+	CLK("ehci-omap.0",	"hs_fck", &usbhost_120m_fck, CK_3430ES2 | CK_AM35XX),
 	CLK(NULL,	"usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2 | CK_AM35XX),
+	CLK("ehci-omap.0",	"fs_fck", &usbhost_48m_fck, CK_3430ES2 | CK_AM35XX),
 	CLK(NULL,	"usbhost_ick",	&usbhost_ick,	CK_3430ES2 | CK_AM35XX),
+	CLK("ehci-omap.0",	"usbhost_ick",	&usbhost_ick,	CK_3430ES2 | CK_AM35XX),
 	CLK(NULL,	"usim_fck",	&usim_fck,	CK_3430ES2),
 	CLK(NULL,	"gpt1_fck",	&gpt1_fck,	CK_3XXX),
 	CLK(NULL,	"wkup_32k_fck",	&wkup_32k_fck,	CK_3XXX),
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index 1599836..f473e89 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -2937,6 +2937,7 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK(NULL,	"uart3_fck",			&uart3_fck,	CK_443X),
 	CLK(NULL,	"uart4_fck",			&uart4_fck,	CK_443X),
 	CLK(NULL,	"usb_host_fs_fck",		&usb_host_fs_fck,	CK_443X),
+	CLK("ehci-omap.0",	"fs_fck",		&usb_host_fs_fck,	CK_443X),
 	CLK(NULL,	"usb_host_hs_utmi_p3_clk",	&usb_host_hs_utmi_p3_clk,	CK_443X),
 	CLK(NULL,	"usb_host_hs_hsic60m_p1_clk",	&usb_host_hs_hsic60m_p1_clk,	CK_443X),
 	CLK(NULL,	"usb_host_hs_hsic60m_p2_clk",	&usb_host_hs_hsic60m_p2_clk,	CK_443X),
@@ -2948,6 +2949,8 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK(NULL,	"usb_host_hs_hsic480m_p2_clk",	&usb_host_hs_hsic480m_p2_clk,	CK_443X),
 	CLK(NULL,	"usb_host_hs_func48mclk",	&usb_host_hs_func48mclk,	CK_443X),
 	CLK(NULL,	"usb_host_hs_fck",		&usb_host_hs_fck,	CK_443X),
+	CLK("ehci-omap.0",	"hs_fck",		&usb_host_hs_fck,	CK_443X),
+	CLK("ehci-omap.0",	"usbhost_ick",		&dummy_ck,		CK_443X),
 	CLK(NULL,	"otg_60m_gfclk",		&otg_60m_gfclk,	CK_443X),
 	CLK(NULL,	"usb_otg_hs_xclk",		&usb_otg_hs_xclk,	CK_443X),
 	CLK("musb_hdrc",	"ick",				&usb_otg_hs_ick,	CK_443X),
@@ -2956,6 +2959,8 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK(NULL,	"usb_tll_hs_usb_ch0_clk",	&usb_tll_hs_usb_ch0_clk,	CK_443X),
 	CLK(NULL,	"usb_tll_hs_usb_ch1_clk",	&usb_tll_hs_usb_ch1_clk,	CK_443X),
 	CLK(NULL,	"usb_tll_hs_ick",		&usb_tll_hs_ick,	CK_443X),
+	CLK("ehci-omap.0",	"usbtll_ick",		&usb_tll_hs_ick,	CK_443X),
+	CLK("ehci-omap.0",	"usbtll_fck",		&dummy_ck,	CK_443X),
 	CLK(NULL,	"usim_ck",			&usim_ck,	CK_443X),
 	CLK(NULL,	"usim_fclk",			&usim_fclk,	CK_443X),
 	CLK(NULL,	"usim_fck",			&usim_fck,	CK_443X),
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 05/11] usb: ehci-omap: use clkdev aliases for functional clocks
       [not found]           ` <1290364814-4417-5-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
@ 2010-11-21 18:40             ` Anand Gadiyar
       [not found]               ` <1290364814-4417-6-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-21 18:40 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: Tony Lindgren, Greg KH, Anand Gadiyar

Use the recently updated aliases to get functional clocks needed by
the driver. This allows the driver to acquire OMAP4-specific clocks
without having to use different clock names for OMAP3 and OMAP4.

Signed-off-by: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
---
 drivers/usb/host/ehci-omap.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index d60efdc..7a4682c 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -287,14 +287,14 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 	}
 	clk_enable(omap->usbhost_ick);
 
-	omap->usbhost_hs_fck = clk_get(omap->dev, "usbhost_120m_fck");
+	omap->usbhost_hs_fck = clk_get(omap->dev, "hs_fck");
 	if (IS_ERR(omap->usbhost_hs_fck)) {
 		ret = PTR_ERR(omap->usbhost_hs_fck);
 		goto err_host_120m_fck;
 	}
 	clk_enable(omap->usbhost_hs_fck);
 
-	omap->usbhost_fs_fck = clk_get(omap->dev, "usbhost_48m_fck");
+	omap->usbhost_fs_fck = clk_get(omap->dev, "fs_fck");
 	if (IS_ERR(omap->usbhost_fs_fck)) {
 		ret = PTR_ERR(omap->usbhost_fs_fck);
 		goto err_host_48m_fck;
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 06/11] usb: ehci-omap: add helpers for checking port mode
       [not found]               ` <1290364814-4417-6-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
@ 2010-11-21 18:40                 ` Anand Gadiyar
       [not found]                   ` <1290364814-4417-7-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-21 18:40 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: Tony Lindgren, Greg KH, Anand Gadiyar

Introduce helper functions to test port mode. These checks are
performed in several places in the driver, and these helpers
improve readability.

Signed-off-by: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
---
 drivers/usb/host/ehci-omap.c |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 7a4682c..dd9d5c1 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -127,6 +127,9 @@
 #define	EHCI_INSNREG05_ULPI_EXTREGADD_SHIFT		8
 #define	EHCI_INSNREG05_ULPI_WRDATA_SHIFT		0
 
+#define is_ehci_phy_mode(x)	(x == EHCI_HCD_OMAP_MODE_PHY)
+#define is_ehci_tll_mode(x)	(x == EHCI_HCD_OMAP_MODE_TLL)
+
 /*-------------------------------------------------------------------------*/
 
 static inline void ehci_omap_writel(void __iomem *base, u32 reg, u32 val)
@@ -387,27 +390,27 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 	/* Bypass the TLL module for PHY mode operation */
 	if (cpu_is_omap3430() && (omap_rev() <= OMAP3430_REV_ES2_1)) {
 		dev_dbg(omap->dev, "OMAP3 ES version <= ES2.1\n");
-		if ((omap->port_mode[0] == EHCI_HCD_OMAP_MODE_PHY) ||
-			(omap->port_mode[1] == EHCI_HCD_OMAP_MODE_PHY) ||
-				(omap->port_mode[2] == EHCI_HCD_OMAP_MODE_PHY))
+		if (is_ehci_phy_mode(omap->port_mode[0]) ||
+			is_ehci_phy_mode(omap->port_mode[1]) ||
+				is_ehci_phy_mode(omap->port_mode[2]))
 			reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
 		else
 			reg |= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
 	} else {
 		dev_dbg(omap->dev, "OMAP3 ES version > ES2.1\n");
-		if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_PHY)
+		if (is_ehci_phy_mode(omap->port_mode[0]))
 			reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
-		else if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_TLL)
+		else if (is_ehci_tll_mode(omap->port_mode[0]))
 			reg |= OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
 
-		if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_PHY)
+		if (is_ehci_phy_mode(omap->port_mode[1]))
 			reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
-		else if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_TLL)
+		else if (is_ehci_tll_mode(omap->port_mode[1]))
 			reg |= OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
 
-		if (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_PHY)
+		if (is_ehci_phy_mode(omap->port_mode[2]))
 			reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
-		else if (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_TLL)
+		else if (is_ehci_tll_mode(omap->port_mode[2]))
 			reg |= OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
 
 	}
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 07/11] arm: omap4: add USBHOST and related base addresses
       [not found]                   ` <1290364814-4417-7-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
@ 2010-11-21 18:40                     ` Anand Gadiyar
  2010-11-21 18:40                       ` [PATCH 08/11] usb: omap4: add platform init code for EHCI driver Anand Gadiyar
  2010-11-22 10:24                       ` [PATCH 07/11] arm: omap4: add USBHOST and related base addresses Felipe Balbi
  0 siblings, 2 replies; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-21 18:40 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: Tony Lindgren, Greg KH, Anand Gadiyar

Add base addresses for USBHOST, USBTLL, EHCI and OHCI to
the header file.

This will disappear when the drivers are converted to use
the hwmod database, however this patch is needed until then.

Signed-off-by: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
---
 arch/arm/plat-omap/include/plat/omap44xx.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/omap44xx.h b/arch/arm/plat-omap/include/plat/omap44xx.h
index 8b3f12f..ea2b8a6 100644
--- a/arch/arm/plat-omap/include/plat/omap44xx.h
+++ b/arch/arm/plat-omap/include/plat/omap44xx.h
@@ -52,5 +52,10 @@
 #define OMAP4_MMU1_BASE			0x55082000
 #define OMAP4_MMU2_BASE			0x4A066000
 
+#define OMAP44XX_USBTLL_BASE		(L4_44XX_BASE + 0x62000)
+#define OMAP44XX_UHH_CONFIG_BASE	(L4_44XX_BASE + 0x64000)
+#define OMAP44XX_HSUSB_OHCI_BASE	(L4_44XX_BASE + 0x64800)
+#define OMAP44XX_HSUSB_EHCI_BASE	(L4_44XX_BASE + 0x64C00)
+
 #endif /* __ASM_ARCH_OMAP44XX_H */
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 08/11] usb: omap4: add platform init code for EHCI driver
  2010-11-21 18:40                     ` [PATCH 07/11] arm: omap4: add USBHOST and related base addresses Anand Gadiyar
@ 2010-11-21 18:40                       ` Anand Gadiyar
  2010-11-21 18:40                         ` [PATCH 09/11] omap: usb: ehci: introduce HSIC mode Anand Gadiyar
  2010-11-22 10:24                       ` [PATCH 07/11] arm: omap4: add USBHOST and related base addresses Felipe Balbi
  1 sibling, 1 reply; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-21 18:40 UTC (permalink / raw)
  To: linux-usb, linux-omap; +Cc: Tony Lindgren, Greg KH, Anand Gadiyar

- Add platform init code for EHCI on OMAP4
- Add pad configuration for PHY and TLL modes

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
 arch/arm/mach-omap2/usb-ehci.c |  144 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 136 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c
index b11bf38..25eeada 100644
--- a/arch/arm/mach-omap2/usb-ehci.c
+++ b/arch/arm/mach-omap2/usb-ehci.c
@@ -34,22 +34,15 @@
 
 static struct resource ehci_resources[] = {
 	{
-		.start	= OMAP34XX_EHCI_BASE,
-		.end	= OMAP34XX_EHCI_BASE + SZ_1K - 1,
 		.flags	= IORESOURCE_MEM,
 	},
 	{
-		.start	= OMAP34XX_UHH_CONFIG_BASE,
-		.end	= OMAP34XX_UHH_CONFIG_BASE + SZ_1K - 1,
 		.flags	= IORESOURCE_MEM,
 	},
 	{
-		.start	= OMAP34XX_USBTLL_BASE,
-		.end	= OMAP34XX_USBTLL_BASE + SZ_4K - 1,
 		.flags	= IORESOURCE_MEM,
 	},
 	{         /* general IRQ */
-		.start   = INT_34XX_EHCI_IRQ,
 		.flags   = IORESOURCE_IRQ,
 	}
 };
@@ -214,13 +207,148 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
 	return;
 }
 
+static void setup_4430ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
+{
+	switch (port_mode[0]) {
+	case EHCI_HCD_OMAP_MODE_PHY:
+		omap_mux_init_signal("usbb1_ulpiphy_stp",
+			OMAP_PIN_OUTPUT);
+		omap_mux_init_signal("usbb1_ulpiphy_clk",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpiphy_dir",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpiphy_nxt",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpiphy_dat0",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpiphy_dat1",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpiphy_dat2",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpiphy_dat3",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpiphy_dat4",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpiphy_dat5",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpiphy_dat6",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpiphy_dat7",
+			OMAP_PIN_INPUT_PULLDOWN);
+			break;
+	case EHCI_HCD_OMAP_MODE_TLL:
+		omap_mux_init_signal("usbb1_ulpitll_stp",
+			OMAP_PIN_INPUT_PULLUP);
+		omap_mux_init_signal("usbb1_ulpitll_clk",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpitll_dir",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpitll_nxt",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpitll_dat0",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpitll_dat1",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpitll_dat2",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpitll_dat3",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpitll_dat4",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpitll_dat5",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpitll_dat6",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb1_ulpitll_dat7",
+			OMAP_PIN_INPUT_PULLDOWN);
+			break;
+	case EHCI_HCD_OMAP_MODE_UNKNOWN:
+	default:
+			break;
+	}
+	switch (port_mode[1]) {
+	case EHCI_HCD_OMAP_MODE_PHY:
+		omap_mux_init_signal("usbb2_ulpiphy_stp",
+			OMAP_PIN_OUTPUT);
+		omap_mux_init_signal("usbb2_ulpiphy_clk",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpiphy_dir",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpiphy_nxt",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpiphy_dat0",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpiphy_dat1",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpiphy_dat2",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpiphy_dat3",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpiphy_dat4",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpiphy_dat5",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpiphy_dat6",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpiphy_dat7",
+			OMAP_PIN_INPUT_PULLDOWN);
+			break;
+	case EHCI_HCD_OMAP_MODE_TLL:
+		omap_mux_init_signal("usbb2_ulpitll_stp",
+			OMAP_PIN_INPUT_PULLUP);
+		omap_mux_init_signal("usbb2_ulpitll_clk",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpitll_dir",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpitll_nxt",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpitll_dat0",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpitll_dat1",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpitll_dat2",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpitll_dat3",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpitll_dat4",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpitll_dat5",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpitll_dat6",
+			OMAP_PIN_INPUT_PULLDOWN);
+		omap_mux_init_signal("usbb2_ulpitll_dat7",
+			OMAP_PIN_INPUT_PULLDOWN);
+			break;
+	case EHCI_HCD_OMAP_MODE_UNKNOWN:
+	default:
+			break;
+	}
+}
+
 void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata)
 {
 	platform_device_add_data(&ehci_device, pdata, sizeof(*pdata));
 
 	/* Setup Pin IO MUX for EHCI */
-	if (cpu_is_omap34xx())
+	if (cpu_is_omap34xx()) {
+		ehci_resources[0].start	= OMAP34XX_EHCI_BASE;
+		ehci_resources[0].end	= OMAP34XX_EHCI_BASE + SZ_1K - 1;
+		ehci_resources[1].start	= OMAP34XX_UHH_CONFIG_BASE;
+		ehci_resources[1].end	= OMAP34XX_UHH_CONFIG_BASE + SZ_1K - 1;
+		ehci_resources[2].start	= OMAP34XX_USBTLL_BASE;
+		ehci_resources[2].end	= OMAP34XX_USBTLL_BASE + SZ_4K - 1;
+		ehci_resources[3].start = INT_34XX_EHCI_IRQ;
 		setup_ehci_io_mux(pdata->port_mode);
+	} else if (cpu_is_omap44xx()) {
+		ehci_resources[0].start	= OMAP44XX_HSUSB_EHCI_BASE;
+		ehci_resources[0].end	= OMAP44XX_HSUSB_EHCI_BASE + SZ_1K - 1;
+		ehci_resources[1].start	= OMAP44XX_UHH_CONFIG_BASE;
+		ehci_resources[1].end	= OMAP44XX_UHH_CONFIG_BASE + SZ_2K - 1;
+		ehci_resources[2].start	= OMAP44XX_USBTLL_BASE;
+		ehci_resources[2].end	= OMAP44XX_USBTLL_BASE + SZ_4K - 1;
+		ehci_resources[3].start = OMAP44XX_IRQ_EHCI;
+		setup_4430ehci_io_mux(pdata->port_mode);
+	}
 
 	if (platform_device_register(&ehci_device) < 0) {
 		printk(KERN_ERR "Unable to register HS-USB (EHCI) device\n");
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 09/11] omap: usb: ehci: introduce HSIC mode
  2010-11-21 18:40                       ` [PATCH 08/11] usb: omap4: add platform init code for EHCI driver Anand Gadiyar
@ 2010-11-21 18:40                         ` Anand Gadiyar
       [not found]                           ` <1290364814-4417-10-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
  2010-11-30 18:42                           ` [PATCH 09/11] omap: usb: ehci: introduce HSIC mode Tony Lindgren
  0 siblings, 2 replies; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-21 18:40 UTC (permalink / raw)
  To: linux-usb, linux-omap; +Cc: Tony Lindgren, Greg KH, Anand Gadiyar

The EHCI controller in OMAP4 supports a new interface mode - HSIC.
Add this to the list of modes supported on OMAP3.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
 arch/arm/plat-omap/include/plat/usb.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
index 59c7fe7..9b1893f 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/arch/arm/plat-omap/include/plat/usb.h
@@ -11,6 +11,7 @@ enum ehci_hcd_omap_mode {
 	EHCI_HCD_OMAP_MODE_UNKNOWN,
 	EHCI_HCD_OMAP_MODE_PHY,
 	EHCI_HCD_OMAP_MODE_TLL,
+	EHCI_HCD_OMAP_MODE_HSIC,
 };
 
 enum ohci_omap3_port_mode {
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 10/11] usb: ehci-omap: Add OMAP4 support
       [not found]                           ` <1290364814-4417-10-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
@ 2010-11-21 18:40                             ` Anand Gadiyar
       [not found]                               ` <1290364814-4417-11-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-21 18:40 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: Tony Lindgren, Greg KH, Anand Gadiyar, Keshava Munegowda

Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org>
Signed-off-by: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
---
 drivers/usb/host/ehci-omap.c |  258 ++++++++++++++++++++++++++++++++++-------
 1 files changed, 214 insertions(+), 44 deletions(-)

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index dd9d5c1..0374eb4 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -1,11 +1,12 @@
 /*
- * ehci-omap.c - driver for USBHOST on OMAP 34xx processor
+ * ehci-omap.c - driver for USBHOST on OMAP3/4 processors
  *
- * Bus Glue for OMAP34xx USBHOST 3 port EHCI controller
- * Tested on OMAP3430 ES2.0 SDP
+ * Bus Glue for the EHCI controllers in OMAP3/4
+ * Tested on several OMAP3 boards, and OMAP4 Pandaboard
  *
- * Copyright (C) 2007-2008 Texas Instruments, Inc.
+ * Copyright (C) 2007-2010 Texas Instruments, Inc.
  *	Author: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
+ *	Author: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
  *
  * Copyright (C) 2009 Nokia Corporation
  *	Contact: Felipe Balbi <felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
@@ -26,11 +27,14 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  *
- * TODO (last updated Feb 12, 2010):
+ * TODO (last updated Nov 21, 2010):
  *	- add kernel-doc
  *	- enable AUTOIDLE
  *	- add suspend/resume
  *	- move workarounds to board-files
+ *	- factor out code common to OHCI
+ *	- add HSIC and TLL support
+ *	- convert to use hwmod and runtime PM
  */
 
 #include <linux/platform_device.h>
@@ -114,6 +118,23 @@
 #define OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS		(1 << 9)
 #define OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS		(1 << 10)
 
+/* OMAP4-specific defines */
+#define OMAP4_UHH_SYSCONFIG_IDLEMODE_CLEAR		(3 << 2)
+#define OMAP4_UHH_SYSCONFIG_NOIDLE			(1 << 2)
+
+#define OMAP4_UHH_SYSCONFIG_STDBYMODE_CLEAR		(3 << 4)
+#define OMAP4_UHH_SYSCONFIG_NOSTDBY			(1 << 4)
+#define OMAP4_UHH_SYSCONFIG_SOFTRESET			(1 << 0)
+
+#define OMAP4_P1_MODE_CLEAR				(3 << 16)
+#define OMAP4_P1_MODE_TLL				(1 << 16)
+#define OMAP4_P1_MODE_HSIC				(3 << 16)
+#define OMAP4_P2_MODE_CLEAR				(3 << 18)
+#define OMAP4_P2_MODE_TLL				(1 << 18)
+#define OMAP4_P2_MODE_HSIC				(3 << 18)
+
+#define OMAP_REV2_TLL_CHANNEL_COUNT			2
+
 #define	OMAP_UHH_DEBUG_CSR				(0x44)
 
 /* EHCI Register Set */
@@ -127,8 +148,16 @@
 #define	EHCI_INSNREG05_ULPI_EXTREGADD_SHIFT		8
 #define	EHCI_INSNREG05_ULPI_WRDATA_SHIFT		0
 
+/* Values of UHH_REVISION - Note: these are not given in the TRM */
+#define OMAP_EHCI_REV1	0x00000010	/* OMAP3 */
+#define OMAP_EHCI_REV2	0x50700100	/* OMAP4 */
+
+#define is_omap_ehci_rev1(x)	(x->omap_ehci_rev == OMAP_EHCI_REV1)
+#define is_omap_ehci_rev2(x)	(x->omap_ehci_rev == OMAP_EHCI_REV2)
+
 #define is_ehci_phy_mode(x)	(x == EHCI_HCD_OMAP_MODE_PHY)
 #define is_ehci_tll_mode(x)	(x == EHCI_HCD_OMAP_MODE_TLL)
+#define is_ehci_hsic_mode(x)	(x == EHCI_HCD_OMAP_MODE_HSIC)
 
 /*-------------------------------------------------------------------------*/
 
@@ -163,6 +192,10 @@ struct ehci_hcd_omap {
 	struct clk		*usbhost_fs_fck;
 	struct clk		*usbtll_fck;
 	struct clk		*usbtll_ick;
+	struct clk		*xclk60mhsp1_ck;
+	struct clk		*xclk60mhsp2_ck;
+	struct clk		*utmi_p1_fck;
+	struct clk		*utmi_p2_fck;
 
 	/* FIXME the following two workarounds are
 	 * board specific not silicon-specific so these
@@ -179,6 +212,9 @@ struct ehci_hcd_omap {
 	/* phy reset workaround */
 	int			phy_reset;
 
+	/* IP revision */
+	u32			omap_ehci_rev;
+
 	/* desired phy_mode: TLL, PHY */
 	enum ehci_hcd_omap_mode	port_mode[OMAP3_HS_USB_PORTS];
 
@@ -337,6 +373,80 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 	}
 	clk_enable(omap->usbtll_ick);
 
+	omap->omap_ehci_rev = ehci_omap_readl(omap->uhh_base,
+						OMAP_UHH_REVISION);
+	dev_dbg(omap->dev, "OMAP UHH_REVISION 0x%x\n",
+					omap->omap_ehci_rev);
+
+	/*
+	 * Enable per-port clocks as needed (newer controllers only).
+	 * - External ULPI clock for PHY mode
+	 * - Internal clocks for TLL and HSIC modes (TODO)
+	 */
+	if (is_omap_ehci_rev2(omap)) {
+		switch (omap->port_mode[0]) {
+		case EHCI_HCD_OMAP_MODE_PHY:
+			omap->xclk60mhsp1_ck = clk_get(omap->dev,
+							"xclk60mhsp1_ck");
+			if (IS_ERR(omap->xclk60mhsp1_ck)) {
+				ret = PTR_ERR(omap->xclk60mhsp1_ck);
+				dev_err(omap->dev,
+					"Unable to get Port1 ULPI clock\n");
+			}
+
+			omap->utmi_p1_fck = clk_get(omap->dev,
+							"utmi_p1_gfclk");
+			if (IS_ERR(omap->utmi_p1_fck)) {
+				ret = PTR_ERR(omap->utmi_p1_fck);
+				dev_err(omap->dev,
+					"Unable to get utmi_p1_fck\n");
+			}
+
+			ret = clk_set_parent(omap->utmi_p1_fck,
+						omap->xclk60mhsp1_ck);
+			if (ret != 0) {
+				dev_err(omap->dev,
+					"Unable to set P1 f-clock\n");
+			}
+			break;
+		case EHCI_HCD_OMAP_MODE_TLL:
+			/* TODO */
+		default:
+			break;
+		}
+		switch (omap->port_mode[1]) {
+		case EHCI_HCD_OMAP_MODE_PHY:
+			omap->xclk60mhsp2_ck = clk_get(omap->dev,
+							"xclk60mhsp2_ck");
+			if (IS_ERR(omap->xclk60mhsp2_ck)) {
+				ret = PTR_ERR(omap->xclk60mhsp2_ck);
+				dev_err(omap->dev,
+					"Unable to get Port2 ULPI clock\n");
+			}
+
+			omap->utmi_p2_fck = clk_get(omap->dev,
+							"utmi_p2_gfclk");
+			if (IS_ERR(omap->utmi_p2_fck)) {
+				ret = PTR_ERR(omap->utmi_p2_fck);
+				dev_err(omap->dev,
+					"Unable to get utmi_p2_fck\n");
+			}
+
+			ret = clk_set_parent(omap->utmi_p2_fck,
+						omap->xclk60mhsp2_ck);
+			if (ret != 0) {
+				dev_err(omap->dev,
+					"Unable to set P2 f-clock\n");
+			}
+			break;
+		case EHCI_HCD_OMAP_MODE_TLL:
+			/* TODO */
+		default:
+			break;
+		}
+	}
+
+
 	/* perform TLL soft reset, and wait until reset is complete */
 	ehci_omap_writel(omap->tll_base, OMAP_USBTLL_SYSCONFIG,
 			OMAP_USBTLL_SYSCONFIG_SOFTRESET);
@@ -364,12 +474,20 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 
 	/* Put UHH in NoIdle/NoStandby mode */
 	reg = ehci_omap_readl(omap->uhh_base, OMAP_UHH_SYSCONFIG);
-	reg |= (OMAP_UHH_SYSCONFIG_ENAWAKEUP
-			| OMAP_UHH_SYSCONFIG_SIDLEMODE
-			| OMAP_UHH_SYSCONFIG_CACTIVITY
-			| OMAP_UHH_SYSCONFIG_MIDLEMODE);
-	reg &= ~OMAP_UHH_SYSCONFIG_AUTOIDLE;
+	if (is_omap_ehci_rev1(omap)) {
+		reg |= (OMAP_UHH_SYSCONFIG_ENAWAKEUP
+				| OMAP_UHH_SYSCONFIG_SIDLEMODE
+				| OMAP_UHH_SYSCONFIG_CACTIVITY
+				| OMAP_UHH_SYSCONFIG_MIDLEMODE);
+		reg &= ~OMAP_UHH_SYSCONFIG_AUTOIDLE;
+
 
+	} else if (is_omap_ehci_rev2(omap)) {
+		reg &= ~OMAP4_UHH_SYSCONFIG_IDLEMODE_CLEAR;
+		reg |= OMAP4_UHH_SYSCONFIG_NOIDLE;
+		reg &= ~OMAP4_UHH_SYSCONFIG_STDBYMODE_CLEAR;
+		reg |= OMAP4_UHH_SYSCONFIG_NOSTDBY;
+	}
 	ehci_omap_writel(omap->uhh_base, OMAP_UHH_SYSCONFIG, reg);
 
 	reg = ehci_omap_readl(omap->uhh_base, OMAP_UHH_HOSTCONFIG);
@@ -380,40 +498,56 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 			| OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN);
 	reg &= ~OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN;
 
-	if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_UNKNOWN)
-		reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS;
-	if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_UNKNOWN)
-		reg &= ~OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS;
-	if (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_UNKNOWN)
-		reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS;
-
-	/* Bypass the TLL module for PHY mode operation */
-	if (cpu_is_omap3430() && (omap_rev() <= OMAP3430_REV_ES2_1)) {
-		dev_dbg(omap->dev, "OMAP3 ES version <= ES2.1\n");
-		if (is_ehci_phy_mode(omap->port_mode[0]) ||
-			is_ehci_phy_mode(omap->port_mode[1]) ||
-				is_ehci_phy_mode(omap->port_mode[2]))
-			reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
-		else
-			reg |= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
-	} else {
-		dev_dbg(omap->dev, "OMAP3 ES version > ES2.1\n");
-		if (is_ehci_phy_mode(omap->port_mode[0]))
-			reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
-		else if (is_ehci_tll_mode(omap->port_mode[0]))
-			reg |= OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
-
-		if (is_ehci_phy_mode(omap->port_mode[1]))
-			reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
-		else if (is_ehci_tll_mode(omap->port_mode[1]))
-			reg |= OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
-
-		if (is_ehci_phy_mode(omap->port_mode[2]))
-			reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
-		else if (is_ehci_tll_mode(omap->port_mode[2]))
-			reg |= OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
+	if (is_omap_ehci_rev1(omap)) {
+		if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_UNKNOWN)
+			reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS;
+		if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_UNKNOWN)
+			reg &= ~OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS;
+		if (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_UNKNOWN)
+			reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS;
+
+		/* Bypass the TLL module for PHY mode operation */
+		if (cpu_is_omap3430() && (omap_rev() <= OMAP3430_REV_ES2_1)) {
+			dev_dbg(omap->dev, "OMAP3 ES version <= ES2.1\n");
+			if (is_ehci_phy_mode(omap->port_mode[0]) ||
+				is_ehci_phy_mode(omap->port_mode[1]) ||
+					is_ehci_phy_mode(omap->port_mode[2]))
+				reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
+			else
+				reg |= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
+		} else {
+			dev_dbg(omap->dev, "OMAP3 ES version > ES2.1\n");
+			if (is_ehci_phy_mode(omap->port_mode[0]))
+				reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
+			else if (is_ehci_tll_mode(omap->port_mode[0]))
+				reg |= OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
+
+			if (is_ehci_phy_mode(omap->port_mode[1]))
+				reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
+			else if (is_ehci_tll_mode(omap->port_mode[1]))
+				reg |= OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
+
+			if (is_ehci_phy_mode(omap->port_mode[2]))
+				reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
+			else if (is_ehci_tll_mode(omap->port_mode[2]))
+				reg |= OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
+		}
+	} else if (is_omap_ehci_rev2(omap)) {
+		/* Clear port mode fields for PHY mode*/
+		reg &= ~OMAP4_P1_MODE_CLEAR;
+		reg &= ~OMAP4_P2_MODE_CLEAR;
+
+		if (is_ehci_tll_mode(omap->port_mode[0]))
+			reg |= OMAP4_P1_MODE_TLL;
+		else if (is_ehci_hsic_mode(omap->port_mode[0]))
+			reg |= OMAP4_P1_MODE_HSIC;
 
+		if (is_ehci_tll_mode(omap->port_mode[1]))
+			reg |= OMAP4_P2_MODE_TLL;
+		else if (is_ehci_hsic_mode(omap->port_mode[1]))
+			reg |= OMAP4_P2_MODE_HSIC;
 	}
+
 	ehci_omap_writel(omap->uhh_base, OMAP_UHH_HOSTCONFIG, reg);
 	dev_dbg(omap->dev, "UHH setup done, uhh_hostconfig=%x\n", reg);
 
@@ -468,6 +602,14 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 	return 0;
 
 err_sys_status:
+	clk_disable(omap->utmi_p2_fck);
+	clk_put(omap->utmi_p2_fck);
+	clk_disable(omap->xclk60mhsp2_ck);
+	clk_put(omap->xclk60mhsp2_ck);
+	clk_disable(omap->utmi_p1_fck);
+	clk_put(omap->utmi_p1_fck);
+	clk_disable(omap->xclk60mhsp1_ck);
+	clk_put(omap->xclk60mhsp1_ck);
 	clk_disable(omap->usbtll_ick);
 	clk_put(omap->usbtll_ick);
 
@@ -507,6 +649,8 @@ static void omap_stop_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 
 	/* Reset OMAP modules for insmod/rmmod to work */
 	ehci_omap_writel(omap->uhh_base, OMAP_UHH_SYSCONFIG,
+			is_omap_ehci_rev2(omap) ?
+			OMAP4_UHH_SYSCONFIG_SOFTRESET :
 			OMAP_UHH_SYSCONFIG_SOFTRESET);
 	while (!(ehci_omap_readl(omap->uhh_base, OMAP_UHH_SYSSTATUS)
 				& (1 << 0))) {
@@ -572,6 +716,32 @@ static void omap_stop_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 		omap->usbtll_ick = NULL;
 	}
 
+	if (is_omap_ehci_rev2(omap)) {
+		if (omap->xclk60mhsp1_ck != NULL) {
+			clk_disable(omap->xclk60mhsp1_ck);
+			clk_put(omap->xclk60mhsp1_ck);
+			omap->xclk60mhsp1_ck = NULL;
+		}
+
+		if (omap->utmi_p1_fck != NULL) {
+			clk_disable(omap->utmi_p1_fck);
+			clk_put(omap->utmi_p1_fck);
+			omap->utmi_p1_fck = NULL;
+		}
+
+		if (omap->xclk60mhsp2_ck != NULL) {
+			clk_disable(omap->xclk60mhsp2_ck);
+			clk_put(omap->xclk60mhsp2_ck);
+			omap->xclk60mhsp2_ck = NULL;
+		}
+
+		if (omap->utmi_p2_fck != NULL) {
+			clk_disable(omap->utmi_p2_fck);
+			clk_put(omap->utmi_p2_fck);
+			omap->utmi_p2_fck = NULL;
+		}
+	}
+
 	if (omap->phy_reset) {
 		if (gpio_is_valid(omap->reset_gpio_port[0]))
 			gpio_free(omap->reset_gpio_port[0]);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 11/11] arm: omap4: select USB_ARCH_HAS_EHCI
       [not found]                               ` <1290364814-4417-11-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
@ 2010-11-21 18:40                                 ` Anand Gadiyar
  2010-11-22 10:23                                 ` [PATCH 10/11] usb: ehci-omap: Add OMAP4 support Felipe Balbi
  1 sibling, 0 replies; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-21 18:40 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: Tony Lindgren, Greg KH, Anand Gadiyar

The OMAP4 has an on-chip EHCI controller. Select USB_ARCH_HAS_EHCI
to allow the EHCI driver to be built on OMAP4.

Signed-off-by: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
---
 arch/arm/mach-omap2/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index ab784bf..766727c 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -44,6 +44,7 @@ config ARCH_OMAP4
 	select ARM_GIC
 	select PL310_ERRATA_588369
 	select ARM_ERRATA_720789
+	select USB_ARCH_HAS_EHCI
 
 comment "OMAP Core Type"
 	depends on ARCH_OMAP2
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 04/11] omap: clock: add clkdev aliases for EHCI clocks
  2010-11-21 18:40         ` [PATCH 04/11] omap: clock: add clkdev aliases for EHCI clocks Anand Gadiyar
       [not found]           ` <1290364814-4417-5-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
@ 2010-11-22 10:19           ` Felipe Balbi
       [not found]             ` <20101122101913.GO2446-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
  1 sibling, 1 reply; 25+ messages in thread
From: Felipe Balbi @ 2010-11-22 10:19 UTC (permalink / raw)
  To: Anand Gadiyar; +Cc: linux-usb, linux-omap, Tony Lindgren, Greg KH

On Mon, Nov 22, 2010 at 12:10:07AM +0530, Anand Gadiyar wrote:
>Add clkdev aliases for the USBHOST and USBTLL clocks on OMAP3 and
>OMAP4, so that the driver can refer to the clocks using a common alias.
>
>This will disappear when the driver is converted to use the hwmod
>database, but until then this patch is needed.
>
>Signed-off-by: Anand Gadiyar <gadiyar@ti.com>

Tony, I need your Ack here too.

-- 
balbi

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 10/11] usb: ehci-omap: Add OMAP4 support
       [not found]                               ` <1290364814-4417-11-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
  2010-11-21 18:40                                 ` [PATCH 11/11] arm: omap4: select USB_ARCH_HAS_EHCI Anand Gadiyar
@ 2010-11-22 10:23                                 ` Felipe Balbi
  1 sibling, 0 replies; 25+ messages in thread
From: Felipe Balbi @ 2010-11-22 10:23 UTC (permalink / raw)
  To: Anand Gadiyar
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, Tony Lindgren, Greg KH,
	Keshava Munegowda

Hi,

On Mon, Nov 22, 2010 at 12:10:13AM +0530, Anand Gadiyar wrote:

missing description here.

>Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org>
>Signed-off-by: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>

After a description is added, I'll be waiting for Tony's Ack.

-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 07/11] arm: omap4: add USBHOST and related base addresses
  2010-11-21 18:40                     ` [PATCH 07/11] arm: omap4: add USBHOST and related base addresses Anand Gadiyar
  2010-11-21 18:40                       ` [PATCH 08/11] usb: omap4: add platform init code for EHCI driver Anand Gadiyar
@ 2010-11-22 10:24                       ` Felipe Balbi
  2010-11-30 18:41                         ` Tony Lindgren
  1 sibling, 1 reply; 25+ messages in thread
From: Felipe Balbi @ 2010-11-22 10:24 UTC (permalink / raw)
  To: Anand Gadiyar; +Cc: linux-usb, linux-omap, Tony Lindgren, Greg KH

On Mon, Nov 22, 2010 at 12:10:10AM +0530, Anand Gadiyar wrote:
>Add base addresses for USBHOST, USBTLL, EHCI and OHCI to
>the header file.
>
>This will disappear when the drivers are converted to use
>the hwmod database, however this patch is needed until then.
>
>Signed-off-by: Anand Gadiyar <gadiyar@ti.com>

Tony, I need an Ack here again :-p

-- 
balbi

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 00/12] usb: ehci-omap: add OMAP4 support
  2010-11-21 18:40 [PATCH 00/12] usb: ehci-omap: add OMAP4 support Anand Gadiyar
  2010-11-21 18:40 ` [PATCH 01/11] usb: ehci-omap: update clock names to be more generic Anand Gadiyar
@ 2010-11-30 17:44 ` Greg KH
  2010-11-30 18:23   ` Gadiyar, Anand
  1 sibling, 1 reply; 25+ messages in thread
From: Greg KH @ 2010-11-30 17:44 UTC (permalink / raw)
  To: Anand Gadiyar; +Cc: linux-usb, linux-omap, Tony Lindgren, Greg KH

On Mon, Nov 22, 2010 at 12:10:03AM +0530, Anand Gadiyar wrote:
> This series adds support for the EHCI controller on
> OMAP4 chips. (This enables the ethernet controller
> on the Pandaboard - finally!).
> 
> I'm sorry for the really long delay - I know this has
> been in the works for a while.
> 
> I've tested the series on an OMAP4 SDP and a Pandaboard.
> I'll be testing OMAP3 tomorrow.
> 
> Dependencies:
> One patch depends on the mux framework patches by Benoit
> - which are already in linux-next; however the series
> compiles cleanly against current Linus' tree.
> 
> What's pending:
> - OHCI support
> - Support for TLL and HSIC modes
> - Factoring out code common to ehci-omap and ohci-omap3
> - Conversion to use omap_device and the hwmod database
> - Runtime PM support

Do you want these to go in through the USB or OMAP tree?  Either is fine
with me.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 00/12] usb: ehci-omap: add OMAP4 support
  2010-11-30 17:44 ` [PATCH 00/12] usb: ehci-omap: add OMAP4 support Greg KH
@ 2010-11-30 18:23   ` Gadiyar, Anand
       [not found]     ` <AANLkTi=hr3bz6xS8DB+ShE0E_HzFGhtCqi+1NqsWQQa5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 25+ messages in thread
From: Gadiyar, Anand @ 2010-11-30 18:23 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-usb, linux-omap, Tony Lindgren, Greg KH

On Tue, Nov 30, 2010 at 11:14 PM, Greg KH <greg@kroah.com> wrote:
> On Mon, Nov 22, 2010 at 12:10:03AM +0530, Anand Gadiyar wrote:
>> This series adds support for the EHCI controller on
>> OMAP4 chips. (This enables the ethernet controller
>> on the Pandaboard - finally!).
>>
>> I'm sorry for the really long delay - I know this has
>> been in the works for a while.
>>
>> I've tested the series on an OMAP4 SDP and a Pandaboard.
>> I'll be testing OMAP3 tomorrow.
>>
>> Dependencies:
>> One patch depends on the mux framework patches by Benoit
>> - which are already in linux-next; however the series
>> compiles cleanly against current Linus' tree.
>>
>> What's pending:
>> - OHCI support
>> - Support for TLL and HSIC modes
>> - Factoring out code common to ehci-omap and ohci-omap3
>> - Conversion to use omap_device and the hwmod database
>> - Runtime PM support
>
> Do you want these to go in through the USB or OMAP tree?  Either is fine
> with me.
>
> thanks,
>
> greg k-h
>

I reposted a v2 series splitting them up into two parts - one that could
potentially go via the USB tree [1], and the other that is platform changes
that touches only mach-omap2/* files and could go via the OMAP tree [2].

The only other change is I added back patch descriptions to a couple
of patches that I missed out on in v1.

I'm okay with either option. Both series could also go via your tree if
it's okay with Tony.

- Anand

[1]<http://marc.info/?l=linux-usb&m=129105160923756&w=2>
[2] <http://marc.info/?l=linux-usb&m=129105160723737&w=2>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 00/12] usb: ehci-omap: add OMAP4 support
       [not found]     ` <AANLkTi=hr3bz6xS8DB+ShE0E_HzFGhtCqi+1NqsWQQa5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-11-30 18:30       ` Greg KH
       [not found]         ` <20101130183007.GA27476-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 25+ messages in thread
From: Greg KH @ 2010-11-30 18:30 UTC (permalink / raw)
  To: Gadiyar, Anand
  Cc: Greg KH, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, Tony Lindgren

On Tue, Nov 30, 2010 at 11:53:11PM +0530, Gadiyar, Anand wrote:
> On Tue, Nov 30, 2010 at 11:14 PM, Greg KH <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> wrote:
> > On Mon, Nov 22, 2010 at 12:10:03AM +0530, Anand Gadiyar wrote:
> >> This series adds support for the EHCI controller on
> >> OMAP4 chips. (This enables the ethernet controller
> >> on the Pandaboard - finally!).
> >>
> >> I'm sorry for the really long delay - I know this has
> >> been in the works for a while.
> >>
> >> I've tested the series on an OMAP4 SDP and a Pandaboard.
> >> I'll be testing OMAP3 tomorrow.
> >>
> >> Dependencies:
> >> One patch depends on the mux framework patches by Benoit
> >> - which are already in linux-next; however the series
> >> compiles cleanly against current Linus' tree.
> >>
> >> What's pending:
> >> - OHCI support
> >> - Support for TLL and HSIC modes
> >> - Factoring out code common to ehci-omap and ohci-omap3
> >> - Conversion to use omap_device and the hwmod database
> >> - Runtime PM support
> >
> > Do you want these to go in through the USB or OMAP tree?  Either is fine
> > with me.
> >
> > thanks,
> >
> > greg k-h
> >
> 
> I reposted a v2 series splitting them up into two parts - one that could
> potentially go via the USB tree [1], and the other that is platform changes
> that touches only mach-omap2/* files and could go via the OMAP tree [2].
> 
> The only other change is I added back patch descriptions to a couple
> of patches that I missed out on in v1.
> 
> I'm okay with either option. Both series could also go via your tree if
> it's okay with Tony.

Ah, sorry, I see that now.

Tony, it's up to you, what is easier for you?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 04/11] omap: clock: add clkdev aliases for EHCI clocks
       [not found]             ` <20101122101913.GO2446-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
@ 2010-11-30 18:40               ` Tony Lindgren
  0 siblings, 0 replies; 25+ messages in thread
From: Tony Lindgren @ 2010-11-30 18:40 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Anand Gadiyar, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, Greg KH

* Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> [101122 02:09]:
> On Mon, Nov 22, 2010 at 12:10:07AM +0530, Anand Gadiyar wrote:
> >Add clkdev aliases for the USBHOST and USBTLL clocks on OMAP3 and
> >OMAP4, so that the driver can refer to the clocks using a common alias.
> >
> >This will disappear when the driver is converted to use the hwmod
> >database, but until then this patch is needed.
> >
> >Signed-off-by: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
> 
> Tony, I need your Ack here too.

Looks good to me:

Acked-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 07/11] arm: omap4: add USBHOST and related base addresses
  2010-11-22 10:24                       ` [PATCH 07/11] arm: omap4: add USBHOST and related base addresses Felipe Balbi
@ 2010-11-30 18:41                         ` Tony Lindgren
  0 siblings, 0 replies; 25+ messages in thread
From: Tony Lindgren @ 2010-11-30 18:41 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Anand Gadiyar, linux-usb, linux-omap, Greg KH

* Felipe Balbi <balbi@ti.com> [101122 02:15]:
> On Mon, Nov 22, 2010 at 12:10:10AM +0530, Anand Gadiyar wrote:
> >Add base addresses for USBHOST, USBTLL, EHCI and OHCI to
> >the header file.
> >
> >This will disappear when the drivers are converted to use
> >the hwmod database, however this patch is needed until then.
> >
> >Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> 
> Tony, I need an Ack here again :-p

Acked-by: Tony Lindgren <tony@atomide.com>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 09/11] omap: usb: ehci: introduce HSIC mode
  2010-11-21 18:40                         ` [PATCH 09/11] omap: usb: ehci: introduce HSIC mode Anand Gadiyar
       [not found]                           ` <1290364814-4417-10-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
@ 2010-11-30 18:42                           ` Tony Lindgren
  1 sibling, 0 replies; 25+ messages in thread
From: Tony Lindgren @ 2010-11-30 18:42 UTC (permalink / raw)
  To: Anand Gadiyar; +Cc: linux-usb, linux-omap, Greg KH

* Anand Gadiyar <gadiyar@ti.com> [101121 10:30]:
> The EHCI controller in OMAP4 supports a new interface mode - HSIC.
> Add this to the list of modes supported on OMAP3.
> 
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  arch/arm/plat-omap/include/plat/usb.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
> index 59c7fe7..9b1893f 100644
> --- a/arch/arm/plat-omap/include/plat/usb.h
> +++ b/arch/arm/plat-omap/include/plat/usb.h
> @@ -11,6 +11,7 @@ enum ehci_hcd_omap_mode {
>  	EHCI_HCD_OMAP_MODE_UNKNOWN,
>  	EHCI_HCD_OMAP_MODE_PHY,
>  	EHCI_HCD_OMAP_MODE_TLL,
> +	EHCI_HCD_OMAP_MODE_HSIC,
>  };
>  
>  enum ohci_omap3_port_mode {
> -- 
> 1.7.0.4
> 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 00/12] usb: ehci-omap: add OMAP4 support
       [not found]         ` <20101130183007.GA27476-l3A5Bk7waGM@public.gmane.org>
@ 2010-11-30 18:47           ` Tony Lindgren
  2010-11-30 18:52             ` Gadiyar, Anand
  0 siblings, 1 reply; 25+ messages in thread
From: Tony Lindgren @ 2010-11-30 18:47 UTC (permalink / raw)
  To: Greg KH
  Cc: Gadiyar, Anand, Greg KH, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

* Greg KH <gregkh-l3A5Bk7waGM@public.gmane.org> [101130 10:22]:
> On Tue, Nov 30, 2010 at 11:53:11PM +0530, Gadiyar, Anand wrote:
> > 
> > The only other change is I added back patch descriptions to a couple
> > of patches that I missed out on in v1.
> > 
> > I'm okay with either option. Both series could also go via your tree if
> > it's okay with Tony.
> 
> Ah, sorry, I see that now.
> 
> Tony, it's up to you, what is easier for you?

I prefer to merge it via linux-usb. Just replied to the arch/arm/*omap*/
related patches in this series with my ack.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 00/12] usb: ehci-omap: add OMAP4 support
  2010-11-30 18:47           ` Tony Lindgren
@ 2010-11-30 18:52             ` Gadiyar, Anand
  2010-11-30 20:30               ` Greg KH
  0 siblings, 1 reply; 25+ messages in thread
From: Gadiyar, Anand @ 2010-11-30 18:52 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Greg KH, Greg KH, linux-usb, linux-omap

On Wed, Dec 1, 2010 at 12:17 AM, Tony Lindgren <tony@atomide.com> wrote:
> * Greg KH <gregkh@suse.de> [101130 10:22]:
>> On Tue, Nov 30, 2010 at 11:53:11PM +0530, Gadiyar, Anand wrote:
>> >
>> > The only other change is I added back patch descriptions to a couple
>> > of patches that I missed out on in v1.
>> >
>> > I'm okay with either option. Both series could also go via your tree if
>> > it's okay with Tony.
>>
>> Ah, sorry, I see that now.
>>
>> Tony, it's up to you, what is easier for you?
>
> I prefer to merge it via linux-usb. Just replied to the arch/arm/*omap*/
> related patches in this series with my ack.
>

Great, thanks!

Greg,

If it's easier for you, I can set up a branch for you to pull.

Otherwise, the two series I posted yesterday should apply
cleanly on top of your usb-next branch.

- Anand

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 00/12] usb: ehci-omap: add OMAP4 support
  2010-11-30 18:52             ` Gadiyar, Anand
@ 2010-11-30 20:30               ` Greg KH
  2010-11-30 22:04                 ` Anand Gadiyar
  0 siblings, 1 reply; 25+ messages in thread
From: Greg KH @ 2010-11-30 20:30 UTC (permalink / raw)
  To: Gadiyar, Anand; +Cc: Tony Lindgren, Greg KH, linux-usb, linux-omap

On Wed, Dec 01, 2010 at 12:22:07AM +0530, Gadiyar, Anand wrote:
> On Wed, Dec 1, 2010 at 12:17 AM, Tony Lindgren <tony@atomide.com> wrote:
> > * Greg KH <gregkh@suse.de> [101130 10:22]:
> >> On Tue, Nov 30, 2010 at 11:53:11PM +0530, Gadiyar, Anand wrote:
> >> >
> >> > The only other change is I added back patch descriptions to a couple
> >> > of patches that I missed out on in v1.
> >> >
> >> > I'm okay with either option. Both series could also go via your tree if
> >> > it's okay with Tony.
> >>
> >> Ah, sorry, I see that now.
> >>
> >> Tony, it's up to you, what is easier for you?
> >
> > I prefer to merge it via linux-usb. Just replied to the arch/arm/*omap*/
> > related patches in this series with my ack.
> >
> 
> Great, thanks!
> 
> Greg,
> 
> If it's easier for you, I can set up a branch for you to pull.
> 
> Otherwise, the two series I posted yesterday should apply
> cleanly on top of your usb-next branch.

A branch is nice if you have one, otherwise I can just apply these
as-is.  Let me know which you want me to do.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 00/12] usb: ehci-omap: add OMAP4 support
  2010-11-30 20:30               ` Greg KH
@ 2010-11-30 22:04                 ` Anand Gadiyar
  0 siblings, 0 replies; 25+ messages in thread
From: Anand Gadiyar @ 2010-11-30 22:04 UTC (permalink / raw)
  To: Greg KH; +Cc: Tony Lindgren, Greg KH, linux-usb, linux-omap

On 12/1/2010 2:00 AM, Greg KH wrote:
> On Wed, Dec 01, 2010 at 12:22:07AM +0530, Gadiyar, Anand wrote:
>> On Wed, Dec 1, 2010 at 12:17 AM, Tony Lindgren <tony@atomide.com> wrote:
>>> * Greg KH <gregkh@suse.de> [101130 10:22]:
>>>> On Tue, Nov 30, 2010 at 11:53:11PM +0530, Gadiyar, Anand wrote:
>>>>>
>>>>> The only other change is I added back patch descriptions to a couple
>>>>> of patches that I missed out on in v1.
>>>>>
>>>>> I'm okay with either option. Both series could also go via your tree if
>>>>> it's okay with Tony.
>>>>
>>>> Ah, sorry, I see that now.
>>>>
>>>> Tony, it's up to you, what is easier for you?
>>>
>>> I prefer to merge it via linux-usb. Just replied to the arch/arm/*omap*/
>>> related patches in this series with my ack.
>>>
>>
>> Great, thanks!
>>
>> Greg,
>>
>> If it's easier for you, I can set up a branch for you to pull.
>>
>> Otherwise, the two series I posted yesterday should apply
>> cleanly on top of your usb-next branch.
> 
> A branch is nice if you have one, otherwise I can just apply these
> as-is.  Let me know which you want me to do.

I'll set up a branch then, based on your usb-next branch,
with Tony and Paul's acks added.

I'll send a pull request in a while.

- Anand

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2010-11-30 22:04 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-21 18:40 [PATCH 00/12] usb: ehci-omap: add OMAP4 support Anand Gadiyar
2010-11-21 18:40 ` [PATCH 01/11] usb: ehci-omap: update clock names to be more generic Anand Gadiyar
     [not found]   ` <1290364814-4417-2-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
2010-11-21 18:40     ` [PATCH 02/11] usb: ehci-omap: don't hard-code TLL channel count Anand Gadiyar
2010-11-21 18:40       ` [PATCH 03/11] usb: ehci: introduce CONFIG_USB_EHCI_HCD_OMAP Anand Gadiyar
2010-11-21 18:40         ` [PATCH 04/11] omap: clock: add clkdev aliases for EHCI clocks Anand Gadiyar
     [not found]           ` <1290364814-4417-5-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
2010-11-21 18:40             ` [PATCH 05/11] usb: ehci-omap: use clkdev aliases for functional clocks Anand Gadiyar
     [not found]               ` <1290364814-4417-6-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
2010-11-21 18:40                 ` [PATCH 06/11] usb: ehci-omap: add helpers for checking port mode Anand Gadiyar
     [not found]                   ` <1290364814-4417-7-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
2010-11-21 18:40                     ` [PATCH 07/11] arm: omap4: add USBHOST and related base addresses Anand Gadiyar
2010-11-21 18:40                       ` [PATCH 08/11] usb: omap4: add platform init code for EHCI driver Anand Gadiyar
2010-11-21 18:40                         ` [PATCH 09/11] omap: usb: ehci: introduce HSIC mode Anand Gadiyar
     [not found]                           ` <1290364814-4417-10-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
2010-11-21 18:40                             ` [PATCH 10/11] usb: ehci-omap: Add OMAP4 support Anand Gadiyar
     [not found]                               ` <1290364814-4417-11-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
2010-11-21 18:40                                 ` [PATCH 11/11] arm: omap4: select USB_ARCH_HAS_EHCI Anand Gadiyar
2010-11-22 10:23                                 ` [PATCH 10/11] usb: ehci-omap: Add OMAP4 support Felipe Balbi
2010-11-30 18:42                           ` [PATCH 09/11] omap: usb: ehci: introduce HSIC mode Tony Lindgren
2010-11-22 10:24                       ` [PATCH 07/11] arm: omap4: add USBHOST and related base addresses Felipe Balbi
2010-11-30 18:41                         ` Tony Lindgren
2010-11-22 10:19           ` [PATCH 04/11] omap: clock: add clkdev aliases for EHCI clocks Felipe Balbi
     [not found]             ` <20101122101913.GO2446-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2010-11-30 18:40               ` Tony Lindgren
2010-11-30 17:44 ` [PATCH 00/12] usb: ehci-omap: add OMAP4 support Greg KH
2010-11-30 18:23   ` Gadiyar, Anand
     [not found]     ` <AANLkTi=hr3bz6xS8DB+ShE0E_HzFGhtCqi+1NqsWQQa5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-30 18:30       ` Greg KH
     [not found]         ` <20101130183007.GA27476-l3A5Bk7waGM@public.gmane.org>
2010-11-30 18:47           ` Tony Lindgren
2010-11-30 18:52             ` Gadiyar, Anand
2010-11-30 20:30               ` Greg KH
2010-11-30 22:04                 ` Anand Gadiyar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox