From patchwork Wed Mar 27 09:29:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 15680 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 294D123E10 for ; Wed, 27 Mar 2013 09:32:30 +0000 (UTC) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by fiordland.canonical.com (Postfix) with ESMTP id C4249A180F9 for ; Wed, 27 Mar 2013 09:32:29 +0000 (UTC) Received: by mail-vc0-f171.google.com with SMTP id ha11so6282594vcb.2 for ; Wed, 27 Mar 2013 02:32:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-auditid:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-brightmail-tracker:x-brightmail-tracker :dlp-filter:x-mtr:x-cfilter-loop:x-gm-message-state; bh=gInQNCxsgxjs5Frr6ACsG7wzLZSycUjJVr96GQj4IIk=; b=hUHuJzI1NNNBZlXOeeJCLdk4EQRk7yTJWO6VoS6Qk/rHRnANMC98EYy4fpY9Ft4fDl UfWtrWr5T9bmFRgKmVlaYZTyayaARt9JPS21sjMHp3lrU8IeSYYt5JzYj1zfGD8tDgTa NFB/Il43OSNb4Ub0GubHx8Oyf1+BOeA5SCEtrl2xsh0xyt9gmCSXvYTDjBAvFOwP8sVv YOgVHTN0pTzjxpigpRo1wN5IaHcORufIATeuQcOFhF6e7mIFBcbVC18WHyR2C45QKAMP XryVUd3rHKx8rSf4YZUwXNPZmTlIKo7c0MkrkyiusyHdfBHDej3jueq364BHGgTRAJ8D YhlQ== X-Received: by 10.52.93.20 with SMTP id cq20mr19252886vdb.38.1364376749307; Wed, 27 Mar 2013 02:32:29 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp107607ved; Wed, 27 Mar 2013 02:32:28 -0700 (PDT) X-Received: by 10.66.218.201 with SMTP id pi9mr29420202pac.85.1364376748238; Wed, 27 Mar 2013 02:32:28 -0700 (PDT) Received: from mailout4.samsung.com (mailout4.samsung.com. [203.254.224.34]) by mx.google.com with ESMTP id ox10si21155981pbb.121.2013.03.27.02.32.27; Wed, 27 Mar 2013 02:32:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.34 as permitted sender) client-ip=203.254.224.34; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.34 as permitted sender) smtp.mail=gautam.vivek@samsung.com Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKB00BY7BTUCYQ0@mailout4.samsung.com> for patches@linaro.org; Wed, 27 Mar 2013 18:32:26 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.124]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 08.1D.07735.AACB2515; Wed, 27 Mar 2013 18:32:26 +0900 (KST) X-AuditID: cbfee68e-b7f946d000001e37-9e-5152bcaa3409 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 70.E7.17838.AACB2515; Wed, 27 Mar 2013 18:32:26 +0900 (KST) Received: from vivekkumarg-linuxpc.sisodomain.com ([107.108.214.169]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MKB00C14BRFI6F0@mmp2.samsung.com>; Wed, 27 Mar 2013 18:32:26 +0900 (KST) From: Vivek Gautam To: u-boot@lists.denx.de Cc: patches@linaro.org, marex@denx.de, sjg@chromium.org, rajeshwari.s@samsung.com, vikas.sajjan@samsung.com, amarendra.xt@samsung.com, Vipin Kumar Subject: [PATCH 4/7] usb: hub: Fix enumration timeout Date: Wed, 27 Mar 2013 14:59:00 +0530 Message-id: <1364376543-7526-5-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.6.5 In-reply-to: <1364376543-7526-1-git-send-email-gautam.vivek@samsung.com> References: <1364376543-7526-1-git-send-email-gautam.vivek@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeLIzCtJLcpLzFFi42JZI2JSo7tqT1CgwflLphZfFnSyW7xpa2S0 mHL4C4tFy9oDrBbftmxjtHi7Fyhx89l2Jot/l66xOnB4zG64yOIxb9YJFo871/aweZy9s4PR o2/LKkaPpz/2MgewRXHZpKTmZJalFunbJXBlfHz0l7VgJ3vFr0k9LA2MLWxdjJwcEgImEr+u tzFB2GISF+6tB4pzcQgJLGWUOL7uGpDDAVb0b5U3RHw6o8T6vStYIZwpTBLL/q5lBulmE9CV aHq7ixHEFhGQkPjVf5URpIhZYDWjxMRFd8ASwgKmEt1Lm9lBbBYBVYnfi2axgNi8Au4SDycd Z4Q4Q0Hize1nYEM5BTwkZryaBlYjBFRz6NwesKESAuvYJX5vmcgGMUhA4tvkQywQp8pKbDrA DDFHUuLgihssExiFFzAyrGIUTS1ILihOSi8y0itOzC0uzUvXS87P3cQIDP/T/5717WC8ecD6 EGMy0LiJzFKiyfnA+MkriTc0NjOyMDUxNTYytzQjTVhJnFetxTpQSCA9sSQ1OzW1ILUovqg0 J7X4ECMTB6dUA+PUOQekYp7t45X++CLnzNoGweWlGrOuvPVSSLv68N/Plrszo59Jr4l70atp 49gZ7mskHbWBZ/mc331Ne0PkmCqj+iNrfrMvWlVS6NZbV/bKu/iAhG9wIdvEXTWWx4V0H9/Y 7zf7i7hkzHkGVY2s235y+9fuXsBp2vJTJIHvcWptn4CYTKFViBJLcUaioRZzUXEiAO3aQbGV AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPIsWRmVeSWpSXmKPExsVy+t9jQd1Ve4ICDXa80bH4sqCT3eJNWyOj xZTDX1gsWtYeYLX4tmUbo8XbvUCJm8+2M1n8u3SN1YHDY3bDRRaPebNOsHjcubaHzePsnR2M Hn1bVjF6PP2xlzmALaqB0SYjNTEltUghNS85PyUzL91WyTs43jne1MzAUNfQ0sJcSSEvMTfV VsnFJ0DXLTMH6CQlhbLEnFKgUEBicbGSvh2mCaEhbroWMI0Rur4hQXA9RgZoIGENY8bHR39Z C3ayV/ya1MPSwNjC1sXIwSEhYCLxb5V3FyMnkCkmceHeeqAwF4eQwHRGifV7V7BCOFOYJJb9 XcsMUsUmoCvR9HYXI4gtIiAh8av/KiNIEbPAakaJiYvugCWEBUwlupc2s4PYLAKqEr8XzWIB sXkF3CUeTjrOCLFOQeLN7WdgQzkFPCRmvJoGViMEVHPo3B7GCYy8CxgZVjGKphYkFxQnpeca 6hUn5haX5qXrJefnbmIER9czqR2MKxssDjEKcDAq8fDOYAgKFGJNLCuuzD3EKMHBrCTC+2IF UIg3JbGyKrUoP76oNCe1+BBjMtBVE5mlRJPzgZGfVxJvaGxibmpsamliYWJmSZqwkjjvgVbr QCGB9MSS1OzU1ILUIpgtTBycUg2MRru/N719aVQV/ix2Y1GjxxwLRS2j6Q8+rDxjIcnbnT31 5pbFMveFxWcUlZ+7ycXwZOnHhQ1fPePNl8545eBZsEfxQO3H8I6zy/N2rHb5KpvBdYJJJDXu Ar8pm4U3/5aref4JpwrWblMpKsjdeLmayUg/pkfphrbsdI/iPivh+Y+Km8NnpOxXYinOSDTU Yi4qTgQAClw73fICAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQmCbqEnUD7sYgmfPysVzo5bpEsn/71z58rqcRT/VuFdBI6XogN5vNuP+n6EemLHyskYd74Z Patch b6d7852c increases timeout for enumeration, taking worst case to be 10 sec. get_timer() api returns timestamp in micro-seconds, which is what we are checking in the do-while() loop in usb_hub_configure() (get_timer(start) < CONFIG_SYS_HZ * 10). This should give us a required check for 10 seconds, and thereby we don't need to add additional mdelay of 100 microseconds in each cycle. Signed-off-by: Vivek Gautam CC: Vipin Kumar Reviewed-by: Vipin Kumar --- common/usb_hub.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/common/usb_hub.c b/common/usb_hub.c index 0677004..d77f98d 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -439,7 +439,6 @@ static int usb_hub_configure(struct usb_device *dev) (portstatus & USB_PORT_STAT_CONNECTION)) break; - mdelay(100); } while (get_timer(start) < CONFIG_SYS_HZ * 10); if (ret < 0)