summaryrefslogtreecommitdiffstats
path: root/include/usb
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-07-10 11:41:00 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-07-18 14:42:35 +0200
commitf0a1a84d7d50c7f74e2403625eb91cd56464fe33 (patch)
tree06b7b24574f1dba5e7f73c273e1122f058160ccb /include/usb
parent245069bcef15ecc19db616a967501349b76c84d0 (diff)
downloadbarebox-f0a1a84d7d50c7f74e2403625eb91cd56464fe33.tar.gz
barebox-f0a1a84d7d50c7f74e2403625eb91cd56464fe33.tar.xz
USB: Use descriptors from ch9.h
Use the descriptors from ch9.h instead of duplicating them in usb.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/usb')
-rw-r--r--include/usb/usb.h63
1 files changed, 1 insertions, 62 deletions
diff --git a/include/usb/usb.h b/include/usb/usb.h
index 74b97a9db4..a0bc1d2643 100644
--- a/include/usb/usb.h
+++ b/include/usb/usb.h
@@ -23,6 +23,7 @@
#define _USB_H_
#include <driver.h>
+#include <usb/ch9.h>
#include <usb/usb_defs.h>
#include <asm/byteorder.h>
@@ -48,68 +49,6 @@ struct devrequest {
unsigned short length;
} __attribute__ ((packed));
-/* All standard descriptors have these 2 fields in common */
-struct usb_descriptor_header {
- unsigned char bLength;
- unsigned char bDescriptorType;
-} __attribute__ ((packed));
-
-/* Device descriptor */
-struct usb_device_descriptor {
- unsigned char bLength;
- unsigned char bDescriptorType;
- unsigned short bcdUSB;
- unsigned char bDeviceClass;
- unsigned char bDeviceSubClass;
- unsigned char bDeviceProtocol;
- unsigned char bMaxPacketSize0;
- unsigned short idVendor;
- unsigned short idProduct;
- unsigned short bcdDevice;
- unsigned char iManufacturer;
- unsigned char iProduct;
- unsigned char iSerialNumber;
- unsigned char bNumConfigurations;
-} __attribute__ ((packed));
-
-/* Endpoint descriptor */
-struct usb_endpoint_descriptor {
- unsigned char bLength;
- unsigned char bDescriptorType;
- unsigned char bEndpointAddress;
- unsigned char bmAttributes;
- unsigned short wMaxPacketSize;
- unsigned char bInterval;
- unsigned char bRefresh;
- unsigned char bSynchAddress;
-} __attribute__ ((packed)) __attribute__ ((aligned(2)));
-
-/* Interface descriptor */
-struct usb_interface_descriptor {
- unsigned char bLength;
- unsigned char bDescriptorType;
- unsigned char bInterfaceNumber;
- unsigned char bAlternateSetting;
- unsigned char bNumEndpoints;
- unsigned char bInterfaceClass;
- unsigned char bInterfaceSubClass;
- unsigned char bInterfaceProtocol;
- unsigned char iInterface;
-} __attribute__ ((packed));
-
-
-/* Configuration descriptor information.. */
-struct usb_config_descriptor {
- unsigned char bLength;
- unsigned char bDescriptorType;
- unsigned short wTotalLength;
- unsigned char bNumInterfaces;
- unsigned char bConfigurationValue;
- unsigned char iConfiguration;
- unsigned char bmAttributes;
- unsigned char MaxPower;
-} __attribute__ ((packed));
-
enum {
/* Maximum packet size; encoded as 0,1,2,3 = 8,16,32,64 */
PACKET_SIZE_8 = 0,