[U-Boot] [PATCH] usb/ehci: remove XHCI init code from EHCI

Zhao Qiang B45475 at freescale.com
Fri Mar 21 09:37:59 CET 2014


The patch with commit id "020bbcb76b5be0d5406d2ae7c26dbdb013ead812"
adds some init codes for XHCI but not for EHCI.
It will causes a bug for EHCI.
so use macro "#ifndef CONFIG_USB_EHCI" to mask
it for EHCI.

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

diff --git a/common/usb_hub.c b/common/usb_hub.c
index ffac0e7..1cea6cf 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;
+
+#ifndef CONFIG_USB_EHCI
 	ALLOC_CACHE_ALIGN_BUFFER(struct usb_port_status, portsts, 1);
 	unsigned short portstatus;
 	int ret;
+#endif
 
 	dev = hub->pusb_dev;
 
+#ifndef CONFIG_USB_EHCI
 	/*
 	 * 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);
-- 
1.8.5




More information about the U-Boot mailing list