From patchwork Sat Sep 14 08:32:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 20301 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 39CC82617D for ; Sat, 14 Sep 2013 08:34:09 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id f12sf2368006vbg.3 for ; Sat, 14 Sep 2013 01:34:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:dlp-filter:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=WuHGX5jIqfOQuUBnO52+1pXJWeC+vBwj6IZXv7lBQ4I=; b=a4grjSEKcqOW8MuON43GNa0njkv980JSCCmBVlePkSNkNIdDut/R73Z3pHyk+cxhtq UoeHD0ecKOm4xP6hFWGGIZ5sLHKyno5Lmn+eOeEdEhukDneVFp4Mn+wh/guiiJS54rtS LKXeiqhpS80jlLPKBQTU/pbUI0jeqlGB4I1hQOWqvUknzhIBAjNNorvnqtKTEtR2MxWu Iat7poxeVKUJc0SapMDPQ1lwS7+PKid+8wCgIxiPHIG7kGf9TgBhgm4SKqT1wR5QmZts sYf3hhiF+TXMLO4q4a4RogU5YD+9oSBtRU4IaHOn5rgeX+s5ZvhyVdM2PpH9FqrS4TN7 Cs1g== X-Gm-Message-State: ALoCoQn1g74tjdggnvjZhYc1w9oPcUjGJ6WrbTrXAPTO7p4xVWbsk3iI+pqWiGUqGsmBokPHkhqu X-Received: by 10.236.66.244 with SMTP id h80mr6862132yhd.30.1379147647851; Sat, 14 Sep 2013 01:34:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.119.161 with SMTP id kv1ls1411185qeb.10.gmail; Sat, 14 Sep 2013 01:34:07 -0700 (PDT) X-Received: by 10.220.1.203 with SMTP id 11mr16110631vcg.15.1379147647745; Sat, 14 Sep 2013 01:34:07 -0700 (PDT) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by mx.google.com with ESMTPS id ch11si4415716ved.63.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 14 Sep 2013 01:34:07 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.44; Received: by mail-vb0-f44.google.com with SMTP id e13so1647450vbg.31 for ; Sat, 14 Sep 2013 01:34:07 -0700 (PDT) X-Received: by 10.58.133.66 with SMTP id pa2mr15997138veb.18.1379147647397; Sat, 14 Sep 2013 01:34:07 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp3315vcz; Sat, 14 Sep 2013 01:34:06 -0700 (PDT) X-Received: by 10.66.159.40 with SMTP id wz8mr19899545pab.135.1379147645593; Sat, 14 Sep 2013 01:34:05 -0700 (PDT) Received: from mailout1.samsung.com (mailout1.samsung.com. [203.254.224.24]) by mx.google.com with ESMTP id gx9si14350691pac.11.1969.12.31.16.00.00; Sat, 14 Sep 2013 01:34:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.24 as permitted sender) client-ip=203.254.224.24; Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MT300FEPX4RUD40@mailout1.samsung.com> for patches@linaro.org; Sat, 14 Sep 2013 17:34:04 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.122]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 51.CB.20109.C7F14325; Sat, 14 Sep 2013 17:34:04 +0900 (KST) X-AuditID: cbfee68f-b7f1e6d000004e8d-7d-52341f7c92b2 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 46.03.09055.C7F14325; Sat, 14 Sep 2013 17:34:04 +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 <0MT3000S4X4MT840@mmp2.samsung.com>; Sat, 14 Sep 2013 17:34:04 +0900 (KST) From: Vivek Gautam To: u-boot@lists.denx.de, patches@linaro.org Cc: u-boot-review@google.com, Julius Werner , Simon Glass , Minkyu Kang , Dan Murphy , Marek Vasut Subject: [PATCH v3 01/10] usb: Move 'bmRequestType' USB device request macros from EHCI header Date: Sat, 14 Sep 2013 14:02:44 +0530 Message-id: <1379147573-21897-2-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.6.5 In-reply-to: <1379147573-21897-1-git-send-email-gautam.vivek@samsung.com> References: <1379147573-21897-1-git-send-email-gautam.vivek@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeLIzCtJLcpLzFFi42JZI2JSpVsjbxJk8O2pkUX36S2sFh2HHjNZ vGlrZLToONLCaDHl8BcWi29btjFaLH+9kd3i7d5OdgcOj9kNF1k85s06weKxYFOpx51re9g8 zt7ZwejRt2UVo8fxG9uZAtijuGxSUnMyy1KL9O0SuDK6J6xgK1giXNG0ooupgfEZfxcjB4eE gInElmNWXYycQKaYxIV769m6GLk4hASWMkp8Wr2CESJhInHr3QsWEFtIYDqjxKyGTAh7CpPE iY/OIDabgK5E09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VV+YeYpTgYFYS4XUS MwkS4k1JrKxKLcqPLyrNSS0+xJgMdNVEZinR5Hxg/OeVxBsam5ibGptamliYmFmSJqwkznug 1TpQSCA9sSQ1OzW1ILUIZgsTB6dUA+PCcwbCnws5c7vL5ysZvrrzSTq7+ctbTuceXRbDvOZD PBOuz+XwStgVzXf9w2zXibelIydbmi5YkuUte/G09vptTbXvJa+W7r/QIBG4cxrTpzu5YXp8 GfGP934uWFG4k+VZ3fZzT834VObs5enqn9a+I3LtMYsPR/We3P7FfTPkSuus4nmPvO8rsRRn JBpqMRcVJwIAI/9DS/UCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: gautam.vivek@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Macros defining bmRequestType field of USB device request, given in table 9.2 USB 2.0 spec, are rather generic macros which can be further used by other Host controller stacks. So moving them to usb_defs header. Signed-off-by: Vivek Gautam Cc: Julius Werner Cc: Simon Glass Cc: Minkyu Kang Cc: Dan Murphy Cc: Marek Vasut --- Changes since v2: - This patch is newly added in this version of the series. drivers/usb/host/ehci.h | 16 ---------------- include/usb_defs.h | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index bd52afe..3e1c312 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -28,22 +28,6 @@ #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 2 #endif -/* (shifted) direction/type/recipient from the USB 2.0 spec, table 9.2 */ -#define DeviceRequest \ - ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE) << 8) - -#define DeviceOutRequest \ - ((USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE) << 8) - -#define InterfaceRequest \ - ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8) - -#define EndpointRequest \ - ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8) - -#define EndpointOutRequest \ - ((USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8) - /* * Register Space. */ diff --git a/include/usb_defs.h b/include/usb_defs.h index 0cf5f2d..236a5ec 100644 --- a/include/usb_defs.h +++ b/include/usb_defs.h @@ -63,6 +63,25 @@ #define USB_DIR_OUT 0 #define USB_DIR_IN 0x80 +/* + * bmRequestType: USB Device Requests, table 9.2 USB 2.0 spec. + * (shifted) direction/type/recipient. + */ +#define DeviceRequest \ + ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE) << 8) + +#define DeviceOutRequest \ + ((USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE) << 8) + +#define InterfaceRequest \ + ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8) + +#define EndpointRequest \ + ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8) + +#define EndpointOutRequest \ + ((USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8) + /* Descriptor types */ #define USB_DT_DEVICE 0x01 #define USB_DT_CONFIG 0x02