summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2014-07-23 15:51:47 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-07-24 08:57:57 +0200
commit3c91719f14b744cf28e35d8a7d908dea3ff2d7c7 (patch)
tree188e21ea77a54174e31457e05ef3ae59319cf5dc /drivers
parent60ebedf1e7dcf768478483c5d572040de7525c65 (diff)
downloadbarebox-3c91719f14b744cf28e35d8a7d908dea3ff2d7c7.tar.gz
barebox-3c91719f14b744cf28e35d8a7d908dea3ff2d7c7.tar.xz
USB: EHCI: reuse ch9.h config and interface descriptors
Now that usb_config_descriptor and usb_interface_descriptor are clean of any additional fields, drop the duplication in EHCI code and use the default ones. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ehci-hcd.c4
-rw-r--r--drivers/usb/host/ehci.h25
2 files changed, 2 insertions, 27 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 9e30deb419..7857576738 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -57,8 +57,8 @@ struct ehci_priv {
static struct descriptor {
struct usb_hub_descriptor hub;
struct usb_device_descriptor device;
- struct usb_linux_config_descriptor config;
- struct usb_linux_interface_descriptor interface;
+ struct usb_config_descriptor config;
+ struct usb_interface_descriptor interface;
struct usb_endpoint_descriptor endpoint;
} __attribute__ ((packed)) descriptor = {
{
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index b1e768b493..8cc477aa4f 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -68,31 +68,6 @@ struct ehci_hcor {
#define USBMODE_CM_HC (3 << 0) /* host controller mode */
#define USBMODE_CM_IDLE (0 << 0) /* idle state */
-/* Interface descriptor */
-struct usb_linux_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_linux_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));
-
#if defined CONFIG_EHCI_DESC_BIG_ENDIAN
#define ehci_readl(x) (*((volatile u32 *)(x)))
#define ehci_writel(a, b) (*((volatile u32 *)(a)) = ((volatile u32)b))