Skip to contentSkip to conversation

USB: Fix trout build failure with ci13xxx_msm gadget

PATCH In review Pavankumar Kondeti 5 participants 7 messages Feb 4, 2011 – Apr 13, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB: Fix trout build failure with ci13xxx_msm gadget

This patch fixes the below compilation errors.

CC drivers/usb/gadget/ci13xxx_msm.o
CC net/mac80211/led.o
drivers/usb/gadget/ci13xxx_msm.c: In function 'ci13xxx_msm_notify_event':
drivers/usb/gadget/ci13xxx_msm.c:42: error: 'USB_AHBBURST' undeclared (first use in this function) drivers/usb/gadget/ci13xxx_msm.c:42: error: (Each undeclared identifier is reported only once drivers/usb/gadget/ci13xxx_msm.c:42: error: for each function it appears in.) drivers/usb/gadget/ci13xxx_msm.c:43: error: 'USB_AHBMODE' undeclared (first use in this function)
make[4]: *** [drivers/usb/gadget/ci13xxx_msm.o] Error 1
make[3]: *** [drivers/usb/gadget] Error 2

MSM USB driver is not supported on boards like trout (MSM7201) which has an external PHY.

---
 drivers/usb/gadget/Kconfig       |    2 ++
 drivers/usb/host/Kconfig         |    2 ++
 drivers/usb/otg/Kconfig          |    2 ++
 include/linux/usb/msm_hsusb_hw.h |    4 ----
 4 files changed, 6 insertions(+), 4 deletions(-)
drivers/usb/gadget/Kconfig +2 -0
index 06bb9d4..d500996 100644
@@ -546,6 +546,8 @@ config USB_GADGET_CI13XXX_MSM
 	  ci13xxx_udc core.
 	  This driver depends on OTG driver for PHY initialization,
 	  clock management, powering up VBUS, and power management.
+	  This driver is not supported on boards like trout which
+	  has an external PHY.
 
 	  Say "y" to link the driver statically, or "m" to build a
 	  dynamically linked module called "ci13xxx_msm" and force all
drivers/usb/host/Kconfig +2 -0
index 24046c0..0e6afa2 100644
@@ -151,6 +151,8 @@ config USB_EHCI_MSM
 	  Qualcomm chipsets. Root Hub has inbuilt TT.
 	  This driver depends on OTG driver for PHY initialization,
 	  clock management, powering up VBUS, and power management.
+	  This driver is not supported on boards like trout which
+	  has an external PHY.
 
 config USB_EHCI_HCD_PPC_OF
 	bool "EHCI support for PPC USB controller on OF platform bus"
drivers/usb/otg/Kconfig +2 -0
index 9fb875d..9ffc823 100644
@@ -103,6 +103,8 @@ config USB_MSM_OTG_72K
 	  required after resetting the hardware and power management.
 	  This driver is required even for peripheral only or host only
 	  mode configurations.
+	  This driver is not supported on boards like trout which
+	  has an external PHY.
 
 config AB8500_USB
         tristate "AB8500 USB Transceiver Driver"
include/linux/usb/msm_hsusb_hw.h +0 -4
index b92e173..7d1babb 100644
@@ -16,12 +16,8 @@
 #ifndef __LINUX_USB_GADGET_MSM72K_UDC_H__
 #define __LINUX_USB_GADGET_MSM72K_UDC_H__
 
-#ifdef CONFIG_ARCH_MSM7X00A
-#define USB_SBUSCFG          (MSM_USB_BASE + 0x0090)
-#else
 #define USB_AHBBURST         (MSM_USB_BASE + 0x0090)
 #define USB_AHBMODE          (MSM_USB_BASE + 0x0098)
-#endif
 #define USB_CAPLENGTH        (MSM_USB_BASE + 0x0100) /* 8 bit */
 
 #define USB_USBCMD           (MSM_USB_BASE + 0x0140)
Signature · 5 lines
1.7.1

--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#1 lore raw

Review

Quoted 3 lines · Pavankumar Kondeti
(quoted diff) +2 -0
+         This driver is not supported on boards like trout which
+         has an external PHY.

What is an external PHY?

Daniel

Signature · 3 lines
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum.
#2 lore raw
Quoted 8 lines · Daniel Walker

Review

Quoted 3 lines · Pavankumar Kondeti
(quoted diff) +2 -0
+         This driver is not supported on boards like trout which
+         has an external PHY.

What is an external PHY?

Daniel

In this context, external to the SoC.

- Bryan

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#3 lore raw
In reply to Daniel Walker
Quoted 6 lines · Daniel Walker

Review

Quoted 3 lines · Pavankumar Kondeti
(quoted diff) +2 -0
+         This driver is not supported on boards like trout which
+         has an external PHY.

What is an external PHY?

http://en.wikipedia.org/wiki/PHY_(chip)

It is a PHY that is external to the MSM chip.

David

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#4 lore raw
In reply to Pavankumar Kondeti
Quoted 12 lines · Pavankumar Kondeti

This patch fixes the below compilation errors.

CC drivers/usb/gadget/ci13xxx_msm.o
CC net/mac80211/led.o
drivers/usb/gadget/ci13xxx_msm.c: In function 'ci13xxx_msm_notify_event':
drivers/usb/gadget/ci13xxx_msm.c:42: error: 'USB_AHBBURST' undeclared (first use in this function) drivers/usb/gadget/ci13xxx_msm.c:42: error: (Each undeclared identifier is reported only once drivers/usb/gadget/ci13xxx_msm.c:42: error: for each function it appears in.) drivers/usb/gadget/ci13xxx_msm.c:43: error: 'USB_AHBMODE' undeclared (first use in this function)
make[4]: *** [drivers/usb/gadget/ci13xxx_msm.o] Error 1
make[3]: *** [drivers/usb/gadget] Error 2

Quoted 4 lines

MSM USB driver is not supported on boards like trout (MSM7201) which has an external PHY.

the real fix, though, would be to phase out the PHY to drivers/usb/otg/blablabla.c. ci13xxx_msm.c shouldn't assume the PHY it's using. That's wrong.

Signature · 1 line
balbi
#5 lore raw
Quoted 13 lines · Felipe Balbi
Quoted 12 lines · Pavankumar Kondeti

This patch fixes the below compilation errors.

CC drivers/usb/gadget/ci13xxx_msm.o
CC net/mac80211/led.o
drivers/usb/gadget/ci13xxx_msm.c: In function 'ci13xxx_msm_notify_event':
drivers/usb/gadget/ci13xxx_msm.c:42: error: 'USB_AHBBURST' undeclared (first use in this function) drivers/usb/gadget/ci13xxx_msm.c:42: error: (Each undeclared identifier is reported only once drivers/usb/gadget/ci13xxx_msm.c:42: error: for each function it appears in.) drivers/usb/gadget/ci13xxx_msm.c:43: error: 'USB_AHBMODE' undeclared (first use in this function)
make[4]: *** [drivers/usb/gadget/ci13xxx_msm.o] Error 1
make[3]: *** [drivers/usb/gadget] Error 2

Quoted 9 lines
Quoted 4 lines

MSM USB driver is not supported on boards like trout (MSM7201) which has an external PHY.

the real fix, though, would be to phase out the PHY to drivers/usb/otg/blablabla.c. ci13xxx_msm.c shouldn't assume the PHY it's using. That's wrong.

Agreed. Thanks for pointing this out.

I think OTG driver should bail out if the PHY (or SoC) is not supported; which means otg_get_transceiver() returns NULL and gadget/host driver's probe also will fail.

Signature · 2 lines
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#6 lore raw
Quoted 23 lines · Pavan Kondeti
Quoted 13 lines · Felipe Balbi
Quoted 12 lines · Pavankumar Kondeti

This patch fixes the below compilation errors.

CC drivers/usb/gadget/ci13xxx_msm.o
CC net/mac80211/led.o
drivers/usb/gadget/ci13xxx_msm.c: In function 'ci13xxx_msm_notify_event':
drivers/usb/gadget/ci13xxx_msm.c:42: error: 'USB_AHBBURST' undeclared (first use in this function) drivers/usb/gadget/ci13xxx_msm.c:42: error: (Each undeclared identifier is reported only once drivers/usb/gadget/ci13xxx_msm.c:42: error: for each function it appears in.) drivers/usb/gadget/ci13xxx_msm.c:43: error: 'USB_AHBMODE' undeclared (first use in this function)
make[4]: *** [drivers/usb/gadget/ci13xxx_msm.o] Error 1
make[3]: *** [drivers/usb/gadget] Error 2

Quoted 9 lines
Quoted 4 lines

MSM USB driver is not supported on boards like trout (MSM7201) which has an external PHY.

the real fix, though, would be to phase out the PHY to drivers/usb/otg/blablabla.c. ci13xxx_msm.c shouldn't assume the PHY it's using. That's wrong.

Quoted 5 lines

Agreed. Thanks for pointing this out.

I think OTG driver should bail out if the PHY (or SoC) is not supported; which means otg_get_transceiver() returns NULL and gadget/host driver's probe also will fail.

correct :-)

Signature · 1 line
balbi