From patchwork Mon Mar 24 01:52:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Qiang X-Patchwork-Id: 332944 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id D102D2C00CB for ; Mon, 24 Mar 2014 12:54:50 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C9FFE4B5F1; Mon, 24 Mar 2014 02:54:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C5Iw36Mn78ca; Mon, 24 Mar 2014 02:54:47 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CA6E14B5D2; Mon, 24 Mar 2014 02:54:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 42AE54B5D2 for ; Mon, 24 Mar 2014 02:54:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zXAACOEANUYy for ; Mon, 24 Mar 2014 02:54:37 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from va3outboundpool.messaging.microsoft.com (va3ehsobe001.messaging.microsoft.com [216.32.180.11]) by theia.denx.de (Postfix) with ESMTPS id 2EC114B5CD for ; Mon, 24 Mar 2014 02:54:34 +0100 (CET) Received: from mail74-va3-R.bigfish.com (10.7.14.249) by VA3EHSOBE004.bigfish.com (10.7.40.24) with Microsoft SMTP Server id 14.1.225.22; Mon, 24 Mar 2014 01:54:31 +0000 Received: from mail74-va3 (localhost [127.0.0.1]) by mail74-va3-R.bigfish.com (Postfix) with ESMTP id 9E3A41200AD for ; Mon, 24 Mar 2014 01:54:31 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 3 X-BigFish: VS3(zze0eahzz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah1fc6h1082kzz1de098h8275bh1de097hz2dh2a8h839he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh2222h224fh1fb3h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1fe8h1ff5h2218h2216h226dh22d0h24afh2327h2336h2438h2461h2487h24d7h2516h2545h255eh25cch25f6h2605h268bh1155h) Received: from mail74-va3 (localhost.localdomain [127.0.0.1]) by mail74-va3 (MessageSwitch) id 1395626070170674_27221; Mon, 24 Mar 2014 01:54:30 +0000 (UTC) Received: from VA3EHSMHS031.bigfish.com (unknown [10.7.14.248]) by mail74-va3.bigfish.com (Postfix) with ESMTP id 0E457140062; Mon, 24 Mar 2014 01:54:30 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS031.bigfish.com (10.7.99.41) with Microsoft SMTP Server (TLS) id 14.16.227.3; Mon, 24 Mar 2014 01:54:19 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.3.158.2; Mon, 24 Mar 2014 01:54:18 +0000 Received: from titan.am.freescale.net (b45104-01-010192208233.ap.freescale.net [10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s2O1sCMn006272; Sun, 23 Mar 2014 18:54:16 -0700 From: Zhao Qiang To: , Date: Mon, 24 Mar 2014 09:52:27 +0800 Message-ID: <1395625947-48076-1-git-send-email-B45475@freescale.com> X-Mailer: git-send-email 1.8.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-FOPE-CONNECTOR: Id%0$Dn%FREESCALE.MAIL.ONMICROSOFT.COM$RO%1$TLS%0$FQDN%$TlsDn% Cc: Zhao Qiang , R63061@freescale.com Subject: [U-Boot] [PATCH] usb/xhci: remove XHCI init code from other usb controllers X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- 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);