diff mbox

[U-Boot] usb/xhci: remove XHCI init code from other usb controllers

Message ID 1395625947-48076-1-git-send-email-B45475@freescale.com
State Not Applicable
Delegated to: Marek Vasut
Headers show

Commit Message

Zhao Qiang March 24, 2014, 1:52 a.m. UTC
The patch with commit id "020bbcb76b5be0d5406d2ae7c26dbdb013ead812"
adds some init codes for XHCI but not for other usb controllers.
And it will causes a bug for EHCI.
so use macro "#ifdef CONFIG_USB_XHCI" to run it just for XHCI.

Signed-off-by: Zhao Qiang <B45475@freescale.com>
---
 common/usb_hub.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Marek Vasut Oct. 22, 2014, 6:56 p.m. UTC | #1
On Monday, March 24, 2014 at 02:52:27 AM, Zhao Qiang wrote:
> The patch with commit id "020bbcb76b5be0d5406d2ae7c26dbdb013ead812"
> adds some init codes for XHCI but not for other usb controllers.
> And it will causes a bug for EHCI.
> so use macro "#ifdef CONFIG_USB_XHCI" to run it just for XHCI.
> 
> Signed-off-by: Zhao Qiang <B45475@freescale.com>

Is this still relevant? What kind of bug does this fix exactly?

Also, next time please CC me.

Best regards,
Marek Vasut
York Sun Oct. 22, 2014, 7:33 p.m. UTC | #2
On 10/22/2014 11:56 AM, Marek Vasut wrote:
> On Monday, March 24, 2014 at 02:52:27 AM, Zhao Qiang wrote:
>> The patch with commit id "020bbcb76b5be0d5406d2ae7c26dbdb013ead812"
>> adds some init codes for XHCI but not for other usb controllers.
>> And it will causes a bug for EHCI.
>> so use macro "#ifdef CONFIG_USB_XHCI" to run it just for XHCI.
>>
>> Signed-off-by: Zhao Qiang <B45475@freescale.com>
> 
> Is this still relevant? What kind of bug does this fix exactly?
> 
> Also, next time please CC me.
> 

I think so. Qiang just pinged me yesterday. Do you think it is reasonable to
conditionally power cycle the ports?

York
Marek Vasut Oct. 22, 2014, 7:37 p.m. UTC | #3
On Wednesday, October 22, 2014 at 09:33:21 PM, York Sun wrote:
> On 10/22/2014 11:56 AM, Marek Vasut wrote:
> > On Monday, March 24, 2014 at 02:52:27 AM, Zhao Qiang wrote:
> >> The patch with commit id "020bbcb76b5be0d5406d2ae7c26dbdb013ead812"
> >> adds some init codes for XHCI but not for other usb controllers.
> >> And it will causes a bug for EHCI.
> >> so use macro "#ifdef CONFIG_USB_XHCI" to run it just for XHCI.
> >> 
> >> Signed-off-by: Zhao Qiang <B45475@freescale.com>
> > 
> > Is this still relevant? What kind of bug does this fix exactly?
> > 
> > Also, next time please CC me.
> 
> I think so. Qiang just pinged me yesterday. Do you think it is reasonable
> to conditionally power cycle the ports?

CCing samsung guys. I have yet to hear what issue do you observe with this 
patch.

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/common/usb_hub.c b/common/usb_hub.c
index ffac0e7..7f791f1 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -90,12 +90,16 @@  static void usb_hub_power_on(struct usb_hub_device *hub)
 	int i;
 	struct usb_device *dev;
 	unsigned pgood_delay = hub->desc.bPwrOn2PwrGood * 2;
+
+#ifdef CONFIG_USB_XHCI
 	ALLOC_CACHE_ALIGN_BUFFER(struct usb_port_status, portsts, 1);
 	unsigned short portstatus;
 	int ret;
+#endif
 
 	dev = hub->pusb_dev;
 
+#ifdef CONFIG_USB_XHCI
 	/*
 	 * Enable power to the ports:
 	 * Here we Power-cycle the ports: aka,
@@ -132,6 +136,7 @@  static void usb_hub_power_on(struct usb_hub_device *hub)
 			continue;
 		}
 	}
+#endif
 
 	for (i = 0; i < dev->maxchild; i++) {
 		usb_set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);