From patchwork Wed May 2 11:11:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?=C5=81ukasz_Majewski?= X-Patchwork-Id: 156416 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 7AC46B6FBB for ; Wed, 2 May 2012 21:12:16 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E1E5D280C9; Wed, 2 May 2012 13:12:13 +0200 (CEST) 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 yy0uYSpHYP-H; Wed, 2 May 2012 13:12:13 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 96FF9280B6; Wed, 2 May 2012 13:12:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BA9B2280B6 for ; Wed, 2 May 2012 13:12:09 +0200 (CEST) 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 uu3RD30QwET3 for ; Wed, 2 May 2012 13:12:08 +0200 (CEST) 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 mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by theia.denx.de (Postfix) with ESMTP id 5AB5A28091 for ; Wed, 2 May 2012 13:12:06 +0200 (CEST) Received: from euspt2 (mailout1.w1.samsung.com [210.118.77.11]) by mailout1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0M3E002AY71CX3@mailout1.w1.samsung.com> for u-boot@lists.denx.de; Wed, 02 May 2012 12:10:24 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M3E00E8R742K0@spt2.w1.samsung.com> for u-boot@lists.denx.de; Wed, 02 May 2012 12:12:02 +0100 (BST) Received: from mcdsrvbld02.digital.local (unknown [106.116.37.23]) by linux.samsung.com (Postfix) with ESMTP id 89FC327004E; Wed, 02 May 2012 13:14:10 +0200 (CEST) Date: Wed, 02 May 2012 13:11:34 +0200 From: Lukasz Majewski In-reply-to: <1335957098-12929-1-git-send-email-l.majewski@samsung.com> To: u-boot@lists.denx.de Message-id: <1335957098-12929-2-git-send-email-l.majewski@samsung.com> MIME-version: 1.0 X-Mailer: git-send-email 1.7.10 References: <1335957098-12929-1-git-send-email-l.majewski@samsung.com> Cc: Marek Vasut , Kyungmin Park Subject: [U-Boot] [RESEND PATCH 1/5] usb:udc: Remove duplicated USB definitions from include/linux/usb/ch9.h file 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 Remove the repeated USB descriptor code and use usbdescriptors.h file. ch9.h file has been copied from linux and is needed for USB gadget related work. Now usbdescriptors.h and ch9.h shall be used together. Signed-off-by: Lukasz Majewski Signed-off-by: Kyungmin Park Cc: Marek Vasut --- drivers/usb/gadget/config.c | 1 + drivers/usb/gadget/epautoconf.c | 1 + drivers/usb/gadget/ether.c | 1 + drivers/usb/gadget/s3c_udc_otg.c | 1 + drivers/usb/gadget/usbstring.c | 1 + include/linux/usb/ch9.h | 67 -------------------------------------- include/usb/s3c_udc.h | 1 + 7 files changed, 6 insertions(+), 67 deletions(-) diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c index f9163a8..f88d0c1 100644 --- a/drivers/usb/gadget/config.c +++ b/drivers/usb/gadget/config.c @@ -27,6 +27,7 @@ #include #include +#include #include diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c index 5b8776e..b656c8b 100644 --- a/drivers/usb/gadget/epautoconf.c +++ b/drivers/usb/gadget/epautoconf.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 9fb0e80..f693fea 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/usb/gadget/s3c_udc_otg.c b/drivers/usb/gadget/s3c_udc_otg.c index 1050a98..f7f7b54 100644 --- a/drivers/usb/gadget/s3c_udc_otg.c +++ b/drivers/usb/gadget/s3c_udc_otg.c @@ -37,6 +37,7 @@ #include #include +#include #include #include diff --git a/drivers/usb/gadget/usbstring.c b/drivers/usb/gadget/usbstring.c index 95555cf..4dbe060 100644 --- a/drivers/usb/gadget/usbstring.c +++ b/drivers/usb/gadget/usbstring.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 49b7483..ce1d1e1 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h @@ -204,28 +204,6 @@ struct usb_descriptor_header { __u8 bDescriptorType; } __attribute__ ((packed)); - -/*-------------------------------------------------------------------------*/ - -/* USB_DT_DEVICE: Device descriptor */ -struct usb_device_descriptor { - __u8 bLength; - __u8 bDescriptorType; - - __le16 bcdUSB; - __u8 bDeviceClass; - __u8 bDeviceSubClass; - __u8 bDeviceProtocol; - __u8 bMaxPacketSize0; - __le16 idVendor; - __le16 idProduct; - __le16 bcdDevice; - __u8 iManufacturer; - __u8 iProduct; - __u8 iSerialNumber; - __u8 bNumConfigurations; -} __attribute__ ((packed)); - #define USB_DT_DEVICE_SIZE 18 @@ -282,56 +260,11 @@ struct usb_config_descriptor { #define USB_CONFIG_ATT_WAKEUP (1 << 5) /* can wakeup */ #define USB_CONFIG_ATT_BATTERY (1 << 4) /* battery powered */ -/*-------------------------------------------------------------------------*/ - -/* USB_DT_STRING: String descriptor */ -struct usb_string_descriptor { - __u8 bLength; - __u8 bDescriptorType; - - __le16 wData[1]; /* UTF-16LE encoded */ -} __attribute__ ((packed)); - /* note that "string" zero is special, it holds language codes that * the device supports, not Unicode characters. */ -/*-------------------------------------------------------------------------*/ - -/* USB_DT_INTERFACE: Interface descriptor */ -struct usb_interface_descriptor { - __u8 bLength; - __u8 bDescriptorType; - - __u8 bInterfaceNumber; - __u8 bAlternateSetting; - __u8 bNumEndpoints; - __u8 bInterfaceClass; - __u8 bInterfaceSubClass; - __u8 bInterfaceProtocol; - __u8 iInterface; -} __attribute__ ((packed)); - #define USB_DT_INTERFACE_SIZE 9 - -/*-------------------------------------------------------------------------*/ - -/* USB_DT_ENDPOINT: Endpoint descriptor */ -struct usb_endpoint_descriptor { - __u8 bLength; - __u8 bDescriptorType; - - __u8 bEndpointAddress; - __u8 bmAttributes; - __le16 wMaxPacketSize; - __u8 bInterval; - - /* NOTE: these two are _only_ in audio endpoints. */ - /* use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof. */ - __u8 bRefresh; - __u8 bSynchAddress; -} __attribute__ ((packed)); - #define USB_DT_ENDPOINT_SIZE 7 #define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ diff --git a/include/usb/s3c_udc.h b/include/usb/s3c_udc.h index 6c973b6..3e6135a 100644 --- a/include/usb/s3c_udc.h +++ b/include/usb/s3c_udc.h @@ -24,6 +24,7 @@ #include #include +#include #include #include #include