All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Enable pxa310 usb otg port host mode.
@ 2010-06-02  7:40 Igor Grinberg
  2010-06-02  7:40 ` [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver Igor Grinberg
                   ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Igor Grinberg @ 2010-06-02  7:40 UTC (permalink / raw)
  To: linux-arm-kernel

This patch series extends the existing usb ulpi generic driver
with support for Function and Interface control of the ULPI PHYs,
adds support for SMSC USB3319 ulpi phy,
implement the pxa310 specific ulpi functionality and make pxa specific ohci
implementation aware of pxa310 usb otg port host mode.

Igor Grinberg (5):
  usb/otg/ulpi: extend the generic ulpi driver.
  usb/otg/ulpi: add support for SMSC USB3319 ulpi phy.
  [ARM] pxa: add PXA310 specific ULPI implementation
  [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host
    mode.
  [ARM] pxa/cm-x300: enable USB host port 2 on CM-X300 with PXA310 cpu.

 arch/arm/mach-mx2/mach-pca100.c              |   10 +-
 arch/arm/mach-mx3/mach-armadillo5x0.c        |   10 +-
 arch/arm/mach-mx3/mach-mx31lite.c            |    5 +-
 arch/arm/mach-mx3/mach-mx31moboard.c         |    5 +-
 arch/arm/mach-mx3/mach-pcm037.c              |   10 +-
 arch/arm/mach-mx3/mach-pcm043.c              |    5 +-
 arch/arm/mach-pxa/Kconfig                    |    4 +
 arch/arm/mach-pxa/Makefile                   |    1 +
 arch/arm/mach-pxa/cm-x300.c                  |  102 ++++++++++++++
 arch/arm/mach-pxa/include/mach/ohci.h        |    3 +
 arch/arm/mach-pxa/include/mach/pxa310-ulpi.h |   19 +++
 arch/arm/mach-pxa/include/mach/regs-u2d.h    |    2 +
 arch/arm/mach-pxa/pxa310-ulpi.c              |  110 +++++++++++++++
 drivers/usb/host/ohci-pxa27x.c               |  183 ++++++++++++++++++++++++++
 drivers/usb/otg/Kconfig                      |    2 -
 drivers/usb/otg/ulpi.c                       |   65 ++++++++-
 include/linux/usb/ulpi.h                     |   25 ++++-
 17 files changed, 542 insertions(+), 19 deletions(-)
 create mode 100644 arch/arm/mach-pxa/include/mach/pxa310-ulpi.h
 create mode 100644 arch/arm/mach-pxa/pxa310-ulpi.c

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

* [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver.
  2010-06-02  7:40 [PATCH 0/5] Enable pxa310 usb otg port host mode Igor Grinberg
@ 2010-06-02  7:40 ` Igor Grinberg
  2010-06-02  7:40   ` [PATCH 2/5] usb/otg/ulpi: add support for SMSC USB3319 ulpi phy Igor Grinberg
                     ` (2 more replies)
  2010-06-02  8:29 ` [PATCH 0/5] Enable pxa310 usb otg port host mode Eric Miao
  2010-06-09 11:49 ` Mike Rapoport
  2 siblings, 3 replies; 34+ messages in thread
From: Igor Grinberg @ 2010-06-02  7:40 UTC (permalink / raw)
  To: linux-arm-kernel

This patch extends the generic ulpi driver with support for
Function and Interface control of upli phy.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
 arch/arm/mach-mx2/mach-pca100.c       |   10 ++++-
 arch/arm/mach-mx3/mach-armadillo5x0.c |   10 ++++-
 arch/arm/mach-mx3/mach-mx31lite.c     |    5 ++-
 arch/arm/mach-mx3/mach-mx31moboard.c  |    5 ++-
 arch/arm/mach-mx3/mach-pcm037.c       |   10 ++++-
 arch/arm/mach-mx3/mach-pcm043.c       |    5 ++-
 drivers/usb/otg/Kconfig               |    2 -
 drivers/usb/otg/ulpi.c                |   64 +++++++++++++++++++++++++++++----
 include/linux/usb/ulpi.h              |   25 ++++++++++++-
 9 files changed, 117 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-mx2/mach-pca100.c b/arch/arm/mach-mx2/mach-pca100.c
index 778fff2..0f2ece0 100644
--- a/arch/arm/mach-mx2/mach-pca100.c
+++ b/arch/arm/mach-mx2/mach-pca100.c
@@ -356,13 +356,19 @@ static void __init pca100_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+						USB_OTG_DRV_VBUS |
+						USB_OTG_DRV_VBUS_EXT,
+						ULPI_IC_DEFAULT,
+						ULPI_FC_DEFAULT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
 
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+					  USB_OTG_DRV_VBUS |
+					  USB_OTG_DRV_VBUS_EXT,
+					  ULPI_IC_DEFAULT,
+					  ULPI_FC_DEFAULT);
 
 	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 #endif
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c
index 5f72ec9..81904d4 100644
--- a/arch/arm/mach-mx3/mach-armadillo5x0.c
+++ b/arch/arm/mach-mx3/mach-armadillo5x0.c
@@ -552,9 +552,15 @@ static void __init armadillo5x0_init(void)
 	/* USB */
 #if defined(CONFIG_USB_ULPI)
 	usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-			USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+					   USB_OTG_DRV_VBUS |
+					   USB_OTG_DRV_VBUS_EXT,
+					   ULPI_IC_DEFAULT,
+					   ULPI_FC_DEFAULT);
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-			USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+					  USB_OTG_DRV_VBUS |
+					  USB_OTG_DRV_VBUS_EXT,
+					  ULPI_IC_DEFAULT,
+					  ULPI_FC_DEFAULT);
 
 	mxc_register_device(&mxc_otg_host, &usbotg_pdata);
 	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
diff --git a/arch/arm/mach-mx3/mach-mx31lite.c b/arch/arm/mach-mx3/mach-mx31lite.c
index 2b6d114..9413be4 100644
--- a/arch/arm/mach-mx3/mach-mx31lite.c
+++ b/arch/arm/mach-mx3/mach-mx31lite.c
@@ -261,7 +261,10 @@ static void __init mxc_board_init(void)
 #if defined(CONFIG_USB_ULPI)
 	/* USB */
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+					  USB_OTG_DRV_VBUS |
+					  USB_OTG_DRV_VBUS_EXT,
+					  ULPI_IC_DEFAULT,
+					  ULPI_FC_DEFAULT);
 
 	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 #endif
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c
index fccb920..620f21a 100644
--- a/arch/arm/mach-mx3/mach-mx31moboard.c
+++ b/arch/arm/mach-mx3/mach-mx31moboard.c
@@ -391,7 +391,10 @@ static struct mxc_usbh_platform_data usbh2_pdata = {
 static int __init moboard_usbh2_init(void)
 {
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-			USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+					  USB_OTG_DRV_VBUS |
+					  USB_OTG_DRV_VBUS_EXT,
+					  ULPI_IC_DEFAULT,
+					  ULPI_FC_DEFAULT);
 
 	return mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 }
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c
index 2df1ec5..33471c4 100644
--- a/arch/arm/mach-mx3/mach-pcm037.c
+++ b/arch/arm/mach-mx3/mach-pcm037.c
@@ -657,13 +657,19 @@ static void __init mxc_board_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+						USB_OTG_DRV_VBUS |
+						USB_OTG_DRV_VBUS_EXT,
+						ULPI_IC_DEFAULT,
+						ULPI_FC_DEFAULT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
 
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+					  USB_OTG_DRV_VBUS |
+					  USB_OTG_DRV_VBUS_EXT,
+					  ULPI_IC_DEFAULT,
+					  ULPI_FC_DEFAULT);
 
 	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 #endif
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c
index 1bf1ec2..63d8719 100644
--- a/arch/arm/mach-mx3/mach-pcm043.c
+++ b/arch/arm/mach-mx3/mach-pcm043.c
@@ -379,7 +379,10 @@ static void __init mxc_board_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+						USB_OTG_DRV_VBUS |
+						USB_OTG_DRV_VBUS_EXT,
+						ULPI_IC_DEFAULT,
+						ULPI_FC_DEFAULT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
index 3d2d3e5..3b12895 100644
--- a/drivers/usb/otg/Kconfig
+++ b/drivers/usb/otg/Kconfig
@@ -49,8 +49,6 @@ config USB_ULPI
 	  Enable this to support ULPI connected USB OTG transceivers which
 	  are likely found on embedded boards.
 
-	  The only chip currently supported is NXP's ISP1504
-
 config TWL4030_USB
 	tristate "TWL4030 USB Transceiver Driver"
 	depends on TWL4030_CORE && REGULATOR_TWL4030
diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c
index 9010225..0e7a826 100644
--- a/drivers/usb/otg/ulpi.c
+++ b/drivers/usb/otg/ulpi.c
@@ -34,6 +34,7 @@
 #define ULPI_VID_HIGH        0x01    /* Vendor ID high */
 #define ULPI_PID_LOW         0x02    /* Product ID low */
 #define ULPI_PID_HIGH        0x03    /* Product ID high */
+#define ULPI_FUNCTL          0x04    /* Function Control */
 #define ULPI_ITFCTL          0x07    /* Interface Control */
 #define ULPI_OTGCTL          0x0A    /* OTG Control */
 
@@ -60,25 +61,51 @@ static unsigned int ulpi_ids[] = {
 	ULPI_ID(0x04cc, 0x1504),	/* NXP ISP1504 */
 };
 
-static int ulpi_set_flags(struct otg_transceiver *otg)
+static int ulpi_set_otg_flags(struct otg_transceiver *otg)
 {
+	unsigned int otg_flags = otg->flags & 0xff;
 	unsigned int flags = 0;
 
-	if (otg->flags & USB_OTG_PULLUP_ID)
+	if (otg_flags & USB_OTG_PULLUP_ID)
 		flags |= ID_PULL_UP;
 
-	if (otg->flags & USB_OTG_PULLDOWN_DM)
+	if (otg_flags & USB_OTG_PULLDOWN_DM)
 		flags |= DM_PULL_DOWN;
 
-	if (otg->flags & USB_OTG_PULLDOWN_DP)
+	if (otg_flags & USB_OTG_PULLDOWN_DP)
 		flags |= DP_PULL_DOWN;
 
-	if (otg->flags & USB_OTG_EXT_VBUS_INDICATOR)
+	if (otg_flags & USB_OTG_EXT_VBUS_INDICATOR)
 		flags |= USE_EXT_VBUS_IND;
 
 	return otg_io_write(otg, flags, ULPI_OTGCTL + ULPI_REG_SET);
 }
 
+static int ulpi_set_fc_flags(struct otg_transceiver *otg)
+{
+	unsigned int fc_flags = (otg->flags >> 16) & 0xff;
+
+	/*
+	 * Bit 6 in Function Control Register is SuspendM
+	 * 1 - Powered.
+	 * 0 - Suspend.
+	 */
+	fc_flags |= (1 << 6);
+
+	return otg_io_write(otg, fc_flags, ULPI_FUNCTL + ULPI_REG_SET);
+}
+
+static inline int ulpi_set_flags(struct otg_transceiver *otg)
+{
+	int ret;
+
+	ret = ulpi_set_otg_flags(otg);
+	if (ret)
+		return ret;
+
+	return ulpi_set_fc_flags(otg);
+}
+
 static int ulpi_init(struct otg_transceiver *otg)
 {
 	int i, vid, pid;
@@ -98,6 +125,28 @@ static int ulpi_init(struct otg_transceiver *otg)
 	return -ENODEV;
 }
 
+static int ulpi_set_host(struct otg_transceiver *otg, struct usb_bus *host)
+{
+	unsigned int ic_flags = (otg->flags >> 8) & 0xff;
+	unsigned int ic = ic_flags & ~0x7;
+
+	if (!host) {
+		otg->host = NULL;
+		return 0;
+	}
+
+	otg->host = host;
+
+	if (ic_flags & ULPI_IC_3PIN)
+		ic |= ULPI_IC_3PIN;
+	else if (ic_flags & ULPI_IC_CARKIT)
+		ic |= ULPI_IC_CARKIT;
+	else
+		ic |= ULPI_IC_6PIN;
+
+	return otg_io_write(otg, ic, ULPI_ITFCTL + ULPI_REG_SET);
+}
+
 static int ulpi_set_vbus(struct otg_transceiver *otg, bool on)
 {
 	unsigned int flags = otg_io_read(otg, ULPI_OTGCTL);
@@ -117,7 +166,7 @@ static int ulpi_set_vbus(struct otg_transceiver *otg, bool on)
 
 struct otg_transceiver *
 otg_ulpi_create(struct otg_io_access_ops *ops,
-		unsigned int flags)
+		u8 otg_flags, u8 ic_flags, u8 fc_flags)
 {
 	struct otg_transceiver *otg;
 
@@ -126,9 +175,10 @@ otg_ulpi_create(struct otg_io_access_ops *ops,
 		return NULL;
 
 	otg->label	= "ULPI";
-	otg->flags	= flags;
+	otg->flags	= otg_flags | (ic_flags << 8) | (fc_flags << 16);
 	otg->io_ops	= ops;
 	otg->init	= ulpi_init;
+	otg->set_host	= ulpi_set_host;
 	otg->set_vbus	= ulpi_set_vbus;
 
 	return otg;
diff --git a/include/linux/usb/ulpi.h b/include/linux/usb/ulpi.h
index 20675c6..8318067 100644
--- a/include/linux/usb/ulpi.h
+++ b/include/linux/usb/ulpi.h
@@ -1,7 +1,30 @@
 #ifndef __LINUX_USB_ULPI_H
 #define __LINUX_USB_ULPI_H
 
+/* ULPI Function Control Register bits */
+#define ULPI_FC_HS	0		/* Enable HS tcvr */
+#define ULPI_FC_FS	(0x1 << 0)	/* Enable FS tcvr */
+#define ULPI_FC_LS	(0x2 << 0)	/* Enable LS tcvr */
+#define ULPI_FC_FS_LS	(0x3 << 0)	/* Enable FS tcvr for LS packets */
+#define ULPI_FC_TRM_SEL	(0x1 << 2)	/* Internal pullup and HS termination */
+#define ULPI_FC_NODRV	(0x1 << 3)	/* Non-Driving Operation */
+#define ULPI_FC_NONRZI	(0x1 << 4)	/* Disable bit-stuff and NRZI encode */
+#define ULPI_FC_RESET	(0x1 << 5)	/* Reset the UTMI core */
+#define ULPI_FC_DEFAULT	0x41		/* Function Control Register Default */
+
+
+/* ULPI Interface Register bits */
+#define ULPI_IC_6PIN	(1 << 0)	/* XCVR 6 serial pin mode */
+#define ULPI_IC_3PIN	(1 << 1)	/* XCVR 3 serial pin mode */
+#define ULPI_IC_CARKIT	(1 << 2)	/* Carkit mode */
+#define ULPI_IC_CLKSPND	(1 << 3)	/* Active low clock suspend */
+#define ULPI_IC_AUTORES	(1 << 4)	/* PHY auto transmit resume signal */
+#define ULPI_IC_VBUSINV	(1 << 5)	/* Invert the external VBUS indicator */
+#define ULPI_IC_INDPT	(1 << 6)	/* Indicator Pass Through */
+#define ULPI_IC_DISPRT	(1 << 7)	/* Interface Protect Disable */
+#define ULPI_IC_DEFAULT	0x0		/* Interface Control Register Default */
+
 struct otg_transceiver *otg_ulpi_create(struct otg_io_access_ops *ops,
-					unsigned int flags);
+					u8 fc_flags, u8 ic_flags, u8 otg_flags);
 
 #endif /* __LINUX_USB_ULPI_H */
-- 
1.6.4.4

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

* [PATCH 2/5] usb/otg/ulpi: add support for SMSC USB3319 ulpi phy.
  2010-06-02  7:40 ` [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver Igor Grinberg
@ 2010-06-02  7:40   ` Igor Grinberg
  2010-06-02  7:40     ` [PATCH 3/5] [ARM] pxa: add PXA310 specific ULPI implementation Igor Grinberg
  2010-06-12  9:35   ` [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver Eric Miao
  2010-08-13 10:21     ` Uwe Kleine-König
  2 siblings, 1 reply; 34+ messages in thread
From: Igor Grinberg @ 2010-06-02  7:40 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
 drivers/usb/otg/ulpi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c
index 0e7a826..99756ab 100644
--- a/drivers/usb/otg/ulpi.c
+++ b/drivers/usb/otg/ulpi.c
@@ -59,6 +59,7 @@
 /* ULPI hardcoded IDs, used for probing */
 static unsigned int ulpi_ids[] = {
 	ULPI_ID(0x04cc, 0x1504),	/* NXP ISP1504 */
+	ULPI_ID(0x0424, 0x0006),        /* SMSC USB3319 */
 };
 
 static int ulpi_set_otg_flags(struct otg_transceiver *otg)
-- 
1.6.4.4

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

* [PATCH 3/5] [ARM] pxa: add PXA310 specific ULPI implementation
  2010-06-02  7:40   ` [PATCH 2/5] usb/otg/ulpi: add support for SMSC USB3319 ulpi phy Igor Grinberg
@ 2010-06-02  7:40     ` Igor Grinberg
  2010-06-02  7:40       ` [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode Igor Grinberg
  0 siblings, 1 reply; 34+ messages in thread
From: Igor Grinberg @ 2010-06-02  7:40 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
 arch/arm/mach-pxa/Kconfig                    |    4 +
 arch/arm/mach-pxa/Makefile                   |    1 +
 arch/arm/mach-pxa/include/mach/pxa310-ulpi.h |   19 +++++
 arch/arm/mach-pxa/pxa310-ulpi.c              |  110 ++++++++++++++++++++++++++
 4 files changed, 134 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-pxa/include/mach/pxa310-ulpi.h
 create mode 100644 arch/arm/mach-pxa/pxa310-ulpi.c

diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 5b6ee46..3c54cf0 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -616,6 +616,7 @@ config CPU_PXA300
 config CPU_PXA310
 	bool
 	select CPU_PXA300
+	select PXA310_ULPI if USB_ULPI
 	help
 	  PXA310 (codename Monahans-LV)
 
@@ -681,4 +682,7 @@ config PXA_HAVE_BOARD_IRQS
 config PXA_HAVE_ISA_IRQS
 	bool
 
+config PXA310_ULPI
+	bool
+
 endif
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index 86bc87b..4ab51dd 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -21,6 +21,7 @@ obj-$(CONFIG_PXA25x)		+= mfp-pxa2xx.o pxa2xx.o pxa25x.o
 obj-$(CONFIG_PXA27x)		+= mfp-pxa2xx.o pxa2xx.o pxa27x.o
 obj-$(CONFIG_PXA3xx)		+= mfp-pxa3xx.o pxa3xx.o smemc.o
 obj-$(CONFIG_CPU_PXA300)	+= pxa300.o
+obj-$(CONFIG_PXA310_ULPI)	+= pxa310-ulpi.o
 obj-$(CONFIG_CPU_PXA320)	+= pxa320.o
 obj-$(CONFIG_CPU_PXA930)	+= pxa930.o
 
diff --git a/arch/arm/mach-pxa/include/mach/pxa310-ulpi.h b/arch/arm/mach-pxa/include/mach/pxa310-ulpi.h
new file mode 100644
index 0000000..b0f2062
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pxa310-ulpi.h
@@ -0,0 +1,19 @@
+/*
+ * PXA310 ULPI USB host header file.
+ *
+ * Copyright (C) 2010 CompuLab Ltd.
+ *
+ * Igor Grinberg <grinberg@compulab.co.il>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __PXA310_ULPI__
+#define __PXA310_ULPI__
+
+#include <linux/usb/ulpi.h>
+
+extern struct otg_io_access_ops pxa310_ulpi_access_ops;
+
+#endif /* __PXA310_ULPI__ */
diff --git a/arch/arm/mach-pxa/pxa310-ulpi.c b/arch/arm/mach-pxa/pxa310-ulpi.c
new file mode 100644
index 0000000..14b6a2e
--- /dev/null
+++ b/arch/arm/mach-pxa/pxa310-ulpi.c
@@ -0,0 +1,110 @@
+/*
+ * linux/arch/arm/mach-pxa/pxa310-ulpi.c
+ *
+ * PXA310 ULPI implementation.
+ *
+ * Copyright (C) 2010 CompuLab Ltd.
+ *
+ * Igor Grinberg <grinberg@compulab.co.il>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/delay.h>
+#include <linux/clk.h>
+#include <linux/usb/otg.h>
+
+#include <mach/regs-u2d.h>
+#include <mach/pxa310-ulpi.h>
+
+#define U2DOTGUCR_ADDR_S	(16)
+#define U2DOTGUCR_WDATA_S	(8)
+
+enum u2d_phy_mode {
+	SYNCH		= 0,
+	CARKIT		= (1 << 0),
+	SER_3PIN	= (1 << 1),
+	SER_6PIN	= (1 << 2),
+	LOWPOWER	= (1 << 3),
+};
+
+static inline u32 u2d_readl(struct otg_transceiver *otg, u32 off)
+{
+	void __iomem *u2d_mmio_base = otg->io_priv;
+
+	return __raw_readl(u2d_mmio_base + off);
+}
+
+static inline void u2d_writel(struct otg_transceiver *otg, u32 off, u32 val)
+{
+	void __iomem *u2d_mmio_base = otg->io_priv;
+
+	__raw_writel(val, u2d_mmio_base + off);
+}
+
+static inline enum u2d_phy_mode ulpi_get_phymode(struct otg_transceiver *otg)
+{
+	return (u2d_readl(otg, U2DOTGUSR) & 0xF0000000) >> 28;
+}
+
+static int ulpi_poll(struct otg_transceiver *otg)
+{
+	int timeout = 50000;
+
+	while (timeout--) {
+		if (!(u2d_readl(otg, U2DOTGUCR) & U2DOTGUCR_RUN))
+			return 0;
+
+		cpu_relax();
+	}
+
+	pr_warning("%s: ULPI access timed out!\n", __func__);
+
+	return -ETIMEDOUT;
+}
+
+static int ulpi_read(struct otg_transceiver *otg, u32 reg)
+{
+	int err;
+
+	if (ulpi_get_phymode(otg)) {
+		pr_warning("%s: PHY is not in SYNCH mode!\n", __func__);
+		return -EBUSY;
+	}
+
+	u2d_writel(otg, U2DOTGUCR,
+		   U2DOTGUCR_RUN | U2DOTGUCR_RNW | (reg << U2DOTGUCR_ADDR_S));
+	msleep(5);
+
+	err = ulpi_poll(otg);
+	if (err)
+		return err;
+
+	return u2d_readl(otg, U2DOTGUCR) & U2DOTGUCR_RDATA;
+}
+
+static int ulpi_write(struct otg_transceiver *otg, u32 val, u32 reg)
+{
+	if (ulpi_get_phymode(otg)) {
+		pr_warning("%s: PHY is not in SYNCH mode!\n", __func__);
+		return -EBUSY;
+	}
+
+	u2d_writel(otg, U2DOTGUCR, U2DOTGUCR_RUN | (reg << U2DOTGUCR_ADDR_S) |
+		   (val << U2DOTGUCR_WDATA_S));
+	msleep(5);
+
+	return ulpi_poll(otg);
+}
+
+struct otg_io_access_ops pxa310_ulpi_access_ops = {
+	.read	= ulpi_read,
+	.write	= ulpi_write,
+};
+EXPORT_SYMBOL_GPL(pxa310_ulpi_access_ops);
-- 
1.6.4.4

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

* [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode.
  2010-06-02  7:40     ` [PATCH 3/5] [ARM] pxa: add PXA310 specific ULPI implementation Igor Grinberg
@ 2010-06-02  7:40       ` Igor Grinberg
  2010-06-02  7:40         ` [PATCH 5/5] [ARM] pxa/cm-x300: enable USB host port 2 on CM-X300 with PXA310 cpu Igor Grinberg
  2010-06-12 11:48         ` [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode Eric Miao
  0 siblings, 2 replies; 34+ messages in thread
From: Igor Grinberg @ 2010-06-02  7:40 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
 arch/arm/mach-pxa/include/mach/ohci.h     |    3 +
 arch/arm/mach-pxa/include/mach/regs-u2d.h |    2 +
 drivers/usb/host/ohci-pxa27x.c            |  183 +++++++++++++++++++++++++++++
 3 files changed, 188 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/include/mach/ohci.h b/arch/arm/mach-pxa/include/mach/ohci.h
index 95b6e2a..a543d0f 100644
--- a/arch/arm/mach-pxa/include/mach/ohci.h
+++ b/arch/arm/mach-pxa/include/mach/ohci.h
@@ -29,6 +29,9 @@ struct pxaohci_platform_data {
 #define PMM_PERPORT_MODE       3
 
 	int power_budget;
+
+	struct otg_transceiver *otg;
+	unsigned long ulpi_mode;
 };
 
 extern void pxa_set_ohci_info(struct pxaohci_platform_data *info);
diff --git a/arch/arm/mach-pxa/include/mach/regs-u2d.h b/arch/arm/mach-pxa/include/mach/regs-u2d.h
index c15c0c5..82597e7 100644
--- a/arch/arm/mach-pxa/include/mach/regs-u2d.h
+++ b/arch/arm/mach-pxa/include/mach/regs-u2d.h
@@ -3,6 +3,8 @@
 
 #include <mach/bitfield.h>
 
+#define U2D_PHYS_BASE   0x54100000
+
 /*
  * USB2 device controller registers and bits definitions
  */
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index a18debd..c4aa239 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -24,6 +24,8 @@
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <mach/ohci.h>
+#include <mach/regs-u2d.h>
+#include <mach/pxa310-ulpi.h>
 
 /*
  * UHC: USB Host Controller (OHCI-like) register definitions
@@ -104,10 +106,126 @@ struct pxa27x_ohci {
 	struct device	*dev;
 	struct clk	*clk;
 	void __iomem	*mmio_base;
+
+	struct clk	*u2d_clk;
+	void __iomem	*u2d_mmio_base;
 };
 
 #define to_pxa27x_ohci(hcd)	(struct pxa27x_ohci *)hcd_to_ohci(hcd)
 
+#if defined(CONFIG_PXA310_ULPI)
+static void pxa310_setup_otg_hc(struct pxa27x_ohci *ohci)
+{
+	void __iomem *u2d_mmio_base = ohci->u2d_mmio_base;
+	u32 u2dotgcr;
+
+	u2dotgcr = __raw_readl(u2d_mmio_base + U2DOTGCR);
+	u2dotgcr |= U2DOTGCR_ULAF | U2DOTGCR_UTMID;
+	u2dotgcr &= ~(U2DOTGCR_SMAF | U2DOTGCR_CKAF);
+	__raw_writel(u2dotgcr, u2d_mmio_base + U2DOTGCR);
+	msleep(5);
+	__raw_writel(u2dotgcr | U2DOTGCR_ULE, u2d_mmio_base + U2DOTGCR);
+	msleep(5);
+	__raw_writel(__raw_readl(u2d_mmio_base + U2DOTGICR) & ~0x37F7F,
+		     u2d_mmio_base + U2DOTGICR);
+}
+
+static void pxa310_otg_transceiver_rtsm(struct pxa27x_ohci *ohci)
+{
+	void __iomem *u2d_mmio_base = ohci->u2d_mmio_base;
+	u32 u2dotgcr;
+
+	/* put PHY to sync mode */
+	u2dotgcr = __raw_readl(u2d_mmio_base + U2DOTGCR);
+	u2dotgcr |=  U2DOTGCR_RTSM | U2DOTGCR_UTMID;
+	__raw_writel(u2dotgcr, u2d_mmio_base + U2DOTGCR);
+	msleep(10);
+	/* setup OTG sync mode */
+	u2dotgcr = __raw_readl(u2d_mmio_base + U2DOTGCR);
+	u2dotgcr |= U2DOTGCR_ULAF;
+	u2dotgcr &= ~(U2DOTGCR_SMAF | U2DOTGCR_CKAF);
+	__raw_writel(u2dotgcr, u2d_mmio_base + U2DOTGCR);
+}
+
+static int start_otg_transceiver(struct pxa27x_ohci *ohci,
+				 struct otg_transceiver *otg)
+{
+	int err;
+
+	err = otg_init(otg);
+	if (err) {
+		pr_err("OTG transceiver init failed");
+		return err;
+	}
+
+	err = otg_set_vbus(otg, 1);
+	if (err) {
+		pr_err("OTG transceiver VBUS set failed");
+		return err;
+	}
+
+	err = otg_set_host(otg, &ohci_to_hcd(&ohci->ohci)->self);
+	if (err)
+		pr_err("OTG transceiver Host mode set failed");
+
+	return err;
+}
+
+static int pxa310_start_otg_hc(struct pxa27x_ohci *ohci,
+			       struct pxaohci_platform_data *inf)
+{
+	void __iomem *u2d_mmio_base = ohci->u2d_mmio_base;
+	u32 u2dotgcr;
+	int err;
+
+	pxa310_otg_transceiver_rtsm(ohci);
+
+	/* disable USB device controller */
+	__raw_writel(__raw_readl(u2d_mmio_base + U2DCR) & ~U2DCR_UDE,
+		     u2d_mmio_base + U2DCR);
+	__raw_writel(__raw_readl(u2d_mmio_base + U2DOTGCR) |
+		     U2DOTGCR_UTMID, u2d_mmio_base + U2DOTGCR);
+	__raw_writel(__raw_readl(u2d_mmio_base + U2DOTGICR) & ~0x37F7F,
+		     u2d_mmio_base + U2DOTGICR);
+
+	err = start_otg_transceiver(ohci, inf->otg);
+	if (err)
+		return err;
+
+	/* set xceiver mode */
+	if (inf->ulpi_mode == ULPI_IC_6PIN)
+		__raw_writel(__raw_readl(u2d_mmio_base + U2DP3CR) &
+			     ~U2DP3CR_P2SS, u2d_mmio_base + U2DP3CR);
+	else if (inf->ulpi_mode == ULPI_IC_3PIN)
+		__raw_writel(__raw_readl(u2d_mmio_base + U2DP3CR) |
+			     U2DP3CR_P2SS, u2d_mmio_base + U2DP3CR);
+
+	/* start OTG host controller */
+	u2dotgcr =__raw_readl(u2d_mmio_base + U2DOTGCR) | U2DOTGCR_SMAF;
+	__raw_writel(u2dotgcr & ~(U2DOTGCR_ULAF | U2DOTGCR_CKAF),
+		     u2d_mmio_base + U2DOTGCR);
+
+	return 0;
+}
+
+static inline bool pxa310_u2d_is_setup(struct pxa27x_ohci *ohci)
+{
+	return cpu_is_pxa310() && !IS_ERR(ohci->u2d_clk) && ohci->u2d_mmio_base;
+}
+#else
+static inline void pxa310_setup_otg_hc(struct pxa27x_ohci *ohci) {}
+static inline void pxa310_otg_transceiver_rtsm(struct pxa27x_ohci *ohci) {}
+static inline int pxa310_start_otg_hc(struct pxa27x_ohci *ohci,
+				      struct pxaohci_platform_data *inf)
+{
+	return 0;
+}
+static inline bool pxa310_u2d_is_setup(struct pxa27x_ohci *ohci)
+{
+	return false;
+}
+#endif /* CONFIG_PXA310_ULPI */
+
 /*
   PMM_NPS_MODE -- PMM Non-power switching mode
       Ports are powered continuously.
@@ -229,12 +347,24 @@ static int pxa27x_start_hc(struct pxa27x_ohci *ohci, struct device *dev)
 
 	pxa27x_setup_hc(ohci, inf);
 
+	if (pxa310_u2d_is_setup(ohci)) {
+		clk_enable(ohci->u2d_clk);
+		pxa310_setup_otg_hc(ohci);
+	}
+
 	if (inf->init)
 		retval = inf->init(dev);
 
 	if (retval < 0)
 		return retval;
 
+	/*
+	 * Platform can have a special init for the ulpi phy,
+	 * therefore the rest of the init must be done after the platform code.
+	 */
+	if (pxa310_u2d_is_setup(ohci))
+		pxa310_start_otg_hc(ohci, inf);
+
 	uhchr = __raw_readl(ohci->mmio_base + UHCHR) & ~UHCHR_SSE;
 	__raw_writel(uhchr, ohci->mmio_base + UHCHR);
 	__raw_writel(UHCHIE_UPRIE | UHCHIE_RWIE, ohci->mmio_base + UHCHIE);
@@ -251,6 +381,11 @@ static void pxa27x_stop_hc(struct pxa27x_ohci *ohci, struct device *dev)
 
 	inf = dev->platform_data;
 
+	if (pxa310_u2d_is_setup(ohci)) {
+		pxa310_otg_transceiver_rtsm(ohci);
+		clk_disable(ohci->u2d_clk);
+	}
+
 	if (inf->exit)
 		inf->exit(dev);
 
@@ -264,6 +399,38 @@ static void pxa27x_stop_hc(struct pxa27x_ohci *ohci, struct device *dev)
 	clk_disable(ohci->clk);
 }
 
+static int pxa310_init_otg_resources(struct pxa27x_ohci *ohci,
+				     struct pxaohci_platform_data *inf)
+{
+	int retval;
+
+	ohci->u2d_clk = clk_get(NULL, "U2DCLK");
+	if (IS_ERR(ohci->u2d_clk))
+		return PTR_ERR(ohci->u2d_clk);
+
+	inf->otg->io_priv = ioremap(U2D_PHYS_BASE, 0x1300);
+	if (!inf->otg->io_priv) {
+		retval = -ENOMEM;
+		goto err_ioremap;
+	}
+
+	ohci->u2d_mmio_base = inf->otg->io_priv;
+
+	return 0;
+
+err_ioremap:
+	clk_put(ohci->u2d_clk);
+	return retval;
+}
+
+static void pxa310_free_otg_resources(struct pxa27x_ohci *ohci)
+{
+	if (ohci->u2d_mmio_base)
+		iounmap(ohci->u2d_mmio_base);
+
+	if (ohci->u2d_clk)
+		clk_put(ohci->u2d_clk);
+}
 
 /*-------------------------------------------------------------------------*/
 
@@ -337,6 +504,12 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
 	ohci->clk = usb_clk;
 	ohci->mmio_base = (void __iomem *)hcd->regs;
 
+	if (cpu_is_pxa310() && inf->otg) {
+		retval = pxa310_init_otg_resources(ohci, inf);
+		if (retval)
+			goto err3;
+	}
+
 	if ((retval = pxa27x_start_hc(ohci, &pdev->dev)) < 0) {
 		pr_debug("pxa27x_start_hc failed");
 		goto err3;
@@ -357,11 +530,15 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
 	pxa27x_stop_hc(ohci, &pdev->dev);
  err3:
 	iounmap(hcd->regs);
+
+	if (cpu_is_pxa310() && inf->otg)
+		pxa310_free_otg_resources(ohci);
  err2:
 	release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
  err1:
 	usb_put_hcd(hcd);
 	clk_put(usb_clk);
+
 	return retval;
 }
 
@@ -385,6 +562,12 @@ void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *pdev)
 
 	usb_remove_hcd(hcd);
 	pxa27x_stop_hc(ohci, &pdev->dev);
+
+	if (pxa310_u2d_is_setup(ohci)) {
+		iounmap(ohci->u2d_mmio_base);
+		clk_put(ohci->u2d_clk);
+	}
+
 	iounmap(hcd->regs);
 	release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
 	usb_put_hcd(hcd);
-- 
1.6.4.4

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

* [PATCH 5/5] [ARM] pxa/cm-x300: enable USB host port 2 on CM-X300 with PXA310 cpu.
  2010-06-02  7:40       ` [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode Igor Grinberg
@ 2010-06-02  7:40         ` Igor Grinberg
  2010-06-12 11:48         ` [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode Eric Miao
  1 sibling, 0 replies; 34+ messages in thread
From: Igor Grinberg @ 2010-06-02  7:40 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
 arch/arm/mach-pxa/cm-x300.c |  102 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 102 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index d37cfa1..87ffb38 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -19,6 +19,7 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/platform_device.h>
+#include <linux/clk.h>
 
 #include <linux/gpio.h>
 #include <linux/dm9000.h>
@@ -35,6 +36,9 @@
 #include <linux/spi/spi_gpio.h>
 #include <linux/spi/tdo24m.h>
 
+#include <linux/usb/otg.h>
+#include <linux/usb/ulpi.h>
+
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/setup.h>
@@ -47,6 +51,7 @@
 #include <plat/i2c.h>
 #include <plat/pxa3xx_nand.h>
 #include <mach/audio.h>
+#include <mach/pxa310-ulpi.h>
 
 #include <asm/mach/map.h>
 
@@ -65,6 +70,8 @@
 #define GPIO97_RTC_RD		(97)
 #define GPIO98_RTC_IO		(98)
 
+#define GPIO127_ULPI_PHY_RST	(127)
+
 static mfp_cfg_t cm_x3xx_mfp_cfg[] __initdata = {
 	/* LCD */
 	GPIO54_LCD_LDD_0,
@@ -470,23 +477,118 @@ static inline void cm_x300_init_mmc(void) {}
 #endif
 
 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+#if defined(CONFIG_PXA310_ULPI)
+static struct clk *pout_clk;
+
+static int cm_x300_ulpi_clk_enable(void)
+{
+	int err;
+
+	/* CLK_POUT is connected to the ULPI PHY */
+	pout_clk = clk_get(NULL, "CLK_POUT");
+	if (IS_ERR(pout_clk)) {
+		err = PTR_ERR(pout_clk);
+		pr_err("%s: failed to get CLK_POUT: %d\n", __func__, err);
+		return err;
+	}
+	clk_enable(pout_clk);
+
+	return 0;
+}
+
+static inline void cm_x300_ulpi_clk_disable(void)
+{
+	if (!IS_ERR(pout_clk)) {
+		clk_disable(pout_clk);
+		clk_put(pout_clk);
+	}
+}
+
+static int cm_x300_ulpi_phy_reset(void)
+{
+	int err;
+
+	/* reset the PHY */
+	err = gpio_request(GPIO127_ULPI_PHY_RST, "ulpi reset");
+	if (err) {
+		pr_err("%s: failed to request ULPI reset GPIO: %d\n",
+		       __func__, err);
+		return err;
+	}
+
+	gpio_direction_output(GPIO127_ULPI_PHY_RST, 0);
+	msleep(10);
+	gpio_set_value(GPIO127_ULPI_PHY_RST, 1);
+	msleep(10);
+
+	gpio_free(GPIO127_ULPI_PHY_RST);
+
+	return 0;
+}
+
+static inline int cm_x300_ulpi_init(void)
+{
+	int err;
+
+	err = cm_x300_ulpi_clk_enable();
+	if (err)
+		return err;
+
+	err = cm_x300_ulpi_phy_reset();
+	if (err)
+		pr_err("%s: ULPI PHY init failed!\n", __func__);
+
+	return err;
+}
+#else
+static inline int cm_x300_ulpi_init(void) { return 0; }
+static inline void cm_x300_ulpi_clk_disable(void) {}
+#endif /* CONFIG_PXA310_ULPI */
+
 static int cm_x300_ohci_init(struct device *dev)
 {
 	if (cpu_is_pxa300())
 		UP2OCR = UP2OCR_HXS
 			| UP2OCR_HXOE | UP2OCR_DMPDE | UP2OCR_DPPDE;
 
+	if (cpu_is_pxa310())
+		cm_x300_ulpi_init();
+
 	return 0;
 }
 
+static void cm_x300_ohci_exit(struct device *dev)
+{
+	if (cpu_is_pxa310())
+		cm_x300_ulpi_clk_disable();
+}
+
 static struct pxaohci_platform_data cm_x300_ohci_platform_data = {
 	.port_mode	= PMM_PERPORT_MODE,
 	.flags		= ENABLE_PORT_ALL | POWER_CONTROL_LOW,
 	.init		= cm_x300_ohci_init,
+	.exit		= cm_x300_ohci_exit,
+
+#if defined(CONFIG_PXA310_ULPI)
+	.ulpi_mode	= ULPI_IC_6PIN,
+#endif
 };
 
 static void __init cm_x300_init_ohci(void)
 {
+	if (cpu_is_pxa310()) {
+#if defined(CONFIG_PXA310_ULPI)
+		cm_x300_ohci_platform_data.otg =
+			otg_ulpi_create(&pxa310_ulpi_access_ops,
+					USB_OTG_PULLDOWN_DM |
+					USB_OTG_PULLDOWN_DP |
+					USB_OTG_DRV_VBUS,
+					ULPI_IC_6PIN,
+					ULPI_FC_DEFAULT |
+					ULPI_FC_TRM_SEL);
+#endif
+	}
+
 	pxa_set_ohci_info(&cm_x300_ohci_platform_data);
 }
 #else
-- 
1.6.4.4

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

* [PATCH 0/5] Enable pxa310 usb otg port host mode.
  2010-06-02  7:40 [PATCH 0/5] Enable pxa310 usb otg port host mode Igor Grinberg
  2010-06-02  7:40 ` [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver Igor Grinberg
@ 2010-06-02  8:29 ` Eric Miao
  2010-06-06  6:15   ` Igor Grinberg
  2010-06-09 11:49 ` Mike Rapoport
  2 siblings, 1 reply; 34+ messages in thread
From: Eric Miao @ 2010-06-02  8:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 2, 2010 at 3:40 PM, Igor Grinberg <grinberg@compulab.co.il> wrote:
> This patch series extends the existing usb ulpi generic driver
> with support for Function and Interface control of the ULPI PHYs,
> adds support for SMSC USB3319 ulpi phy,
> implement the pxa310 specific ulpi functionality and make pxa specific ohci
> implementation aware of pxa310 usb otg port host mode.
>

Looks like a right way to go, include Haojian and Jing for review.

> Igor Grinberg (5):
> ?usb/otg/ulpi: extend the generic ulpi driver.
> ?usb/otg/ulpi: add support for SMSC USB3319 ulpi phy.
> ?[ARM] pxa: add PXA310 specific ULPI implementation
> ?[ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host
> ? ?mode.
> ?[ARM] pxa/cm-x300: enable USB host port 2 on CM-X300 with PXA310 cpu.
>
> ?arch/arm/mach-mx2/mach-pca100.c ? ? ? ? ? ? ?| ? 10 +-
> ?arch/arm/mach-mx3/mach-armadillo5x0.c ? ? ? ?| ? 10 +-
> ?arch/arm/mach-mx3/mach-mx31lite.c ? ? ? ? ? ?| ? ?5 +-
> ?arch/arm/mach-mx3/mach-mx31moboard.c ? ? ? ? | ? ?5 +-
> ?arch/arm/mach-mx3/mach-pcm037.c ? ? ? ? ? ? ?| ? 10 +-
> ?arch/arm/mach-mx3/mach-pcm043.c ? ? ? ? ? ? ?| ? ?5 +-
> ?arch/arm/mach-pxa/Kconfig ? ? ? ? ? ? ? ? ? ?| ? ?4 +
> ?arch/arm/mach-pxa/Makefile ? ? ? ? ? ? ? ? ? | ? ?1 +
> ?arch/arm/mach-pxa/cm-x300.c ? ? ? ? ? ? ? ? ?| ?102 ++++++++++++++
> ?arch/arm/mach-pxa/include/mach/ohci.h ? ? ? ?| ? ?3 +
> ?arch/arm/mach-pxa/include/mach/pxa310-ulpi.h | ? 19 +++
> ?arch/arm/mach-pxa/include/mach/regs-u2d.h ? ?| ? ?2 +
> ?arch/arm/mach-pxa/pxa310-ulpi.c ? ? ? ? ? ? ?| ?110 +++++++++++++++
> ?drivers/usb/host/ohci-pxa27x.c ? ? ? ? ? ? ? | ?183 ++++++++++++++++++++++++++
> ?drivers/usb/otg/Kconfig ? ? ? ? ? ? ? ? ? ? ?| ? ?2 -
> ?drivers/usb/otg/ulpi.c ? ? ? ? ? ? ? ? ? ? ? | ? 65 ++++++++-
> ?include/linux/usb/ulpi.h ? ? ? ? ? ? ? ? ? ? | ? 25 ++++-
> ?17 files changed, 542 insertions(+), 19 deletions(-)
> ?create mode 100644 arch/arm/mach-pxa/include/mach/pxa310-ulpi.h
> ?create mode 100644 arch/arm/mach-pxa/pxa310-ulpi.c
>
>

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

* [PATCH 0/5] Enable pxa310 usb otg port host mode.
  2010-06-02  8:29 ` [PATCH 0/5] Enable pxa310 usb otg port host mode Eric Miao
@ 2010-06-06  6:15   ` Igor Grinberg
  0 siblings, 0 replies; 34+ messages in thread
From: Igor Grinberg @ 2010-06-06  6:15 UTC (permalink / raw)
  To: linux-arm-kernel

ping!

On 06/02/10 11:29, Eric Miao wrote:
> On Wed, Jun 2, 2010 at 3:40 PM, Igor Grinberg <grinberg@compulab.co.il> wrote:
>   
>> This patch series extends the existing usb ulpi generic driver
>> with support for Function and Interface control of the ULPI PHYs,
>> adds support for SMSC USB3319 ulpi phy,
>> implement the pxa310 specific ulpi functionality and make pxa specific ohci
>> implementation aware of pxa310 usb otg port host mode.
>>
>>     
> Looks like a right way to go, include Haojian and Jing for review.
>
>   
>> Igor Grinberg (5):
>>  usb/otg/ulpi: extend the generic ulpi driver.
>>  usb/otg/ulpi: add support for SMSC USB3319 ulpi phy.
>>  [ARM] pxa: add PXA310 specific ULPI implementation
>>  [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host
>>    mode.
>>  [ARM] pxa/cm-x300: enable USB host port 2 on CM-X300 with PXA310 cpu.
>>
>>  arch/arm/mach-mx2/mach-pca100.c              |   10 +-
>>  arch/arm/mach-mx3/mach-armadillo5x0.c        |   10 +-
>>  arch/arm/mach-mx3/mach-mx31lite.c            |    5 +-
>>  arch/arm/mach-mx3/mach-mx31moboard.c         |    5 +-
>>  arch/arm/mach-mx3/mach-pcm037.c              |   10 +-
>>  arch/arm/mach-mx3/mach-pcm043.c              |    5 +-
>>  arch/arm/mach-pxa/Kconfig                    |    4 +
>>  arch/arm/mach-pxa/Makefile                   |    1 +
>>  arch/arm/mach-pxa/cm-x300.c                  |  102 ++++++++++++++
>>  arch/arm/mach-pxa/include/mach/ohci.h        |    3 +
>>  arch/arm/mach-pxa/include/mach/pxa310-ulpi.h |   19 +++
>>  arch/arm/mach-pxa/include/mach/regs-u2d.h    |    2 +
>>  arch/arm/mach-pxa/pxa310-ulpi.c              |  110 +++++++++++++++
>>  drivers/usb/host/ohci-pxa27x.c               |  183 ++++++++++++++++++++++++++
>>  drivers/usb/otg/Kconfig                      |    2 -
>>  drivers/usb/otg/ulpi.c                       |   65 ++++++++-
>>  include/linux/usb/ulpi.h                     |   25 ++++-
>>  17 files changed, 542 insertions(+), 19 deletions(-)
>>  create mode 100644 arch/arm/mach-pxa/include/mach/pxa310-ulpi.h
>>  create mode 100644 arch/arm/mach-pxa/pxa310-ulpi.c
>>
>>
>>     
>   

-- 
Regards,
Igor.

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

* [PATCH 0/5] Enable pxa310 usb otg port host mode.
  2010-06-02  7:40 [PATCH 0/5] Enable pxa310 usb otg port host mode Igor Grinberg
  2010-06-02  7:40 ` [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver Igor Grinberg
  2010-06-02  8:29 ` [PATCH 0/5] Enable pxa310 usb otg port host mode Eric Miao
@ 2010-06-09 11:49 ` Mike Rapoport
  2010-06-09 12:43   ` Eric Miao
  2 siblings, 1 reply; 34+ messages in thread
From: Mike Rapoport @ 2010-06-09 11:49 UTC (permalink / raw)
  To: linux-arm-kernel

Eric, Greg,
Any comments on this?

Igor Grinberg wrote:
> This patch series extends the existing usb ulpi generic driver
> with support for Function and Interface control of the ULPI PHYs,
> adds support for SMSC USB3319 ulpi phy,
> implement the pxa310 specific ulpi functionality and make pxa specific ohci
> implementation aware of pxa310 usb otg port host mode.
> 
> Igor Grinberg (5):
>   usb/otg/ulpi: extend the generic ulpi driver.
>   usb/otg/ulpi: add support for SMSC USB3319 ulpi phy.
>   [ARM] pxa: add PXA310 specific ULPI implementation
>   [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host
>     mode.
>   [ARM] pxa/cm-x300: enable USB host port 2 on CM-X300 with PXA310 cpu.
> 
>  arch/arm/mach-mx2/mach-pca100.c              |   10 +-
>  arch/arm/mach-mx3/mach-armadillo5x0.c        |   10 +-
>  arch/arm/mach-mx3/mach-mx31lite.c            |    5 +-
>  arch/arm/mach-mx3/mach-mx31moboard.c         |    5 +-
>  arch/arm/mach-mx3/mach-pcm037.c              |   10 +-
>  arch/arm/mach-mx3/mach-pcm043.c              |    5 +-
>  arch/arm/mach-pxa/Kconfig                    |    4 +
>  arch/arm/mach-pxa/Makefile                   |    1 +
>  arch/arm/mach-pxa/cm-x300.c                  |  102 ++++++++++++++
>  arch/arm/mach-pxa/include/mach/ohci.h        |    3 +
>  arch/arm/mach-pxa/include/mach/pxa310-ulpi.h |   19 +++
>  arch/arm/mach-pxa/include/mach/regs-u2d.h    |    2 +
>  arch/arm/mach-pxa/pxa310-ulpi.c              |  110 +++++++++++++++
>  drivers/usb/host/ohci-pxa27x.c               |  183 ++++++++++++++++++++++++++
>  drivers/usb/otg/Kconfig                      |    2 -
>  drivers/usb/otg/ulpi.c                       |   65 ++++++++-
>  include/linux/usb/ulpi.h                     |   25 ++++-
>  17 files changed, 542 insertions(+), 19 deletions(-)
>  create mode 100644 arch/arm/mach-pxa/include/mach/pxa310-ulpi.h
>  create mode 100644 arch/arm/mach-pxa/pxa310-ulpi.c
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Sincerely yours,
Mike.

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

* [PATCH 0/5] Enable pxa310 usb otg port host mode.
  2010-06-09 11:49 ` Mike Rapoport
@ 2010-06-09 12:43   ` Eric Miao
  0 siblings, 0 replies; 34+ messages in thread
From: Eric Miao @ 2010-06-09 12:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 9, 2010 at 7:49 PM, Mike Rapoport <mike@compulab.co.il> wrote:
> Eric, Greg,
> Any comments on this?
>

The basic idea looks OK to me, but I need some time to look into the
detail esp. those HW specific where Marvell guys are a bit silent :-/

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

* [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver.
  2010-06-02  7:40 ` [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver Igor Grinberg
  2010-06-02  7:40   ` [PATCH 2/5] usb/otg/ulpi: add support for SMSC USB3319 ulpi phy Igor Grinberg
@ 2010-06-12  9:35   ` Eric Miao
  2010-06-12 17:34     ` David Brownell
  2010-06-15 14:47     ` Igor Grinberg
  2010-08-13 10:21     ` Uwe Kleine-König
  2 siblings, 2 replies; 34+ messages in thread
From: Eric Miao @ 2010-06-12  9:35 UTC (permalink / raw)
  To: linux-arm-kernel

> +/* ULPI Function Control Register bits */
> +#define ULPI_FC_HS ? ? 0 ? ? ? ? ? ? ? /* Enable HS tcvr */
> +#define ULPI_FC_FS ? ? (0x1 << 0) ? ? ?/* Enable FS tcvr */
> +#define ULPI_FC_LS ? ? (0x2 << 0) ? ? ?/* Enable LS tcvr */
> +#define ULPI_FC_FS_LS ?(0x3 << 0) ? ? ?/* Enable FS tcvr for LS packets */
> +#define ULPI_FC_TRM_SEL ? ? ? ?(0x1 << 2) ? ? ?/* Internal pullup and HS termination */
> +#define ULPI_FC_NODRV ?(0x1 << 3) ? ? ?/* Non-Driving Operation */
> +#define ULPI_FC_NONRZI (0x1 << 4) ? ? ?/* Disable bit-stuff and NRZI encode */
> +#define ULPI_FC_RESET ?(0x1 << 5) ? ? ?/* Reset the UTMI core */
> +#define ULPI_FC_DEFAULT ? ? ? ?0x41 ? ? ? ? ? ?/* Function Control Register Default */
> +
> +
> +/* ULPI Interface Register bits */
> +#define ULPI_IC_6PIN ? (1 << 0) ? ? ? ?/* XCVR 6 serial pin mode */
> +#define ULPI_IC_3PIN ? (1 << 1) ? ? ? ?/* XCVR 3 serial pin mode */
> +#define ULPI_IC_CARKIT (1 << 2) ? ? ? ?/* Carkit mode */
> +#define ULPI_IC_CLKSPND ? ? ? ?(1 << 3) ? ? ? ?/* Active low clock suspend */
> +#define ULPI_IC_AUTORES ? ? ? ?(1 << 4) ? ? ? ?/* PHY auto transmit resume signal */
> +#define ULPI_IC_VBUSINV ? ? ? ?(1 << 5) ? ? ? ?/* Invert the external VBUS indicator */
> +#define ULPI_IC_INDPT ?(1 << 6) ? ? ? ?/* Indicator Pass Through */
> +#define ULPI_IC_DISPRT (1 << 7) ? ? ? ?/* Interface Protect Disable */
> +#define ULPI_IC_DEFAULT ? ? ? ?0x0 ? ? ? ? ? ? /* Interface Control Register Default */
> +
> ?struct otg_transceiver *otg_ulpi_create(struct otg_io_access_ops *ops,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? unsigned int flags);
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? u8 fc_flags, u8 ic_flags, u8 otg_flags);
>

Just one comment about the API, I might not know all the detail of these two
FC/IC registers, but maybe it can be even better:

1. separate flags definition from the FC/IC register bits, i.e. sometimes not
all the register bits will be used, and some times a meaningful flag name is
better (though the flag definition can be encoded properly to simplify the
algorithm to map into the actual register bits)

2. extend the original 'flags' variable and bits for the above definitions, so
we can keep the API unchanged.

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

* [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode.
  2010-06-02  7:40       ` [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode Igor Grinberg
  2010-06-02  7:40         ` [PATCH 5/5] [ARM] pxa/cm-x300: enable USB host port 2 on CM-X300 with PXA310 cpu Igor Grinberg
@ 2010-06-12 11:48         ` Eric Miao
  2010-06-12 14:24           ` David Brownell
  2010-06-13  6:57           ` Mike Rapoport
  1 sibling, 2 replies; 34+ messages in thread
From: Eric Miao @ 2010-06-12 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 2, 2010 at 3:40 PM, Igor Grinberg <grinberg@compulab.co.il> wrote:
>
> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
> ---
> ?arch/arm/mach-pxa/include/mach/ohci.h ? ? | ? ?3 +
> ?arch/arm/mach-pxa/include/mach/regs-u2d.h | ? ?2 +
> ?drivers/usb/host/ohci-pxa27x.c ? ? ? ? ? ?| ?183 +++++++++++++++++++++++++++++

My feeling is on pxa310, the OTG/ULPI is actually closer to the UDC, so
generally, I'd really like to see minimum change to ohci.

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

* [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode.
  2010-06-12 11:48         ` [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode Eric Miao
@ 2010-06-12 14:24           ` David Brownell
  2010-06-13  6:57           ` Mike Rapoport
  1 sibling, 0 replies; 34+ messages in thread
From: David Brownell @ 2010-06-12 14:24 UTC (permalink / raw)
  To: linux-arm-kernel



--- On Sat, 6/12/10, Eric Miao <eric.y.miao@gmail.com> wrote:

> > ?arch/arm/mach-pxa/include/mach/ohci.h ? ? | ? ?3
> +
> > ?arch/arm/mach-pxa/include/mach/regs-u2d.h | ? ?2
> +
> > ?drivers/usb/host/ohci-pxa27x.c ? ? ? ? ? ?|
> ?183 +++++++++++++++++++++++++++++

Doesn't touch generic OHCI code, so it looks
OK to me... ack.
> 
> My feeling is on pxa310, the OTG/ULPI is actually closer to
> the UDC, so
> generally, I'd really like to see minimum change to ohci.
> 

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

* [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver.
  2010-06-12  9:35   ` [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver Eric Miao
@ 2010-06-12 17:34     ` David Brownell
  2010-06-15 14:47     ` Igor Grinberg
  1 sibling, 0 replies; 34+ messages in thread
From: David Brownell @ 2010-06-12 17:34 UTC (permalink / raw)
  To: linux-arm-kernel



--- On Sat, 6/12/10, Eric Miao <eric.y.miao@gmail.com> wrote:

> From: Eric Miao <eric.y.miao@gmail.com>
> Subject: Re: [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver.
> To: "Igor Grinberg" <grinberg@compulab.co.il>


Isn't this patch From: Igor?

It arrived in my mailbox a bit mangled.

A quick scan suggests its OK, but I can't test
or evanulate it just now, e.g. to see if it
breaks anything else, builds, etc.  Plus, I've
not looked at this driver.

Felipe, got any comments?  Is this driver generic
enough that MUSB could use it for ULPI access?

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

* [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode.
  2010-06-12 11:48         ` [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode Eric Miao
  2010-06-12 14:24           ` David Brownell
@ 2010-06-13  6:57           ` Mike Rapoport
  2010-06-13  7:04             ` Eric Miao
  1 sibling, 1 reply; 34+ messages in thread
From: Mike Rapoport @ 2010-06-13  6:57 UTC (permalink / raw)
  To: linux-arm-kernel

Eric Miao wrote:
> On Wed, Jun 2, 2010 at 3:40 PM, Igor Grinberg <grinberg@compulab.co.il> wrote:
>> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
>> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
>> ---
>>  arch/arm/mach-pxa/include/mach/ohci.h     |    3 +
>>  arch/arm/mach-pxa/include/mach/regs-u2d.h |    2 +
>>  drivers/usb/host/ohci-pxa27x.c            |  183 +++++++++++++++++++++++++++++
> 
> My feeling is on pxa310, the OTG/ULPI is actually closer to the UDC, so
> generally, I'd really like to see minimum change to ohci.

There are certain registers set up that should be done in order to 
enable the pxa310 otg port in the host mode. I agree that most of them 
should be done in the UDC driver, but since there's no UDC driver at all 
for pxa310, the most logical place for those register set ups would be 
pxa ohci glue driver.

-- 
Sincerely yours,
Mike.

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

* [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode.
  2010-06-13  6:57           ` Mike Rapoport
@ 2010-06-13  7:04             ` Eric Miao
  2010-06-13  7:06               ` Mike Rapoport
  0 siblings, 1 reply; 34+ messages in thread
From: Eric Miao @ 2010-06-13  7:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jun 13, 2010 at 2:57 PM, Mike Rapoport <mike@compulab.co.il> wrote:
> Eric Miao wrote:
>>
>> On Wed, Jun 2, 2010 at 3:40 PM, Igor Grinberg <grinberg@compulab.co.il>
>> wrote:
>>>
>>> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
>>> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
>>> ---
>>> ?arch/arm/mach-pxa/include/mach/ohci.h ? ? | ? ?3 +
>>> ?arch/arm/mach-pxa/include/mach/regs-u2d.h | ? ?2 +
>>> ?drivers/usb/host/ohci-pxa27x.c ? ? ? ? ? ?| ?183
>>> +++++++++++++++++++++++++++++
>>
>> My feeling is on pxa310, the OTG/ULPI is actually closer to the UDC, so
>> generally, I'd really like to see minimum change to ohci.
>
> There are certain registers set up that should be done in order to enable
> the pxa310 otg port in the host mode. I agree that most of them should be
> done in the UDC driver, but since there's no UDC driver at all for pxa310,

Wow, that's a big problem.

> the most logical place for those register set ups would be pxa ohci glue
> driver.
>

So, is there a simple way to setup the ULPI for the host within mach-pxa/*?
We need really really simple code for that, so it has minimum impact when
we move that part into pxa310-udc.c? I still want ohci-pxa27x to remain
minimum impacted.

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

* [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode.
  2010-06-13  7:04             ` Eric Miao
@ 2010-06-13  7:06               ` Mike Rapoport
  0 siblings, 0 replies; 34+ messages in thread
From: Mike Rapoport @ 2010-06-13  7:06 UTC (permalink / raw)
  To: linux-arm-kernel

Eric Miao wrote:
> On Sun, Jun 13, 2010 at 2:57 PM, Mike Rapoport <mike@compulab.co.il> wrote:
>> Eric Miao wrote:
>>> On Wed, Jun 2, 2010 at 3:40 PM, Igor Grinberg <grinberg@compulab.co.il>
>>> wrote:
>>>> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
>>>> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
>>>> ---
>>>>  arch/arm/mach-pxa/include/mach/ohci.h     |    3 +
>>>>  arch/arm/mach-pxa/include/mach/regs-u2d.h |    2 +
>>>>  drivers/usb/host/ohci-pxa27x.c            |  183
>>>> +++++++++++++++++++++++++++++
>>> My feeling is on pxa310, the OTG/ULPI is actually closer to the UDC, so
>>> generally, I'd really like to see minimum change to ohci.
>> There are certain registers set up that should be done in order to enable
>> the pxa310 otg port in the host mode. I agree that most of them should be
>> done in the UDC driver, but since there's no UDC driver at all for pxa310,
> 
> Wow, that's a big problem.
 >
>> the most logical place for those register set ups would be pxa ohci glue
>> driver.
>>
> 
> So, is there a simple way to setup the ULPI for the host within mach-pxa/*?
> We need really really simple code for that, so it has minimum impact when
> we move that part into pxa310-udc.c? I still want ohci-pxa27x to remain
> minimum impacted.

we can put most of the code in, say, arch/arm/mach-pxa/pxa3xx-u2d.c and 
add hooks in ohci-pxa27x.

-- 
Sincerely yours,
Mike.

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

* [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver.
  2010-06-12  9:35   ` [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver Eric Miao
  2010-06-12 17:34     ` David Brownell
@ 2010-06-15 14:47     ` Igor Grinberg
  1 sibling, 0 replies; 34+ messages in thread
From: Igor Grinberg @ 2010-06-15 14:47 UTC (permalink / raw)
  To: linux-arm-kernel



On 06/12/10 12:35, Eric Miao wrote:
>> +/* ULPI Function Control Register bits */
>> +#define ULPI_FC_HS     0               /* Enable HS tcvr */
>> +#define ULPI_FC_FS     (0x1 << 0)      /* Enable FS tcvr */
>> +#define ULPI_FC_LS     (0x2 << 0)      /* Enable LS tcvr */
>> +#define ULPI_FC_FS_LS  (0x3 << 0)      /* Enable FS tcvr for LS packets */
>> +#define ULPI_FC_TRM_SEL        (0x1 << 2)      /* Internal pullup and HS termination */
>> +#define ULPI_FC_NODRV  (0x1 << 3)      /* Non-Driving Operation */
>> +#define ULPI_FC_NONRZI (0x1 << 4)      /* Disable bit-stuff and NRZI encode */
>> +#define ULPI_FC_RESET  (0x1 << 5)      /* Reset the UTMI core */
>> +#define ULPI_FC_DEFAULT        0x41            /* Function Control Register Default */
>> +
>> +
>> +/* ULPI Interface Register bits */
>> +#define ULPI_IC_6PIN   (1 << 0)        /* XCVR 6 serial pin mode */
>> +#define ULPI_IC_3PIN   (1 << 1)        /* XCVR 3 serial pin mode */
>> +#define ULPI_IC_CARKIT (1 << 2)        /* Carkit mode */
>> +#define ULPI_IC_CLKSPND        (1 << 3)        /* Active low clock suspend */
>> +#define ULPI_IC_AUTORES        (1 << 4)        /* PHY auto transmit resume signal */
>> +#define ULPI_IC_VBUSINV        (1 << 5)        /* Invert the external VBUS indicator */
>> +#define ULPI_IC_INDPT  (1 << 6)        /* Indicator Pass Through */
>> +#define ULPI_IC_DISPRT (1 << 7)        /* Interface Protect Disable */
>> +#define ULPI_IC_DEFAULT        0x0             /* Interface Control Register Default */
>> +
>>  struct otg_transceiver *otg_ulpi_create(struct otg_io_access_ops *ops,
>> -                                       unsigned int flags);
>> +                                       u8 fc_flags, u8 ic_flags, u8 otg_flags);
>>
>>     
> Just one comment about the API, I might not know all the detail of these two
> FC/IC registers, but maybe it can be even better:
>
> 1. separate flags definition from the FC/IC register bits, i.e. sometimes not
> all the register bits will be used, and some times a meaningful flag name is
> better (though the flag definition can be encoded properly to simplify the
> algorithm to map into the actual register bits)
>
>   

I understand what you mean and I think it is indeed better to keep the
bits and registers private
to the ulpi driver and export only some usable flags.
Meanwhile, there is new ulpi.h, merged between 2.6.34 and 2.6.35-rc1 and
it violates already
the concept of keeping the bits/regs private.
For now there are too many combinations of those bits and it is
impossible to summarize them
in some way usable flags.
pxa310 uses only a reletively small subset of the ulpi register bits, so
we could define
flags specific to pxa310 in the new pxa310-u2d.c or pxa310-u2d.h, so
board will only pass those flags
to the pxa310-u2d.c driver which in turn will translate them to the ulpi
register settings.

> 2. extend the original 'flags' variable and bits for the above definitions, so
> we can keep the API unchanged.
>   

Well, I think that the current API is still fresh and it does only
support current implementation
in which the flags are stored in otg_transceiver and there is no any
private data to the ulpi driver.

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

-- 
Regards,
Igor.

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

* [PATCH] ARM: imx: fix build failure concerning otg/ulpi
  2010-06-02  7:40 ` [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver Igor Grinberg
@ 2010-08-13 10:21     ` Uwe Kleine-König
  2010-06-12  9:35   ` [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver Eric Miao
  2010-08-13 10:21     ` Uwe Kleine-König
  2 siblings, 0 replies; 34+ messages in thread
From: Uwe Kleine-König @ 2010-08-13 10:21 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, linux-usb
  Cc: Igor Grinberg, Mike Rapoport, Greg Kroah-Hartman

The build failure was introduced by

	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
 arch/arm/mach-imx/mach-cpuimx27.c  |    4 ++--
 arch/arm/mach-imx/mach-pca100.c    |    4 ++--
 arch/arm/mach-mx25/mach-cpuimx25.c |    2 +-
 arch/arm/mach-mx3/mach-cpuimx35.c  |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
index 575ff1a..339150a 100644
--- a/arch/arm/mach-imx/mach-cpuimx27.c
+++ b/arch/arm/mach-imx/mach-cpuimx27.c
@@ -279,13 +279,13 @@ static void __init eukrea_cpuimx27_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
 
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 #endif
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index a389d11..23c9e1f 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -419,13 +419,13 @@ static void __init pca100_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
 
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 #endif
diff --git a/arch/arm/mach-mx25/mach-cpuimx25.c b/arch/arm/mach-mx25/mach-cpuimx25.c
index 56b2e26..0134fb8 100644
--- a/arch/arm/mach-mx25/mach-cpuimx25.c
+++ b/arch/arm/mach-mx25/mach-cpuimx25.c
@@ -138,7 +138,7 @@ static void __init eukrea_cpuimx25_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				USB_OTG_DRV_VBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg, &otg_pdata);
 	}
diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
index 63f970f..117f90e 100644
--- a/arch/arm/mach-mx3/mach-cpuimx35.c
+++ b/arch/arm/mach-mx3/mach-cpuimx35.c
@@ -192,7 +192,7 @@ static void __init mxc_board_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				USB_OTG_DRV_VBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
-- 
1.7.1


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

* [PATCH] ARM: imx: fix build failure concerning otg/ulpi
@ 2010-08-13 10:21     ` Uwe Kleine-König
  0 siblings, 0 replies; 34+ messages in thread
From: Uwe Kleine-König @ 2010-08-13 10:21 UTC (permalink / raw)
  To: linux-arm-kernel

The build failure was introduced by

	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
 arch/arm/mach-imx/mach-cpuimx27.c  |    4 ++--
 arch/arm/mach-imx/mach-pca100.c    |    4 ++--
 arch/arm/mach-mx25/mach-cpuimx25.c |    2 +-
 arch/arm/mach-mx3/mach-cpuimx35.c  |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
index 575ff1a..339150a 100644
--- a/arch/arm/mach-imx/mach-cpuimx27.c
+++ b/arch/arm/mach-imx/mach-cpuimx27.c
@@ -279,13 +279,13 @@ static void __init eukrea_cpuimx27_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
 
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 #endif
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index a389d11..23c9e1f 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -419,13 +419,13 @@ static void __init pca100_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
 
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 #endif
diff --git a/arch/arm/mach-mx25/mach-cpuimx25.c b/arch/arm/mach-mx25/mach-cpuimx25.c
index 56b2e26..0134fb8 100644
--- a/arch/arm/mach-mx25/mach-cpuimx25.c
+++ b/arch/arm/mach-mx25/mach-cpuimx25.c
@@ -138,7 +138,7 @@ static void __init eukrea_cpuimx25_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				USB_OTG_DRV_VBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg, &otg_pdata);
 	}
diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
index 63f970f..117f90e 100644
--- a/arch/arm/mach-mx3/mach-cpuimx35.c
+++ b/arch/arm/mach-mx3/mach-cpuimx35.c
@@ -192,7 +192,7 @@ static void __init mxc_board_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				USB_OTG_DRV_VBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
-- 
1.7.1

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

* Re: [PATCH] ARM: imx: fix build failure concerning otg/ulpi
  2010-08-13 10:21     ` Uwe Kleine-König
@ 2010-08-13 10:54       ` Sergei Shtylyov
  -1 siblings, 0 replies; 34+ messages in thread
From: Sergei Shtylyov @ 2010-08-13 10:54 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Igor Grinberg,
	Mike Rapoport, Greg Kroah-Hartman

Hello.

Uwe Kleine-König wrote:

> The build failure was introduced by
> 
> 	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)

> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Mike Rapoport <mike@compulab.co.il>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>

    Signoff is missing.


> diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
> index 575ff1a..339150a 100644
> --- a/arch/arm/mach-imx/mach-cpuimx27.c
> +++ b/arch/arm/mach-imx/mach-cpuimx27.c
> @@ -279,13 +279,13 @@ static void __init eukrea_cpuimx27_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  		mxc_register_device(&mxc_otg_host, &otg_pdata);
>  	}
>  
>  	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
>  #endif
> diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
> index a389d11..23c9e1f 100644
> --- a/arch/arm/mach-imx/mach-pca100.c
> +++ b/arch/arm/mach-imx/mach-pca100.c
> @@ -419,13 +419,13 @@ static void __init pca100_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  		mxc_register_device(&mxc_otg_host, &otg_pdata);
>  	}
>  
>  	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
>  #endif
> diff --git a/arch/arm/mach-mx25/mach-cpuimx25.c b/arch/arm/mach-mx25/mach-cpuimx25.c
> index 56b2e26..0134fb8 100644
> --- a/arch/arm/mach-mx25/mach-cpuimx25.c
> +++ b/arch/arm/mach-mx25/mach-cpuimx25.c
> @@ -138,7 +138,7 @@ static void __init eukrea_cpuimx25_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				USB_OTG_DRV_VBUS | ULPI_OTG_DRVVBUS_EXT);

    Not ULPI_OTG_DRVVBUS, like in other cases?

>  
>  		mxc_register_device(&mxc_otg, &otg_pdata);
>  	}
> diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
> index 63f970f..117f90e 100644
> --- a/arch/arm/mach-mx3/mach-cpuimx35.c
> +++ b/arch/arm/mach-mx3/mach-cpuimx35.c
> @@ -192,7 +192,7 @@ static void __init mxc_board_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				USB_OTG_DRV_VBUS | ULPI_OTG_DRVVBUS_EXT);

    Same question here...

WBR, Sergei


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

* [PATCH] ARM: imx: fix build failure concerning otg/ulpi
@ 2010-08-13 10:54       ` Sergei Shtylyov
  0 siblings, 0 replies; 34+ messages in thread
From: Sergei Shtylyov @ 2010-08-13 10:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

Uwe Kleine-K?nig wrote:

> The build failure was introduced by
> 
> 	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)

> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Mike Rapoport <mike@compulab.co.il>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>

    Signoff is missing.


> diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
> index 575ff1a..339150a 100644
> --- a/arch/arm/mach-imx/mach-cpuimx27.c
> +++ b/arch/arm/mach-imx/mach-cpuimx27.c
> @@ -279,13 +279,13 @@ static void __init eukrea_cpuimx27_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  		mxc_register_device(&mxc_otg_host, &otg_pdata);
>  	}
>  
>  	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
>  #endif
> diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
> index a389d11..23c9e1f 100644
> --- a/arch/arm/mach-imx/mach-pca100.c
> +++ b/arch/arm/mach-imx/mach-pca100.c
> @@ -419,13 +419,13 @@ static void __init pca100_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  		mxc_register_device(&mxc_otg_host, &otg_pdata);
>  	}
>  
>  	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
>  #endif
> diff --git a/arch/arm/mach-mx25/mach-cpuimx25.c b/arch/arm/mach-mx25/mach-cpuimx25.c
> index 56b2e26..0134fb8 100644
> --- a/arch/arm/mach-mx25/mach-cpuimx25.c
> +++ b/arch/arm/mach-mx25/mach-cpuimx25.c
> @@ -138,7 +138,7 @@ static void __init eukrea_cpuimx25_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				USB_OTG_DRV_VBUS | ULPI_OTG_DRVVBUS_EXT);

    Not ULPI_OTG_DRVVBUS, like in other cases?

>  
>  		mxc_register_device(&mxc_otg, &otg_pdata);
>  	}
> diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
> index 63f970f..117f90e 100644
> --- a/arch/arm/mach-mx3/mach-cpuimx35.c
> +++ b/arch/arm/mach-mx3/mach-cpuimx35.c
> @@ -192,7 +192,7 @@ static void __init mxc_board_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				USB_OTG_DRV_VBUS | ULPI_OTG_DRVVBUS_EXT);

    Same question here...

WBR, Sergei

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

* [PATCH v2] ARM: imx: fix build failure concerning otg/ulpi
  2010-08-13 10:54       ` Sergei Shtylyov
@ 2010-08-13 12:06         ` Uwe Kleine-König
  -1 siblings, 0 replies; 34+ messages in thread
From: Uwe Kleine-König @ 2010-08-13 12:06 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, linux-usb
  Cc: Sergei Shtylyov, Igor Grinberg, Mike Rapoport, Greg Kroah-Hartman

The build failure was introduced by

	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 arch/arm/mach-imx/mach-cpuimx27.c  |    4 ++--
 arch/arm/mach-imx/mach-pca100.c    |    4 ++--
 arch/arm/mach-mx25/mach-cpuimx25.c |    2 +-
 arch/arm/mach-mx3/mach-cpuimx35.c  |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
index 575ff1a..339150a 100644
--- a/arch/arm/mach-imx/mach-cpuimx27.c
+++ b/arch/arm/mach-imx/mach-cpuimx27.c
@@ -279,13 +279,13 @@ static void __init eukrea_cpuimx27_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
 
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 #endif
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index a389d11..23c9e1f 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -419,13 +419,13 @@ static void __init pca100_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
 
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 #endif
diff --git a/arch/arm/mach-mx25/mach-cpuimx25.c b/arch/arm/mach-mx25/mach-cpuimx25.c
index 56b2e26..a5f0174 100644
--- a/arch/arm/mach-mx25/mach-cpuimx25.c
+++ b/arch/arm/mach-mx25/mach-cpuimx25.c
@@ -138,7 +138,7 @@ static void __init eukrea_cpuimx25_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg, &otg_pdata);
 	}
diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
index 63f970f..9770a6a 100644
--- a/arch/arm/mach-mx3/mach-cpuimx35.c
+++ b/arch/arm/mach-mx3/mach-cpuimx35.c
@@ -192,7 +192,7 @@ static void __init mxc_board_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
-- 
1.7.1


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

* [PATCH v2] ARM: imx: fix build failure concerning otg/ulpi
@ 2010-08-13 12:06         ` Uwe Kleine-König
  0 siblings, 0 replies; 34+ messages in thread
From: Uwe Kleine-König @ 2010-08-13 12:06 UTC (permalink / raw)
  To: linux-arm-kernel

The build failure was introduced by

	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
 arch/arm/mach-imx/mach-cpuimx27.c  |    4 ++--
 arch/arm/mach-imx/mach-pca100.c    |    4 ++--
 arch/arm/mach-mx25/mach-cpuimx25.c |    2 +-
 arch/arm/mach-mx3/mach-cpuimx35.c  |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
index 575ff1a..339150a 100644
--- a/arch/arm/mach-imx/mach-cpuimx27.c
+++ b/arch/arm/mach-imx/mach-cpuimx27.c
@@ -279,13 +279,13 @@ static void __init eukrea_cpuimx27_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
 
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 #endif
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index a389d11..23c9e1f 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -419,13 +419,13 @@ static void __init pca100_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
 
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 #endif
diff --git a/arch/arm/mach-mx25/mach-cpuimx25.c b/arch/arm/mach-mx25/mach-cpuimx25.c
index 56b2e26..a5f0174 100644
--- a/arch/arm/mach-mx25/mach-cpuimx25.c
+++ b/arch/arm/mach-mx25/mach-cpuimx25.c
@@ -138,7 +138,7 @@ static void __init eukrea_cpuimx25_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg, &otg_pdata);
 	}
diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
index 63f970f..9770a6a 100644
--- a/arch/arm/mach-mx3/mach-cpuimx35.c
+++ b/arch/arm/mach-mx3/mach-cpuimx35.c
@@ -192,7 +192,7 @@ static void __init mxc_board_init(void)
 #if defined(CONFIG_USB_ULPI)
 	if (otg_mode_host) {
 		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
+				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 		mxc_register_device(&mxc_otg_host, &otg_pdata);
 	}
-- 
1.7.1

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

* Re: [PATCH v2] ARM: imx: fix build failure concerning otg/ulpi
  2010-08-13 12:06         ` Uwe Kleine-König
@ 2010-08-15  6:05           ` Igor Grinberg
  -1 siblings, 0 replies; 34+ messages in thread
From: Igor Grinberg @ 2010-08-15  6:05 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-kernel, linux-arm-kernel, linux-usb, Sergei Shtylyov,
	Mike Rapoport, Greg Kroah-Hartman

On 08/13/10 15:06, Uwe Kleine-König wrote:
> The build failure was introduced by
>
> 	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)
>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Mike Rapoport <mike@compulab.co.il>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>   

I've based my patches on v2.6.35-rc6, so I could not patch
those imx variants, sorry...
But I did deal with mach-pca100.c, so I think moving it from
mach-mx2 to mach-imx is what made it miss my patch.

Anyway, this looks like the right addition.

Thanks

> ---
>  arch/arm/mach-imx/mach-cpuimx27.c  |    4 ++--
>  arch/arm/mach-imx/mach-pca100.c    |    4 ++--
>  arch/arm/mach-mx25/mach-cpuimx25.c |    2 +-
>  arch/arm/mach-mx3/mach-cpuimx35.c  |    2 +-
>  4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
> index 575ff1a..339150a 100644
> --- a/arch/arm/mach-imx/mach-cpuimx27.c
> +++ b/arch/arm/mach-imx/mach-cpuimx27.c
> @@ -279,13 +279,13 @@ static void __init eukrea_cpuimx27_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  		mxc_register_device(&mxc_otg_host, &otg_pdata);
>  	}
>  
>  	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
>  #endif
> diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
> index a389d11..23c9e1f 100644
> --- a/arch/arm/mach-imx/mach-pca100.c
> +++ b/arch/arm/mach-imx/mach-pca100.c
> @@ -419,13 +419,13 @@ static void __init pca100_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  		mxc_register_device(&mxc_otg_host, &otg_pdata);
>  	}
>  
>  	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
>  #endif
> diff --git a/arch/arm/mach-mx25/mach-cpuimx25.c b/arch/arm/mach-mx25/mach-cpuimx25.c
> index 56b2e26..a5f0174 100644
> --- a/arch/arm/mach-mx25/mach-cpuimx25.c
> +++ b/arch/arm/mach-mx25/mach-cpuimx25.c
> @@ -138,7 +138,7 @@ static void __init eukrea_cpuimx25_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  		mxc_register_device(&mxc_otg, &otg_pdata);
>  	}
> diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
> index 63f970f..9770a6a 100644
> --- a/arch/arm/mach-mx3/mach-cpuimx35.c
> +++ b/arch/arm/mach-mx3/mach-cpuimx35.c
> @@ -192,7 +192,7 @@ static void __init mxc_board_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  		mxc_register_device(&mxc_otg_host, &otg_pdata);
>  	}
>   

-- 
Regards,
Igor.


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

* [PATCH v2] ARM: imx: fix build failure concerning otg/ulpi
@ 2010-08-15  6:05           ` Igor Grinberg
  0 siblings, 0 replies; 34+ messages in thread
From: Igor Grinberg @ 2010-08-15  6:05 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/13/10 15:06, Uwe Kleine-K?nig wrote:
> The build failure was introduced by
>
> 	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)
>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Mike Rapoport <mike@compulab.co.il>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
>   

I've based my patches on v2.6.35-rc6, so I could not patch
those imx variants, sorry...
But I did deal with mach-pca100.c, so I think moving it from
mach-mx2 to mach-imx is what made it miss my patch.

Anyway, this looks like the right addition.

Thanks

> ---
>  arch/arm/mach-imx/mach-cpuimx27.c  |    4 ++--
>  arch/arm/mach-imx/mach-pca100.c    |    4 ++--
>  arch/arm/mach-mx25/mach-cpuimx25.c |    2 +-
>  arch/arm/mach-mx3/mach-cpuimx35.c  |    2 +-
>  4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
> index 575ff1a..339150a 100644
> --- a/arch/arm/mach-imx/mach-cpuimx27.c
> +++ b/arch/arm/mach-imx/mach-cpuimx27.c
> @@ -279,13 +279,13 @@ static void __init eukrea_cpuimx27_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  		mxc_register_device(&mxc_otg_host, &otg_pdata);
>  	}
>  
>  	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
>  #endif
> diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
> index a389d11..23c9e1f 100644
> --- a/arch/arm/mach-imx/mach-pca100.c
> +++ b/arch/arm/mach-imx/mach-pca100.c
> @@ -419,13 +419,13 @@ static void __init pca100_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  		mxc_register_device(&mxc_otg_host, &otg_pdata);
>  	}
>  
>  	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  	mxc_register_device(&mxc_usbh2, &usbh2_pdata);
>  #endif
> diff --git a/arch/arm/mach-mx25/mach-cpuimx25.c b/arch/arm/mach-mx25/mach-cpuimx25.c
> index 56b2e26..a5f0174 100644
> --- a/arch/arm/mach-mx25/mach-cpuimx25.c
> +++ b/arch/arm/mach-mx25/mach-cpuimx25.c
> @@ -138,7 +138,7 @@ static void __init eukrea_cpuimx25_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  		mxc_register_device(&mxc_otg, &otg_pdata);
>  	}
> diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
> index 63f970f..9770a6a 100644
> --- a/arch/arm/mach-mx3/mach-cpuimx35.c
> +++ b/arch/arm/mach-mx3/mach-cpuimx35.c
> @@ -192,7 +192,7 @@ static void __init mxc_board_init(void)
>  #if defined(CONFIG_USB_ULPI)
>  	if (otg_mode_host) {
>  		otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
> -				USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
> +				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
>  
>  		mxc_register_device(&mxc_otg_host, &otg_pdata);
>  	}
>   

-- 
Regards,
Igor.

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

* Re: [PATCH v2] ARM: imx: fix build failure concerning otg/ulpi
  2010-08-15  6:05           ` Igor Grinberg
@ 2010-08-16  4:53             ` Uwe Kleine-König
  -1 siblings, 0 replies; 34+ messages in thread
From: Uwe Kleine-König @ 2010-08-16  4:53 UTC (permalink / raw)
  To: Igor Grinberg
  Cc: linux-kernel, linux-arm-kernel, linux-usb, Sergei Shtylyov,
	Mike Rapoport, Greg Kroah-Hartman

Hello Igor,

On Sun, Aug 15, 2010 at 09:05:59AM +0300, Igor Grinberg wrote:
> On 08/13/10 15:06, Uwe Kleine-König wrote:
> > The build failure was introduced by
> >
> > 	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)
> >
> > Cc: Igor Grinberg <grinberg@compulab.co.il>
> > Cc: Mike Rapoport <mike@compulab.co.il>
> > Cc: Greg Kroah-Hartman <gregkh@suse.de>
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> >   
> 
> I've based my patches on v2.6.35-rc6, so I could not patch
> those imx variants, sorry...
> But I did deal with mach-pca100.c, so I think moving it from
> mach-mx2 to mach-imx is what made it miss my patch.
> 
> Anyway, this looks like the right addition.
I assume this is an Ack?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* [PATCH v2] ARM: imx: fix build failure concerning otg/ulpi
@ 2010-08-16  4:53             ` Uwe Kleine-König
  0 siblings, 0 replies; 34+ messages in thread
From: Uwe Kleine-König @ 2010-08-16  4:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Igor,

On Sun, Aug 15, 2010 at 09:05:59AM +0300, Igor Grinberg wrote:
> On 08/13/10 15:06, Uwe Kleine-K?nig wrote:
> > The build failure was introduced by
> >
> > 	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)
> >
> > Cc: Igor Grinberg <grinberg@compulab.co.il>
> > Cc: Mike Rapoport <mike@compulab.co.il>
> > Cc: Greg Kroah-Hartman <gregkh@suse.de>
> > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> >   
> 
> I've based my patches on v2.6.35-rc6, so I could not patch
> those imx variants, sorry...
> But I did deal with mach-pca100.c, so I think moving it from
> mach-mx2 to mach-imx is what made it miss my patch.
> 
> Anyway, this looks like the right addition.
I assume this is an Ack?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* Re: [PATCH v2] ARM: imx: fix build failure concerning otg/ulpi
  2010-08-16  4:53             ` Uwe Kleine-König
@ 2010-08-16  6:09               ` Igor Grinberg
  -1 siblings, 0 replies; 34+ messages in thread
From: Igor Grinberg @ 2010-08-16  6:09 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-kernel, linux-arm-kernel, linux-usb, Sergei Shtylyov,
	Mike Rapoport, Greg Kroah-Hartman

On 08/16/10 07:53, Uwe Kleine-König wrote:
> Hello Igor,
>
> On Sun, Aug 15, 2010 at 09:05:59AM +0300, Igor Grinberg wrote:
>   
>> On 08/13/10 15:06, Uwe Kleine-König wrote:
>>     
>>> The build failure was introduced by
>>>
>>> 	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)
>>>
>>> Cc: Igor Grinberg <grinberg@compulab.co.il>
>>> Cc: Mike Rapoport <mike@compulab.co.il>
>>> Cc: Greg Kroah-Hartman <gregkh@suse.de>
>>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>>>   
>>>       
>> I've based my patches on v2.6.35-rc6, so I could not patch
>> those imx variants, sorry...
>> But I did deal with mach-pca100.c, so I think moving it from
>> mach-mx2 to mach-imx is what made it miss my patch.
>>
>> Anyway, this looks like the right addition.
>>     
> I assume this is an Ack?
>   

Acked-by: Igor Grinberg <grinberg@compulab.co.il>


Greg,

Can you, please, add this as a fix (maybe urgent) for build failure?

Thanks

> Best regards
> Uwe
>
>   

-- 
Regards,
Igor.


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

* [PATCH v2] ARM: imx: fix build failure concerning otg/ulpi
@ 2010-08-16  6:09               ` Igor Grinberg
  0 siblings, 0 replies; 34+ messages in thread
From: Igor Grinberg @ 2010-08-16  6:09 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/16/10 07:53, Uwe Kleine-K?nig wrote:
> Hello Igor,
>
> On Sun, Aug 15, 2010 at 09:05:59AM +0300, Igor Grinberg wrote:
>   
>> On 08/13/10 15:06, Uwe Kleine-K?nig wrote:
>>     
>>> The build failure was introduced by
>>>
>>> 	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)
>>>
>>> Cc: Igor Grinberg <grinberg@compulab.co.il>
>>> Cc: Mike Rapoport <mike@compulab.co.il>
>>> Cc: Greg Kroah-Hartman <gregkh@suse.de>
>>> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
>>>   
>>>       
>> I've based my patches on v2.6.35-rc6, so I could not patch
>> those imx variants, sorry...
>> But I did deal with mach-pca100.c, so I think moving it from
>> mach-mx2 to mach-imx is what made it miss my patch.
>>
>> Anyway, this looks like the right addition.
>>     
> I assume this is an Ack?
>   

Acked-by: Igor Grinberg <grinberg@compulab.co.il>


Greg,

Can you, please, add this as a fix (maybe urgent) for build failure?

Thanks

> Best regards
> Uwe
>
>   

-- 
Regards,
Igor.

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

* Re: [PATCH v2] ARM: imx: fix build failure concerning otg/ulpi
  2010-08-16  6:09               ` Igor Grinberg
@ 2010-08-22  7:24                 ` Igor Grinberg
  -1 siblings, 0 replies; 34+ messages in thread
From: Igor Grinberg @ 2010-08-22  7:24 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Greg Kroah-Hartman, Sergei Shtylyov, linux-usb, linux-kernel,
	Mike Rapoport, linux-arm-kernel

 Greg,

ping...

On 08/16/10 09:09, Igor Grinberg wrote:
> On 08/16/10 07:53, Uwe Kleine-König wrote:
>> Hello Igor,
>>
>> On Sun, Aug 15, 2010 at 09:05:59AM +0300, Igor Grinberg wrote:
>>   
>>> On 08/13/10 15:06, Uwe Kleine-König wrote:
>>>     
>>>> The build failure was introduced by
>>>>
>>>> 	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)
>>>>
>>>> Cc: Igor Grinberg <grinberg@compulab.co.il>
>>>> Cc: Mike Rapoport <mike@compulab.co.il>
>>>> Cc: Greg Kroah-Hartman <gregkh@suse.de>
>>>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>>>>   
>>>>       
>>> I've based my patches on v2.6.35-rc6, so I could not patch
>>> those imx variants, sorry...
>>> But I did deal with mach-pca100.c, so I think moving it from
>>> mach-mx2 to mach-imx is what made it miss my patch.
>>>
>>> Anyway, this looks like the right addition.
>>>     
>> I assume this is an Ack?
>>   
> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
>
>
> Greg,
>
> Can you, please, add this as a fix (maybe urgent) for build failure?
>
> Thanks
>
>> Best regards
>> Uwe
>>
>>   

-- 
Regards,
Igor.


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

* [PATCH v2] ARM: imx: fix build failure concerning otg/ulpi
@ 2010-08-22  7:24                 ` Igor Grinberg
  0 siblings, 0 replies; 34+ messages in thread
From: Igor Grinberg @ 2010-08-22  7:24 UTC (permalink / raw)
  To: linux-arm-kernel

 Greg,

ping...

On 08/16/10 09:09, Igor Grinberg wrote:
> On 08/16/10 07:53, Uwe Kleine-K?nig wrote:
>> Hello Igor,
>>
>> On Sun, Aug 15, 2010 at 09:05:59AM +0300, Igor Grinberg wrote:
>>   
>>> On 08/13/10 15:06, Uwe Kleine-K?nig wrote:
>>>     
>>>> The build failure was introduced by
>>>>
>>>> 	13dd0c9 (USB: otg/ulpi: extend the generic ulpi driver.)
>>>>
>>>> Cc: Igor Grinberg <grinberg@compulab.co.il>
>>>> Cc: Mike Rapoport <mike@compulab.co.il>
>>>> Cc: Greg Kroah-Hartman <gregkh@suse.de>
>>>> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
>>>>   
>>>>       
>>> I've based my patches on v2.6.35-rc6, so I could not patch
>>> those imx variants, sorry...
>>> But I did deal with mach-pca100.c, so I think moving it from
>>> mach-mx2 to mach-imx is what made it miss my patch.
>>>
>>> Anyway, this looks like the right addition.
>>>     
>> I assume this is an Ack?
>>   
> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
>
>
> Greg,
>
> Can you, please, add this as a fix (maybe urgent) for build failure?
>
> Thanks
>
>> Best regards
>> Uwe
>>
>>   

-- 
Regards,
Igor.

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

* Re: [PATCH v2] ARM: imx: fix build failure concerning otg/ulpi
  2010-08-22  7:24                 ` Igor Grinberg
@ 2010-08-22 17:10                   ` Greg KH
  -1 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2010-08-22 17:10 UTC (permalink / raw)
  To: Igor Grinberg
  Cc: Uwe Kleine-K?nig, Sergei Shtylyov, linux-usb, linux-kernel,
	Mike Rapoport, linux-arm-kernel

On Sun, Aug 22, 2010 at 10:24:59AM +0300, Igor Grinberg wrote:
>  Greg,
> 
> ping...

Sorry, it's in my queue, swamped with -stable work at the moment.  Will
get to Linus soon...

greg k-h

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

* [PATCH v2] ARM: imx: fix build failure concerning otg/ulpi
@ 2010-08-22 17:10                   ` Greg KH
  0 siblings, 0 replies; 34+ messages in thread
From: Greg KH @ 2010-08-22 17:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Aug 22, 2010 at 10:24:59AM +0300, Igor Grinberg wrote:
>  Greg,
> 
> ping...

Sorry, it's in my queue, swamped with -stable work at the moment.  Will
get to Linus soon...

greg k-h

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

end of thread, other threads:[~2010-08-22 17:26 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-02  7:40 [PATCH 0/5] Enable pxa310 usb otg port host mode Igor Grinberg
2010-06-02  7:40 ` [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver Igor Grinberg
2010-06-02  7:40   ` [PATCH 2/5] usb/otg/ulpi: add support for SMSC USB3319 ulpi phy Igor Grinberg
2010-06-02  7:40     ` [PATCH 3/5] [ARM] pxa: add PXA310 specific ULPI implementation Igor Grinberg
2010-06-02  7:40       ` [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode Igor Grinberg
2010-06-02  7:40         ` [PATCH 5/5] [ARM] pxa/cm-x300: enable USB host port 2 on CM-X300 with PXA310 cpu Igor Grinberg
2010-06-12 11:48         ` [PATCH 4/5] [ARM] usb/host/ohci-pxa27x: make PXA310 USB OTG port work in host mode Eric Miao
2010-06-12 14:24           ` David Brownell
2010-06-13  6:57           ` Mike Rapoport
2010-06-13  7:04             ` Eric Miao
2010-06-13  7:06               ` Mike Rapoport
2010-06-12  9:35   ` [PATCH 1/5] usb/otg/ulpi: extend the generic ulpi driver Eric Miao
2010-06-12 17:34     ` David Brownell
2010-06-15 14:47     ` Igor Grinberg
2010-08-13 10:21   ` [PATCH] ARM: imx: fix build failure concerning otg/ulpi Uwe Kleine-König
2010-08-13 10:21     ` Uwe Kleine-König
2010-08-13 10:54     ` Sergei Shtylyov
2010-08-13 10:54       ` Sergei Shtylyov
2010-08-13 12:06       ` [PATCH v2] " Uwe Kleine-König
2010-08-13 12:06         ` Uwe Kleine-König
2010-08-15  6:05         ` Igor Grinberg
2010-08-15  6:05           ` Igor Grinberg
2010-08-16  4:53           ` Uwe Kleine-König
2010-08-16  4:53             ` Uwe Kleine-König
2010-08-16  6:09             ` Igor Grinberg
2010-08-16  6:09               ` Igor Grinberg
2010-08-22  7:24               ` Igor Grinberg
2010-08-22  7:24                 ` Igor Grinberg
2010-08-22 17:10                 ` Greg KH
2010-08-22 17:10                   ` Greg KH
2010-06-02  8:29 ` [PATCH 0/5] Enable pxa310 usb otg port host mode Eric Miao
2010-06-06  6:15   ` Igor Grinberg
2010-06-09 11:49 ` Mike Rapoport
2010-06-09 12:43   ` Eric Miao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.