From patchwork Wed Mar 27 09:28:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 15679 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 CD43923E10 for ; Wed, 27 Mar 2013 09:31:55 +0000 (UTC) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by fiordland.canonical.com (Postfix) with ESMTP id 73005A18117 for ; Wed, 27 Mar 2013 09:31:55 +0000 (UTC) Received: by mail-vb0-f43.google.com with SMTP id fs19so5008811vbb.16 for ; Wed, 27 Mar 2013 02:31:55 -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=iZmQaNK5+mcGuzu9vUbKZes5Q2bOziQVJSLbhyRas0o=; b=bGAnt7DWaWOkF5SZLNlliba8QtgzOBtd5qBwIztbevldnxKvoayjMAXs1dgvZN/uFy c4iCpx2eyv8DfzAPXO0GGArQ33SezXu7vDV2nqtwOYO39P9hZYKDurbuwxJjxpw3HRl+ NPrMaUuzeHKbiDycALc9Uplmr9RkC6dEMwMDJqtCOtLcG2fRRcOWK+AgwV0orMIT9Ael BWqkqZTqAjeRLamO98gCIthTJU38as5ZXWhl5tPoZkrAMi0kT+ThN6BczPfrBblNX3Om 2ZbJWJWQsbGwW0xf4S32Qwz8t0/kkQn6alwLycZvA5WvdDW254Gv9eUO9ucygYZpIw2D uuGw== X-Received: by 10.52.76.103 with SMTP id j7mr19471393vdw.90.1364376714940; Wed, 27 Mar 2013 02:31:54 -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 cg12csp107589ved; Wed, 27 Mar 2013 02:31:54 -0700 (PDT) X-Received: by 10.66.197.197 with SMTP id iw5mr28885137pac.89.1364376713971; Wed, 27 Mar 2013 02:31:53 -0700 (PDT) Received: from mailout3.samsung.com (mailout3.samsung.com. [203.254.224.33]) by mx.google.com with ESMTP id vf5si13844006pbc.21.2013.03.27.02.31.53; Wed, 27 Mar 2013 02:31:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.33 as permitted sender) client-ip=203.254.224.33; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.33 as permitted sender) smtp.mail=gautam.vivek@samsung.com Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKB00AOWBT44UL0@mailout3.samsung.com> for patches@linaro.org; Wed, 27 Mar 2013 18:31:52 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.123]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id C8.3A.02019.88CB2515; Wed, 27 Mar 2013 18:31:52 +0900 (KST) X-AuditID: cbfee690-b7f656d0000007e3-cb-5152bc88c91d Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id AA.6F.13494.88CB2515; Wed, 27 Mar 2013 18:31:52 +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:31:52 +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 Subject: [PATCH 3/7] usb: Update device class in usb device's descriptor Date: Wed, 27 Mar 2013 14:58:59 +0530 Message-id: <1364376543-7526-4-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+NgFvrGLMWRmVeSWpSXmKPExsWyRsSkWrdjT1CgwaG/ahZfFnSyW7xpa2S0 mHL4C4tFy9oDrBbftmxjtHi7Fyhx89l2Jgd2j9kNF1k85s06weJx59oeNo+zd3YwevRtWcUY wBrFZZOSmpNZllqkb5fAlXHn+1z2gl62iq2zD7A0MH5m6WLk4JAQMJHYt9a7i5ETyBSTuHBv PVsXIxeHkMBSRolJR64zQSRMJCbebmOGSExnlDh9bwILSEJIYAqTxOlddiA2m4CuRNPbXYwg toiAhMSv/quMIA3MAu2MEps3zmYDSQgLeEjs2dMGZrMIqEqcvf0dzOYVcJf4+nceG8Q2BYk3 t58xg9icQPUzXk2DWuYucejcHkaImnnsEm0LSyDmCEh8m3wI6htZiU0HmCFKJCUOrrjBMoFR eAEjwypG0dSC5ILipPQiE73ixNzi0rx0veT83E2MwDA//e/ZhB2M9w5YH2JMBho3kVlKNDkf GCd5JfGGxmZGFqYmpsZG5pZmpAkrifOqt1gHCgmkJ5akZqemFqQWxReV5qQWH2Jk4uCUamCc 2XQ6+k/UjUvcbifvr17On3uvd9vVIgH7r1otFUrz9V/PPrXvjKTRnz2rKr+4MQi8YPkjel1E cl7Zlou8hyujvu5vLtta+nvxqelSMzp1lhtZ/vrbGZ39uPZ3+ou7az9MfvrwtYTWn4s8OcdE HH7czZ6R9mBPcu+k4AMngnrW2Gdce8Z+qsNmmxJLcUaioRZzUXEiAMG6o1+JAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKIsWRmVeSWpSXmKPExsVy+t9jQd2OPUGBBu82yFl8WdDJbvGmrZHR YsrhLywWLWsPsFp827KN0eLtXqDEzWfbmRzYPWY3XGTxmDfrBIvHnWt72DzO3tnB6NG3ZRVj AGtUA6NNRmpiSmqRQmpecn5KZl66rZJ3cLxzvKmZgaGuoaWFuZJCXmJuqq2Si0+ArltmDtAh SgpliTmlQKGAxOJiJX07TBNCQ9x0LWAaI3R9Q4LgeowM0EDCGsaMO9/nshf0slVsnX2ApYHx M0sXIyeHhICJxMTbbcwQtpjEhXvr2boYuTiEBKYzSpy+NwGsSEhgCpPE6V12IDabgK5E09td jCC2iICExK/+q4wgDcwC7YwSmzfOZgNJCAt4SOzZ0wZmswioSpy9/R3M5hVwl/j6dx4bxDYF iTe3n4Ft5gSqn/FqGtQyd4lD5/YwTmDkXcDIsIpRNLUguaA4KT3XSK84Mbe4NC9dLzk/dxMj OJKeSe9gXNVgcYhRgINRiYfX4V9goBBrYllxZe4hRgkOZiUR3hcrggKFeFMSK6tSi/Lji0pz UosPMSYDXTWRWUo0OR8Y5Xkl8YbGJuamxqaWJhYmZpakCSuJ8x5stQ4UEkhPLEnNTk0tSC2C 2cLEwSnVwFi6fqod/78We/btbuyrjro/yCv8vNHd6tfPzhPWM3Y9n7xpzgb3YHMB5wl1vza7 PX+x1eSSlN0C7xzvxC9q7x8/vBP9ur/46/aq6K+X7fRNZp+PnWS+Y9eWOcK/jT3kX4sdm9W4 s7HFQPH//khJ+R5uBe0t/St2C7R7/t6x6sTDu5zlH9P+i55UYinOSDTUYi4qTgQACQDx9ugC AAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQmGO53WqAsOhXu4ie0wMY3YCFbqplutGOL4NDfuqiHIDn1eJkT7+Im0GKZbEVE3GazE//Z6 Fetch the device class into usb device's dwcriptors, so that the host controller's driver can use this info to differentiate between HUB and DEVICE. Signed-off-by: Amar --- common/usb.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/common/usb.c b/common/usb.c index 40c1547..39fcedd 100644 --- a/common/usb.c +++ b/common/usb.c @@ -888,6 +888,11 @@ int usb_new_device(struct usb_device *dev) dev->descriptor.bMaxPacketSize0 = desc->bMaxPacketSize0; + /* Fetch the device class, driver can use this info + * to differentiate between HUB and DEVICE. + */ + dev->descriptor.bDeviceClass = desc->bDeviceClass; + /* find the port number we're at */ if (parent) { int j;