All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhao Qiang <B45475@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb/xhci: remove XHCI init code from other usb controllers
Date: Mon, 24 Mar 2014 09:52:27 +0800	[thread overview]
Message-ID: <1395625947-48076-1-git-send-email-B45475@freescale.com> (raw)

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(+)

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);
-- 
1.8.5

             reply	other threads:[~2014-03-24  1:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24  1:52 Zhao Qiang [this message]
2014-10-22 18:56 ` [U-Boot] [PATCH] usb/xhci: remove XHCI init code from other usb controllers Marek Vasut
2014-10-22 19:33   ` York Sun
2014-10-22 19:37     ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395625947-48076-1-git-send-email-B45475@freescale.com \
    --to=b45475@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.