summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/boards/at91sam9260ek/env/bin/init_board5
-rw-r--r--arch/arm/boards/at91sam9261ek/env/bin/init_board5
-rw-r--r--arch/arm/boards/at91sam9263ek/env/bin/init_board5
-rw-r--r--arch/arm/boards/at91sam9n12ek/env/bin/init_board5
-rw-r--r--arch/arm/boards/qil-a926x/env/bin/init_board5
-rw-r--r--arch/arm/boards/telit-evk-pro3/env/init/usb5
-rw-r--r--arch/arm/boards/usb-a926x/env/bin/init_board5
-rw-r--r--arch/arm/configs/am335x_defconfig2
-rw-r--r--arch/arm/configs/animeo_ip_defconfig2
-rw-r--r--arch/arm/configs/archosg9_defconfig2
-rw-r--r--arch/arm/configs/at91sam9m10g45ek_defconfig2
-rw-r--r--arch/arm/configs/at91sam9m10ihd_defconfig2
-rw-r--r--arch/arm/configs/at91sam9x5ek_defconfig2
-rw-r--r--arch/arm/configs/ccmx51_defconfig2
-rw-r--r--arch/arm/configs/chumbyone_defconfig2
-rw-r--r--arch/arm/configs/dss11_defconfig2
-rw-r--r--arch/arm/configs/efika-mx-smartbook_defconfig2
-rw-r--r--arch/arm/configs/eukrea_cpuimx25_defconfig2
-rw-r--r--arch/arm/configs/eukrea_cpuimx35_defconfig2
-rw-r--r--arch/arm/configs/freescale-mx25-3ds_defconfig2
-rw-r--r--arch/arm/configs/freescale-mx6-arm2_defconfig2
-rw-r--r--arch/arm/configs/friendlyarm_mini2440_defconfig2
-rw-r--r--arch/arm/configs/imx233-olinuxino_defconfig2
-rw-r--r--arch/arm/configs/imx_defconfig2
-rw-r--r--arch/arm/configs/imx_v7_defconfig2
-rw-r--r--arch/arm/configs/module-mb7707_defconfig2
-rw-r--r--arch/arm/configs/neso_defconfig2
-rw-r--r--arch/arm/configs/omap3530_beagle_defconfig2
-rw-r--r--arch/arm/configs/panda_defconfig2
-rw-r--r--arch/arm/configs/phytec-phycore-imx31_defconfig2
-rw-r--r--arch/arm/configs/phytec-phycore-omap4460_defconfig2
-rw-r--r--arch/arm/configs/pm9g45_defconfig2
-rw-r--r--arch/arm/configs/solidrun_cubox_defconfig2
-rw-r--r--commands/Kconfig2
-rw-r--r--drivers/net/usb/Kconfig2
-rw-r--r--drivers/net/usb/usbnet.c17
-rw-r--r--drivers/usb/Kconfig10
-rw-r--r--drivers/usb/core/Makefile2
-rw-r--r--drivers/usb/core/usb.c52
-rw-r--r--drivers/usb/gadget/Kconfig1
-rw-r--r--drivers/usb/host/ehci-hcd.c17
-rw-r--r--drivers/usb/host/ohci-hcd.c2
-rw-r--r--drivers/usb/storage/usb.c24
-rw-r--r--include/usb/usb.h92
-rw-r--r--include/usb/usb_defs.h6
45 files changed, 119 insertions, 195 deletions
diff --git a/arch/arm/boards/at91sam9260ek/env/bin/init_board b/arch/arm/boards/at91sam9260ek/env/bin/init_board
index 27d767d33c..f1b476d54a 100644
--- a/arch/arm/boards/at91sam9260ek/env/bin/init_board
+++ b/arch/arm/boards/at91sam9260ek/env/bin/init_board
@@ -3,9 +3,6 @@
button_name="dfu_bp"
button_wait=5
-product_id=0x1234
-vendor_id=0x4321
-
dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r"
if [ $at91_udc0.vbus != 1 ]; then
@@ -29,7 +26,7 @@ if [ $? = 0 ]; then
echo "Start DFU Mode"
echo ""
led ds5 1
- dfu ${dfu_config} -P ${product_id} -V ${vendor_id}
+ dfu ${dfu_config}
exit
fi
echo "${button_name} released, normal boot"
diff --git a/arch/arm/boards/at91sam9261ek/env/bin/init_board b/arch/arm/boards/at91sam9261ek/env/bin/init_board
index 8e849c6a60..39a7f0826b 100644
--- a/arch/arm/boards/at91sam9261ek/env/bin/init_board
+++ b/arch/arm/boards/at91sam9261ek/env/bin/init_board
@@ -10,9 +10,6 @@ fi
button_name="dfu_bp"
button_wait=5
-product_id=0x1234
-vendor_id=0x4321
-
dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r"
if [ $at91_udc0.vbus != 1 ]
@@ -54,5 +51,5 @@ echo "Start DFU Mode"
echo ""
led ds7 1
-dfu ${dfu_config} -P ${product_id} -V ${vendor_id}
+dfu ${dfu_config}
led ds7 0
diff --git a/arch/arm/boards/at91sam9263ek/env/bin/init_board b/arch/arm/boards/at91sam9263ek/env/bin/init_board
index f2e6294648..44972a50ec 100644
--- a/arch/arm/boards/at91sam9263ek/env/bin/init_board
+++ b/arch/arm/boards/at91sam9263ek/env/bin/init_board
@@ -10,9 +10,6 @@ fi
button_name="dfu_bp"
button_wait=5
-product_id=0x1234
-vendor_id=0x4321
-
dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r"
if [ $at91_udc0.vbus != 1 ]
@@ -54,5 +51,5 @@ echo "Start DFU Mode"
echo ""
led ds2 1
-dfu ${dfu_config} -P ${product_id} -V ${vendor_id}
+dfu ${dfu_config}
led ds2 0
diff --git a/arch/arm/boards/at91sam9n12ek/env/bin/init_board b/arch/arm/boards/at91sam9n12ek/env/bin/init_board
index b41b63847d..6b44044f17 100644
--- a/arch/arm/boards/at91sam9n12ek/env/bin/init_board
+++ b/arch/arm/boards/at91sam9n12ek/env/bin/init_board
@@ -10,9 +10,6 @@ fi
button_name="dfu_bp"
button_wait=5
-product_id=0x1234
-vendor_id=0x4321
-
dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r"
if [ $at91_udc0.vbus != 1 ]
@@ -54,4 +51,4 @@ echo "Start DFU Mode"
echo ""
led ds5 1
-dfu ${dfu_config} -P ${product_id} -V ${vendor_id}
+dfu ${dfu_config}
diff --git a/arch/arm/boards/qil-a926x/env/bin/init_board b/arch/arm/boards/qil-a926x/env/bin/init_board
index 0a6baf722b..09ba7cc981 100644
--- a/arch/arm/boards/qil-a926x/env/bin/init_board
+++ b/arch/arm/boards/qil-a926x/env/bin/init_board
@@ -3,9 +3,6 @@
button_name="dfu_bp"
button_wait=5
-product_id=0x1234
-vendor_id=0x4321
-
dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r"
if [ $at91_udc0.vbus != 1 ]
@@ -46,4 +43,4 @@ echo ""
echo "Start DFU Mode"
echo ""
-dfu ${dfu_config} -P ${product_id} -V ${vendor_id}
+dfu ${dfu_config}
diff --git a/arch/arm/boards/telit-evk-pro3/env/init/usb b/arch/arm/boards/telit-evk-pro3/env/init/usb
index 47429f50a4..176c04b7c0 100644
--- a/arch/arm/boards/telit-evk-pro3/env/init/usb
+++ b/arch/arm/boards/telit-evk-pro3/env/init/usb
@@ -5,9 +5,6 @@ gpio_dfu=95
gpio_name="PC31"
gpio_wait=5
-product_id=0x1234
-vendor_id=0x4321
-
dfu_config="/dev/nand0.bootstrap.bb(bootstrap)sr,/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r"
echo
@@ -30,7 +27,7 @@ if [ $? = 0 ]; then
gpio_get_value ${gpio_dfu}
if [ $? = 0 ]; then
echo "Start DFU Mode"
- dfu ${dfu_config} -P ${product_id} -V ${vendor_id}
+ dfu ${dfu_config}
exit
fi
fi
diff --git a/arch/arm/boards/usb-a926x/env/bin/init_board b/arch/arm/boards/usb-a926x/env/bin/init_board
index 0a6baf722b..09ba7cc981 100644
--- a/arch/arm/boards/usb-a926x/env/bin/init_board
+++ b/arch/arm/boards/usb-a926x/env/bin/init_board
@@ -3,9 +3,6 @@
button_name="dfu_bp"
button_wait=5
-product_id=0x1234
-vendor_id=0x4321
-
dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r"
if [ $at91_udc0.vbus != 1 ]
@@ -46,4 +43,4 @@ echo ""
echo "Start DFU Mode"
echo ""
-dfu ${dfu_config} -P ${product_id} -V ${vendor_id}
+dfu ${dfu_config}
diff --git a/arch/arm/configs/am335x_defconfig b/arch/arm/configs/am335x_defconfig
index 0c92c96e45..8af38e547b 100644
--- a/arch/arm/configs/am335x_defconfig
+++ b/arch/arm/configs/am335x_defconfig
@@ -95,7 +95,7 @@ CONFIG_MTD_M25P80=y
CONFIG_NAND=y
CONFIG_NAND_OMAP_GPMC=y
CONFIG_MTD_UBI=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_MCI=y
CONFIG_MCI_STARTUP=y
CONFIG_MCI_OMAP_HSMMC=y
diff --git a/arch/arm/configs/animeo_ip_defconfig b/arch/arm/configs/animeo_ip_defconfig
index ca8d2f1f9b..825c5e4460 100644
--- a/arch/arm/configs/animeo_ip_defconfig
+++ b/arch/arm/configs/animeo_ip_defconfig
@@ -66,7 +66,7 @@ CONFIG_NAND=y
# CONFIG_NAND_ECC_HW_NONE is not set
CONFIG_NAND_ATMEL=y
CONFIG_UBI=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_OHCI=y
CONFIG_USB_OHCI_AT91=y
CONFIG_MCI=y
diff --git a/arch/arm/configs/archosg9_defconfig b/arch/arm/configs/archosg9_defconfig
index 0a6ad683a6..66fbf1a980 100644
--- a/arch/arm/configs/archosg9_defconfig
+++ b/arch/arm/configs/archosg9_defconfig
@@ -77,7 +77,7 @@ CONFIG_NET_USB_SMSC95XX=y
# CONFIG_SPI is not set
CONFIG_I2C=y
CONFIG_I2C_OMAP=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_MCI=y
CONFIG_MCI_STARTUP=y
diff --git a/arch/arm/configs/at91sam9m10g45ek_defconfig b/arch/arm/configs/at91sam9m10g45ek_defconfig
index b088976ef6..02bb983999 100644
--- a/arch/arm/configs/at91sam9m10g45ek_defconfig
+++ b/arch/arm/configs/at91sam9m10g45ek_defconfig
@@ -74,7 +74,7 @@ CONFIG_NAND=y
# CONFIG_NAND_ECC_HW_NONE is not set
CONFIG_NAND_ATMEL=y
CONFIG_UBI=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_USB_EHCI_ATMEL=y
CONFIG_USB_STORAGE=y
diff --git a/arch/arm/configs/at91sam9m10ihd_defconfig b/arch/arm/configs/at91sam9m10ihd_defconfig
index c3df023786..cc408502ed 100644
--- a/arch/arm/configs/at91sam9m10ihd_defconfig
+++ b/arch/arm/configs/at91sam9m10ihd_defconfig
@@ -76,7 +76,7 @@ CONFIG_NAND=y
# CONFIG_NAND_ECC_HW_NONE is not set
CONFIG_NAND_ATMEL=y
CONFIG_UBI=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_USB_EHCI_ATMEL=y
CONFIG_USB_STORAGE=y
diff --git a/arch/arm/configs/at91sam9x5ek_defconfig b/arch/arm/configs/at91sam9x5ek_defconfig
index 93975d43d4..48c88bd8e8 100644
--- a/arch/arm/configs/at91sam9x5ek_defconfig
+++ b/arch/arm/configs/at91sam9x5ek_defconfig
@@ -70,7 +70,7 @@ CONFIG_NAND=y
CONFIG_NAND_ATMEL=y
CONFIG_NAND_ATMEL_PMECC=y
CONFIG_UBI=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_USB_EHCI_ATMEL=y
CONFIG_USB_STORAGE=y
diff --git a/arch/arm/configs/ccmx51_defconfig b/arch/arm/configs/ccmx51_defconfig
index cc2baa20c8..4c54d4d886 100644
--- a/arch/arm/configs/ccmx51_defconfig
+++ b/arch/arm/configs/ccmx51_defconfig
@@ -50,7 +50,7 @@ CONFIG_I2C_IMX=y
CONFIG_MTD=y
CONFIG_NAND=y
CONFIG_NAND_IMX=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_IMX_CHIPIDEA=y
CONFIG_USB_EHCI=y
CONFIG_USB_ULPI=y
diff --git a/arch/arm/configs/chumbyone_defconfig b/arch/arm/configs/chumbyone_defconfig
index 5eb59627f8..92b59b8165 100644
--- a/arch/arm/configs/chumbyone_defconfig
+++ b/arch/arm/configs/chumbyone_defconfig
@@ -43,7 +43,7 @@ CONFIG_NET_RESOLV=y
CONFIG_NET_USB=y
CONFIG_NET_USB_ASIX=y
# CONFIG_SPI is not set
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_VIDEO=y
CONFIG_DRIVER_VIDEO_STM=y
diff --git a/arch/arm/configs/dss11_defconfig b/arch/arm/configs/dss11_defconfig
index 0785b9a2f5..f15fb6bbd3 100644
--- a/arch/arm/configs/dss11_defconfig
+++ b/arch/arm/configs/dss11_defconfig
@@ -31,7 +31,7 @@ CONFIG_NAND=y
CONFIG_NAND_ATMEL=y
CONFIG_UBI=y
CONFIG_DISK_WRITE=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_OHCI=y
CONFIG_USB_OHCI_AT91=y
CONFIG_USB_STORAGE=y
diff --git a/arch/arm/configs/efika-mx-smartbook_defconfig b/arch/arm/configs/efika-mx-smartbook_defconfig
index 753e9b694f..c078ff151e 100644
--- a/arch/arm/configs/efika-mx-smartbook_defconfig
+++ b/arch/arm/configs/efika-mx-smartbook_defconfig
@@ -89,7 +89,7 @@ CONFIG_DRIVER_CFI=y
CONFIG_CFI_BUFFER_WRITE=y
CONFIG_DISK_INTF_PLATFORM_IDE=y
CONFIG_DISK_PATA_IMX=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_IMX_CHIPIDEA=y
CONFIG_USB_EHCI=y
CONFIG_USB_ULPI=y
diff --git a/arch/arm/configs/eukrea_cpuimx25_defconfig b/arch/arm/configs/eukrea_cpuimx25_defconfig
index e81fb70606..7f7776df79 100644
--- a/arch/arm/configs/eukrea_cpuimx25_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx25_defconfig
@@ -65,7 +65,7 @@ CONFIG_MTD=y
CONFIG_MTD_RAW_DEVICE=y
CONFIG_NAND=y
CONFIG_NAND_IMX=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
diff --git a/arch/arm/configs/eukrea_cpuimx35_defconfig b/arch/arm/configs/eukrea_cpuimx35_defconfig
index bec73368ae..7569cde6f5 100644
--- a/arch/arm/configs/eukrea_cpuimx35_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx35_defconfig
@@ -66,7 +66,7 @@ CONFIG_MTD=y
CONFIG_MTD_RAW_DEVICE=y
CONFIG_NAND=y
CONFIG_NAND_IMX=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
diff --git a/arch/arm/configs/freescale-mx25-3ds_defconfig b/arch/arm/configs/freescale-mx25-3ds_defconfig
index 65d8f20424..ead8cbf31e 100644
--- a/arch/arm/configs/freescale-mx25-3ds_defconfig
+++ b/arch/arm/configs/freescale-mx25-3ds_defconfig
@@ -53,7 +53,7 @@ CONFIG_CMD_TFTP=y
CONFIG_FS_TFTP=y
CONFIG_DRIVER_NET_FEC_IMX=y
# CONFIG_SPI is not set
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_ZLIB=y
CONFIG_LZO_DECOMPRESS=y
diff --git a/arch/arm/configs/freescale-mx6-arm2_defconfig b/arch/arm/configs/freescale-mx6-arm2_defconfig
index 7489c47124..f4119f0986 100644
--- a/arch/arm/configs/freescale-mx6-arm2_defconfig
+++ b/arch/arm/configs/freescale-mx6-arm2_defconfig
@@ -54,7 +54,7 @@ CONFIG_NET_USB=y
CONFIG_NET_USB_ASIX=y
CONFIG_NET_USB_SMSC95XX=y
# CONFIG_SPI is not set
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_USB_STORAGE=y
CONFIG_MCI=y
diff --git a/arch/arm/configs/friendlyarm_mini2440_defconfig b/arch/arm/configs/friendlyarm_mini2440_defconfig
index 6cbafef4b1..25db5be0de 100644
--- a/arch/arm/configs/friendlyarm_mini2440_defconfig
+++ b/arch/arm/configs/friendlyarm_mini2440_defconfig
@@ -36,7 +36,7 @@ CONFIG_CMD_GPIO=y
CONFIG_NET=y
CONFIG_DRIVER_NET_DM9K=y
# CONFIG_SPI is not set
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_OHCI=y
CONFIG_MCI=y
CONFIG_MCI_S3C=y
diff --git a/arch/arm/configs/imx233-olinuxino_defconfig b/arch/arm/configs/imx233-olinuxino_defconfig
index 3f444f19dc..75b5911d6b 100644
--- a/arch/arm/configs/imx233-olinuxino_defconfig
+++ b/arch/arm/configs/imx233-olinuxino_defconfig
@@ -47,7 +47,7 @@ CONFIG_NET_RESOLV=y
CONFIG_NET_USB=y
CONFIG_NET_USB_SMSC95XX=y
CONFIG_DISK_INTF_PLATFORM_IDE=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
diff --git a/arch/arm/configs/imx_defconfig b/arch/arm/configs/imx_defconfig
index 8751cccbd1..c106f3960b 100644
--- a/arch/arm/configs/imx_defconfig
+++ b/arch/arm/configs/imx_defconfig
@@ -92,7 +92,7 @@ CONFIG_NAND=y
CONFIG_NAND_IMX=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_FASTMAP=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_USB_ULPI=y
CONFIG_MCI=y
diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig
index 66fc123223..eca244d34d 100644
--- a/arch/arm/configs/imx_v7_defconfig
+++ b/arch/arm/configs/imx_v7_defconfig
@@ -127,7 +127,7 @@ CONFIG_DISK_AHCI=y
CONFIG_DISK_AHCI_IMX=y
CONFIG_DISK_INTF_PLATFORM_IDE=y
CONFIG_DISK_PATA_IMX=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_IMX_CHIPIDEA=y
CONFIG_USB_EHCI=y
CONFIG_USB_ULPI=y
diff --git a/arch/arm/configs/module-mb7707_defconfig b/arch/arm/configs/module-mb7707_defconfig
index 9a4f1d1cb6..843dd59889 100644
--- a/arch/arm/configs/module-mb7707_defconfig
+++ b/arch/arm/configs/module-mb7707_defconfig
@@ -41,7 +41,7 @@ CONFIG_CMD_TIME=y
CONFIG_OF_BAREBOX_DRIVERS=y
CONFIG_DRIVER_SERIAL_NS16550=y
# CONFIG_SPI is not set
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_USB_STORAGE=y
CONFIG_CLOCKSOURCE_DUMMY=y
diff --git a/arch/arm/configs/neso_defconfig b/arch/arm/configs/neso_defconfig
index 846eca0fcf..278916a662 100644
--- a/arch/arm/configs/neso_defconfig
+++ b/arch/arm/configs/neso_defconfig
@@ -66,7 +66,7 @@ CONFIG_NAND=y
# CONFIG_NAND_ECC_HW_SYNDROME is not set
CONFIG_NAND_IMX=y
CONFIG_UBI=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_USB_ULPI=y
CONFIG_VIDEO=y
diff --git a/arch/arm/configs/omap3530_beagle_defconfig b/arch/arm/configs/omap3530_beagle_defconfig
index 1ef4825c67..3068fbb94b 100644
--- a/arch/arm/configs/omap3530_beagle_defconfig
+++ b/arch/arm/configs/omap3530_beagle_defconfig
@@ -73,7 +73,7 @@ CONFIG_I2C_OMAP=y
CONFIG_MTD=y
CONFIG_NAND=y
CONFIG_NAND_OMAP_GPMC=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_USB_EHCI_OMAP=y
CONFIG_USB_TWL4030=y
diff --git a/arch/arm/configs/panda_defconfig b/arch/arm/configs/panda_defconfig
index dab407ca6f..3399bd245d 100644
--- a/arch/arm/configs/panda_defconfig
+++ b/arch/arm/configs/panda_defconfig
@@ -69,7 +69,7 @@ CONFIG_NET_USB_SMSC95XX=y
# CONFIG_SPI is not set
CONFIG_I2C=y
CONFIG_I2C_OMAP=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_MCI=y
CONFIG_MCI_STARTUP=y
diff --git a/arch/arm/configs/phytec-phycore-imx31_defconfig b/arch/arm/configs/phytec-phycore-imx31_defconfig
index 7f19b4a6e1..b83f74aab0 100644
--- a/arch/arm/configs/phytec-phycore-imx31_defconfig
+++ b/arch/arm/configs/phytec-phycore-imx31_defconfig
@@ -76,7 +76,7 @@ CONFIG_MTD=y
CONFIG_NAND=y
CONFIG_NAND_IMX=y
CONFIG_UBI=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_FS_EXT4=y
CONFIG_FS_TFTP=y
diff --git a/arch/arm/configs/phytec-phycore-omap4460_defconfig b/arch/arm/configs/phytec-phycore-omap4460_defconfig
index 8d5543fb02..4c7042cfd4 100644
--- a/arch/arm/configs/phytec-phycore-omap4460_defconfig
+++ b/arch/arm/configs/phytec-phycore-omap4460_defconfig
@@ -61,7 +61,7 @@ CONFIG_MTD=y
CONFIG_NAND=y
CONFIG_NAND_OMAP_GPMC=y
CONFIG_UBI=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_VIDEO=y
CONFIG_DRIVER_VIDEO_OMAP=y
CONFIG_IMAGE_RENDERER=y
diff --git a/arch/arm/configs/pm9g45_defconfig b/arch/arm/configs/pm9g45_defconfig
index 2079bcf9e9..d3a56245db 100644
--- a/arch/arm/configs/pm9g45_defconfig
+++ b/arch/arm/configs/pm9g45_defconfig
@@ -50,7 +50,7 @@ CONFIG_NAND=y
CONFIG_NAND_ATMEL=y
CONFIG_UBI=y
CONFIG_DISK_ATA=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_OHCI=y
CONFIG_USB_OHCI_AT91=y
CONFIG_USB_STORAGE=y
diff --git a/arch/arm/configs/solidrun_cubox_defconfig b/arch/arm/configs/solidrun_cubox_defconfig
index 2937949739..7ba42a98ef 100644
--- a/arch/arm/configs/solidrun_cubox_defconfig
+++ b/arch/arm/configs/solidrun_cubox_defconfig
@@ -80,7 +80,7 @@ CONFIG_I2C=y
CONFIG_MTD=y
CONFIG_MTD_M25P80=y
CONFIG_DISK_AHCI=y
-CONFIG_USB=y
+CONFIG_USB_HOST=y
CONFIG_USB_EHCI=y
CONFIG_USB_STORAGE=y
CONFIG_MCI=y
diff --git a/commands/Kconfig b/commands/Kconfig
index 61816f5115..174a5b602d 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -1818,7 +1818,7 @@ config CMD_LED_TRIGGER
config CMD_USB
bool
- depends on USB
+ depends on USB_HOST
prompt "usb command"
default y
help
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index adb1b0b097..5bad9546be 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -1,5 +1,5 @@
menuconfig NET_USB
- depends on USB
+ depends on USB_HOST
bool "USB network support"
if NET_USB
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 13f58e3ea0..a51cfda328 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -6,17 +6,12 @@
#include <malloc.h>
#include <linux/phy.h>
-static inline int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd)
-{
- return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN);
-}
-
/* handles CDC Ethernet and many other network "bulk data" interfaces */
int usbnet_get_endpoints(struct usbnet *dev)
{
struct usb_device *udev = dev->udev;
int tmp;
- struct usb_interface_descriptor *alt = NULL;
+ struct usb_interface *alt = NULL;
struct usb_endpoint_descriptor *in = NULL, *out = NULL;
struct usb_endpoint_descriptor *status = NULL;
@@ -24,13 +19,13 @@ int usbnet_get_endpoints(struct usbnet *dev)
unsigned ep;
in = out = status = NULL;
- alt = &udev->config.if_desc[tmp];
+ alt = &udev->config.interface[tmp];
/* take the first altsetting with in-bulk + out-bulk;
* remember any status endpoint, just in case;
* ignore other endpoints and altsetttings.
*/
- for (ep = 0; ep < alt->bNumEndpoints; ep++) {
+ for (ep = 0; ep < alt->desc.bNumEndpoints; ep++) {
struct usb_endpoint_descriptor *e;
int intr = 0;
@@ -63,10 +58,10 @@ int usbnet_get_endpoints(struct usbnet *dev)
if (!alt || !in || !out)
return -EINVAL;
- if (alt->bAlternateSetting != 0
+ if (alt->desc.bAlternateSetting != 0
|| !(dev->driver_info->flags & FLAG_NO_SETINT)) {
- tmp = usb_set_interface (dev->udev, alt->bInterfaceNumber,
- alt->bAlternateSetting);
+ tmp = usb_set_interface(dev->udev, alt->desc.bInterfaceNumber,
+ alt->desc.bAlternateSetting);
if (tmp < 0)
return tmp;
}
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index 0b349bf619..eedd20e311 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -1,7 +1,11 @@
-menuconfig USB
- bool "USB support"
+config USB
+ bool
-if USB
+menuconfig USB_HOST
+ select USB
+ bool "USB Host support"
+
+if USB_HOST
source drivers/usb/imx/Kconfig
diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile
index 368fb56808..a74f141db4 100644
--- a/drivers/usb/core/Makefile
+++ b/drivers/usb/core/Makefile
@@ -1,3 +1,3 @@
-obj-y += usb.o
+obj-$(CONFIG_USB_HOST) += usb.o
obj-$(CONFIG_OFDEVICE) += of.o
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 9c1571d190..f5724322ce 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -159,10 +159,10 @@ static int usb_set_maxpacket(struct usb_device *dev)
{
int i, ii;
- for (i = 0; i < dev->config.bNumInterfaces; i++)
- for (ii = 0; ii < dev->config.if_desc[i].bNumEndpoints; ii++)
+ for (i = 0; i < dev->config.desc.bNumInterfaces; i++)
+ for (ii = 0; ii < dev->config.interface[i].desc.bNumEndpoints; ii++)
usb_set_maxpacket_ep(dev,
- &dev->config.if_desc[i].ep_desc[ii]);
+ &dev->config.interface[i].ep_desc[ii]);
return 0;
}
@@ -193,11 +193,11 @@ static int usb_parse_config(struct usb_device *dev, unsigned char *buffer, int c
le16_to_cpus(&(dev->config.wTotalLength));
dev->config.no_of_if = 0;
- index = dev->config.bLength;
+ index = dev->config.desc.bLength;
/* Ok the first entry must be a configuration entry,
* now process the others */
head = (struct usb_descriptor_header *) &buffer[index];
- while (index + 1 < dev->config.wTotalLength) {
+ while (index + 1 < dev->config.desc.wTotalLength) {
switch (head->bDescriptorType) {
case USB_DT_INTERFACE:
if (((struct usb_interface_descriptor *) \
@@ -215,24 +215,24 @@ static int usb_parse_config(struct usb_device *dev, unsigned char *buffer, int c
break;
}
dev->config.no_of_if++;
- memcpy(&dev->config.if_desc[ifno],
+ memcpy(&dev->config.interface[ifno].desc,
&buffer[index], buffer[index]);
- dev->config.if_desc[ifno].no_of_ep = 0;
- dev->config.if_desc[ifno].num_altsetting = 1;
+ dev->config.interface[ifno].no_of_ep = 0;
+ dev->config.interface[ifno].num_altsetting = 1;
curr_if_num =
- dev->config.if_desc[ifno].bInterfaceNumber;
+ dev->config.interface[ifno].desc.bInterfaceNumber;
} else {
/* found alternate setting for the interface */
- dev->config.if_desc[ifno].num_altsetting++;
+ dev->config.interface[ifno].num_altsetting++;
}
break;
case USB_DT_ENDPOINT:
- epno = dev->config.if_desc[ifno].no_of_ep;
+ epno = dev->config.interface[ifno].no_of_ep;
/* found an endpoint */
- dev->config.if_desc[ifno].no_of_ep++;
- memcpy(&dev->config.if_desc[ifno].ep_desc[epno],
+ dev->config.interface[ifno].no_of_ep++;
+ memcpy(&dev->config.interface[ifno].ep_desc[epno],
&buffer[index], buffer[index]);
- le16_to_cpus(&(dev->config.if_desc[ifno].ep_desc[epno].\
+ le16_to_cpus(&(dev->config.interface[ifno].ep_desc[epno].\
wMaxPacketSize));
USB_PRINTF("if %d, ep %d\n", ifno, epno);
break;
@@ -411,7 +411,7 @@ static int usb_new_device(struct usb_device *dev)
usb_parse_config(dev, buf, 0);
usb_set_maxpacket(dev);
/* we set the default configuration here */
- if (usb_set_configuration(dev, dev->config.bConfigurationValue)) {
+ if (usb_set_configuration(dev, dev->config.desc.bConfigurationValue)) {
printf("failed to set default configuration " \
"len %d, status %lX\n", dev->act_len, dev->status);
goto err_out;
@@ -721,12 +721,12 @@ int usb_get_configuration_no(struct usb_device *dev,
*/
int usb_set_interface(struct usb_device *dev, int interface, int alternate)
{
- struct usb_interface_descriptor *if_face = NULL;
+ struct usb_interface *if_face = NULL;
int ret, i;
- for (i = 0; i < dev->config.bNumInterfaces; i++) {
- if (dev->config.if_desc[i].bInterfaceNumber == interface) {
- if_face = &dev->config.if_desc[i];
+ for (i = 0; i < dev->config.desc.bNumInterfaces; i++) {
+ if (dev->config.interface[i].desc.bInterfaceNumber == interface) {
+ if_face = &dev->config.interface[i];
break;
}
}
@@ -1297,21 +1297,21 @@ static int usb_hub_configure(struct usb_device *dev)
static int usb_hub_probe(struct usb_device *dev, int ifnum)
{
- struct usb_interface_descriptor *iface;
+ struct usb_interface *iface;
struct usb_endpoint_descriptor *ep;
int ret;
- iface = &dev->config.if_desc[ifnum];
+ iface = &dev->config.interface[ifnum];
/* Is it a hub? */
- if (iface->bInterfaceClass != USB_CLASS_HUB)
+ if (iface->desc.bInterfaceClass != USB_CLASS_HUB)
return 0;
/* Some hubs have a subclass of 1, which AFAICT according to the */
/* specs is not defined, but it works */
- if ((iface->bInterfaceSubClass != 0) &&
- (iface->bInterfaceSubClass != 1))
+ if ((iface->desc.bInterfaceSubClass != 0) &&
+ (iface->desc.bInterfaceSubClass != 1))
return 0;
/* Multiple endpoints? What kind of mutant ninja-hub is this? */
- if (iface->bNumEndpoints != 1)
+ if (iface->desc.bNumEndpoints != 1)
return 0;
ep = &iface->ep_desc[0];
/* Output endpoint? Curiousier and curiousier.. */
@@ -1373,7 +1373,7 @@ static int usb_match_one_id(struct usb_device *usbdev,
/* match any interface */
for (ifno=0; ifno<usbdev->config.no_of_if; ifno++) {
struct usb_interface_descriptor *intf;
- intf = &usbdev->config.if_desc[ifno];
+ intf = &usbdev->config.interface[ifno].desc;
if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_CLASS) &&
(id->bInterfaceClass != intf->bInterfaceClass))
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 97a7d215bc..7d5a346390 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -4,6 +4,7 @@ config USB_HAVE_GADGET_DRIVER
menuconfig USB_GADGET
depends on USB_HAVE_GADGET_DRIVER
+ select USB
bool "USB gadget support"
if USB_GADGET
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 2da3edd296..d30c3aa1d1 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -229,16 +229,29 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
qh = &ehci->qh_list[1];
qh->qh_link = cpu_to_hc32((uint32_t)ehci->qh_list | QH_LINK_TYPE_QH);
- c = (usb_pipespeed(pipe) != USB_SPEED_HIGH &&
+ c = (dev->speed != USB_SPEED_HIGH &&
usb_pipeendpoint(pipe) == 0) ? 1 : 0;
endpt = (8 << 28) |
(c << 27) |
(usb_maxpacket(dev, pipe) << 16) |
(0 << 15) |
(1 << 14) |
- (usb_pipespeed(pipe) << 12) |
(usb_pipeendpoint(pipe) << 8) |
(0 << 7) | (usb_pipedevice(pipe) << 0);
+ switch (dev->speed) {
+ case USB_SPEED_FULL:
+ endpt |= 0 << 12;
+ break;
+ case USB_SPEED_LOW:
+ endpt |= 1 << 12;
+ break;
+ case USB_SPEED_HIGH:
+ endpt |= 2 << 12;
+ break;
+ default:
+ return -EINVAL;
+ }
+
qh->qh_endpt1 = cpu_to_hc32(endpt);
endpt = (1 << 30) |
(dev->portnr << 23) |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 8bf20d0d61..3d18a73325 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -794,7 +794,7 @@ static struct ed *ep_add_ed(struct usb_device *usb_dev, unsigned long pipe,
| (usb_pipeisoc(pipe) ? 0x8000 : 0)
| (usb_pipecontrol(pipe) ? 0 : \
(usb_pipeout(pipe) ? 0x800 : 0x1000))
- | usb_pipeslow(pipe) << 13
+ | (usb_dev->speed == USB_SPEED_LOW) << 13
| usb_maxpacket(usb_dev, pipe) << 16);
if (ed->type == PIPE_INTERRUPT && ed->state == ED_UNLINK) {
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index e4b08b9029..5149761a83 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -441,7 +441,7 @@ static void get_transport(struct us_data *us)
}
/* Get the endpoint settings */
-static int get_pipes(struct us_data *us, struct usb_interface_descriptor *intf)
+static int get_pipes(struct us_data *us, struct usb_interface *intf)
{
unsigned int i;
struct usb_endpoint_descriptor *ep;
@@ -455,7 +455,7 @@ static int get_pipes(struct us_data *us, struct usb_interface_descriptor *intf)
* An optional interrupt-in is OK (necessary for CBI protocol).
* We will ignore any others.
*/
- for (i = 0; i < intf->bNumEndpoints; i++) {
+ for (i = 0; i < intf->desc.bNumEndpoints; i++) {
ep = &intf->ep_desc[i];
if (USB_EP_IS_XFER_BULK(ep)) {
@@ -517,28 +517,28 @@ static int usb_stor_probe(struct usb_device *usbdev,
struct us_data *us;
int result;
int ifno;
- struct usb_interface_descriptor *intf;
+ struct usb_interface *intf;
US_DEBUGP("Supported USB Mass Storage device detected\n");
/* scan usbdev interfaces again to find one that we can handle */
for (ifno=0; ifno<usbdev->config.no_of_if; ifno++) {
- intf = &usbdev->config.if_desc[ifno];
+ intf = &usbdev->config.interface[ifno];
- if (intf->bInterfaceClass == USB_CLASS_MASS_STORAGE &&
- intf->bInterfaceSubClass == US_SC_SCSI &&
- intf->bInterfaceProtocol == US_PR_BULK)
+ if (intf->desc.bInterfaceClass == USB_CLASS_MASS_STORAGE &&
+ intf->desc.bInterfaceSubClass == US_SC_SCSI &&
+ intf->desc.bInterfaceProtocol == US_PR_BULK)
break;
}
if (ifno >= usbdev->config.no_of_if)
return -ENXIO;
/* select the right interface */
- result = usb_set_interface(usbdev, intf->bInterfaceNumber, 0);
+ result = usb_set_interface(usbdev, intf->desc.bInterfaceNumber, 0);
if (result)
return result;
- US_DEBUGP("Selected interface %d\n", (int)intf->bInterfaceNumber);
+ US_DEBUGP("Selected interface %d\n", (int)intf->desc.bInterfaceNumber);
/* allocate us_data structure */
us = (struct us_data *)malloc(sizeof(struct us_data));
@@ -549,9 +549,9 @@ static int usb_stor_probe(struct usb_device *usbdev,
/* initialize the us_data structure */
us->pusb_dev = usbdev;
us->flags = 0;
- us->ifnum = intf->bInterfaceNumber;
- us->subclass = intf->bInterfaceSubClass;
- us->protocol = intf->bInterfaceProtocol;
+ us->ifnum = intf->desc.bInterfaceNumber;
+ us->subclass = intf->desc.bInterfaceSubClass;
+ us->protocol = intf->desc.bInterfaceProtocol;
INIT_LIST_HEAD(&us->blk_dev_list);
/* get standard transport and protocol settings */
diff --git a/include/usb/usb.h b/include/usb/usb.h
index 4877e321bd..ff5242b8af 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>
@@ -39,13 +40,6 @@
#define USB_CNTL_TIMEOUT 100 /* 100ms timeout */
-/* String descriptor */
-struct usb_string_descriptor {
- unsigned char bLength;
- unsigned char bDescriptorType;
- unsigned short wData[1];
-} __attribute__ ((packed));
-
/* device request (setup) */
struct devrequest {
unsigned char requesttype;
@@ -55,83 +49,29 @@ 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));
+enum {
+ /* Maximum packet size; encoded as 0,1,2,3 = 8,16,32,64 */
+ PACKET_SIZE_8 = 0,
+ PACKET_SIZE_16 = 1,
+ PACKET_SIZE_32 = 2,
+ PACKET_SIZE_64 = 3,
+};
-/* 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;
+struct usb_interface {
+ struct usb_interface_descriptor desc;
unsigned char no_of_ep;
unsigned char num_altsetting;
unsigned char act_altsetting;
struct usb_endpoint_descriptor ep_desc[USB_MAXENDPOINTS];
-} __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;
+struct usb_configuration {
+ struct usb_config_descriptor desc;
unsigned char no_of_if; /* number of interfaces */
- struct usb_interface_descriptor if_desc[USB_MAXINTERFACES];
-} __attribute__ ((packed));
-
-enum {
- /* Maximum packet size; encoded as 0,1,2,3 = 8,16,32,64 */
- PACKET_SIZE_8 = 0,
- PACKET_SIZE_16 = 1,
- PACKET_SIZE_32 = 2,
- PACKET_SIZE_64 = 3,
+ struct usb_interface interface[USB_MAXINTERFACES];
};
struct usb_device {
@@ -154,7 +94,7 @@ struct usb_device {
int configno; /* selected config number */
struct usb_device_descriptor *descriptor; /* Device Descriptor */
- struct usb_config_descriptor config; /* config descriptor */
+ struct usb_configuration config; /* config descriptor */
struct devrequest *setup_packet;
int have_langid; /* whether string_langid is valid yet */
@@ -361,8 +301,6 @@ void usb_rescan(int force);
#define usb_pipe_endpdev(pipe) (((pipe) >> 8) & 0x7ff)
#define usb_pipeendpoint(pipe) (((pipe) >> 15) & 0xf)
#define usb_pipedata(pipe) (((pipe) >> 19) & 1)
-#define usb_pipespeed(pipe) (((pipe) >> 26) & 3)
-#define usb_pipeslow(pipe) (usb_pipespeed(pipe) == USB_SPEED_LOW)
#define usb_pipetype(pipe) (((pipe) >> 30) & 3)
#define usb_pipeisoc(pipe) (usb_pipetype((pipe)) == PIPE_ISOCHRONOUS)
#define usb_pipeint(pipe) (usb_pipetype((pipe)) == PIPE_INTERRUPT)
diff --git a/include/usb/usb_defs.h b/include/usb/usb_defs.h
index 13eb330ec5..ace20e430d 100644
--- a/include/usb/usb_defs.h
+++ b/include/usb/usb_defs.h
@@ -76,12 +76,6 @@
#define USB_DIR_OUT 0
#define USB_DIR_IN 0x80
-/* USB device speeds */
-#define USB_SPEED_FULL 0x0 /* 12Mbps */
-#define USB_SPEED_LOW 0x1 /* 1.5Mbps */
-#define USB_SPEED_HIGH 0x2 /* 480Mbps */
-#define USB_SPEED_RESERVED 0x3
-
/* Descriptor types */
#define USB_DT_DEVICE 0x01
#define USB_DT_CONFIG 0x02