summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/cpu/armv7/am33xx/board.c2
-rw-r--r--arch/arm/include/asm/arch-sunxi/usb_phy.h2
-rw-r--r--board/birdland/bav335x/board.c2
-rw-r--r--board/compulab/cm_t3517/cm_t3517.c6
-rw-r--r--board/logicpd/am3517evm/am3517evm.c8
-rw-r--r--board/phytec/pcm051/board.c2
-rw-r--r--board/siemens/draco/board.c2
-rw-r--r--board/siemens/pxm2/board.c2
-rw-r--r--board/siemens/rut/board.c2
-rw-r--r--board/sunxi/Kconfig16
-rw-r--r--board/ti/am335x/board.c2
-rw-r--r--board/ti/beagle/beagle.c8
-rw-r--r--board/vscom/baltos/board.c2
-rw-r--r--common/usb_hub.c10
-rw-r--r--configs/Ainol_AW1_defconfig2
-rw-r--r--configs/Ampe_A76_defconfig2
-rw-r--r--configs/CSQ_CS908_defconfig2
-rw-r--r--configs/Chuwi_V7_CW0825_defconfig2
-rw-r--r--configs/Et_q8_v1_6_defconfig2
-rw-r--r--configs/Hyundai_A7HD_defconfig2
-rw-r--r--configs/Ippo_q8h_v1_2_a33_1024x600_defconfig2
-rw-r--r--configs/Ippo_q8h_v1_2_defconfig2
-rw-r--r--configs/Ippo_q8h_v5_defconfig2
-rw-r--r--configs/MSI_Primo81_defconfig2
-rw-r--r--configs/Mele_A1000G_quad_defconfig2
-rw-r--r--configs/Mini-X_defconfig2
-rw-r--r--configs/TZX-Q8-713B7_defconfig2
-rw-r--r--configs/UTOO_P66_defconfig2
-rw-r--r--configs/Yones_Toptech_BD1078_defconfig2
-rw-r--r--configs/ba10_tv_box_defconfig2
-rw-r--r--configs/forfun_q88db_defconfig2
-rw-r--r--configs/ga10h_v1_1_defconfig2
-rw-r--r--configs/iNet_3F_defconfig2
-rw-r--r--configs/iNet_3W_defconfig2
-rw-r--r--configs/iNet_86VS_defconfig2
-rw-r--r--drivers/usb/Kconfig20
-rw-r--r--drivers/usb/eth/asix.c40
-rw-r--r--drivers/usb/gadget/gadget_chips.h2
-rw-r--r--drivers/usb/host/dwc2.c4
-rw-r--r--drivers/usb/host/usb-uclass.c2
-rw-r--r--drivers/usb/musb-new/Kconfig28
-rw-r--r--drivers/usb/musb-new/Makefile6
-rw-r--r--drivers/usb/musb-new/musb_core.c12
-rw-r--r--drivers/usb/musb-new/musb_core.h4
-rw-r--r--drivers/usb/musb-new/musb_dma.h2
-rw-r--r--drivers/usb/musb-new/musb_gadget.c4
-rw-r--r--drivers/usb/musb-new/musb_uboot.c12
-rw-r--r--drivers/usb/musb-new/sunxi.c9
-rw-r--r--drivers/usb/musb/Makefile4
-rw-r--r--drivers/usb/musb/musb_core.c8
-rw-r--r--drivers/usb/musb/musb_hcd.c6
-rw-r--r--drivers/usb/musb/musb_hcd.h4
-rw-r--r--include/configs/am335x_evm.h16
-rw-r--r--include/configs/am3517_crane.h14
-rw-r--r--include/configs/am3517_evm.h16
-rw-r--r--include/configs/baltos.h16
-rw-r--r--include/configs/bav335x.h16
-rw-r--r--include/configs/bf526-ezbrd.h4
-rw-r--r--include/configs/bf527-ezkit.h4
-rw-r--r--include/configs/bf548-ezkit.h4
-rw-r--r--include/configs/cam_enc_4xx.h2
-rw-r--r--include/configs/cm_t35.h2
-rw-r--r--include/configs/cm_t3517.h4
-rw-r--r--include/configs/da830evm.h10
-rw-r--r--include/configs/davinci_dm355evm.h4
-rw-r--r--include/configs/davinci_dm365evm.h10
-rw-r--r--include/configs/davinci_dvevm.h4
-rw-r--r--include/configs/kwb.h10
-rw-r--r--include/configs/nokia_rx51.h4
-rw-r--r--include/configs/omap3_beagle.h4
-rw-r--r--include/configs/omap3_evm.h8
-rw-r--r--include/configs/omap3_evm_common.h8
-rw-r--r--include/configs/omap3_igep00x0.h2
-rw-r--r--include/configs/omap3_mvblx.h2
-rw-r--r--include/configs/omap3_zoom1.h2
-rw-r--r--include/configs/pcm051.h12
-rw-r--r--include/configs/pengwyn.h12
-rw-r--r--include/configs/siemens-am33x-common.h14
-rw-r--r--include/configs/sunxi-common.h37
-rw-r--r--include/configs/ti_omap4_common.h2
-rw-r--r--include/configs/tseries.h10
-rw-r--r--include/usb.h4
83 files changed, 308 insertions, 225 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 32fa2ddc579..8b8269fd13e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -653,6 +653,7 @@ config ARCH_SUNXI
select SPL_DISABLE_OF_CONTROL
select USB
select USB_STORAGE
+ select USB_KEYBOARD
config TARGET_SNOWBALL
bool "Support snowball"
diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/cpu/armv7/am33xx/board.c
index 67bef23ea90..377c611eb61 100644
--- a/arch/arm/cpu/armv7/am33xx/board.c
+++ b/arch/arm/cpu/armv7/am33xx/board.c
@@ -124,7 +124,7 @@ int cpu_mmc_init(bd_t *bis)
#endif
/* AM33XX has two MUSB controllers which can be host or gadget */
-#if (defined(CONFIG_MUSB_GADGET) || defined(CONFIG_MUSB_HOST)) && \
+#if (defined(CONFIG_USB_MUSB_GADGET) || defined(CONFIG_USB_MUSB_HOST)) && \
(defined(CONFIG_AM335X_USB0) || defined(CONFIG_AM335X_USB1))
static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
diff --git a/arch/arm/include/asm/arch-sunxi/usb_phy.h b/arch/arm/include/asm/arch-sunxi/usb_phy.h
index 17d31b8e31c..cef6c985bc8 100644
--- a/arch/arm/include/asm/arch-sunxi/usb_phy.h
+++ b/arch/arm/include/asm/arch-sunxi/usb_phy.h
@@ -21,7 +21,7 @@ int sunxi_usb_phy_id_detect(int index);
void sunxi_usb_phy_enable_squelch_detect(int index, int enable);
/* Not really phy related, but we have to declare this somewhere ... */
-#if defined(CONFIG_MUSB_HOST) || defined(CONFIG_MUSB_GADGET)
+#if defined(CONFIG_USB_MUSB_HOST) || defined(CONFIG_USB_MUSB_GADGET)
void sunxi_musb_board_init(void);
#else
#define sunxi_musb_board_init()
diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c
index 32ff7a4f9ea..67aca3cc432 100644
--- a/board/birdland/bav335x/board.c
+++ b/board/birdland/bav335x/board.c
@@ -363,7 +363,7 @@ static struct cpsw_platform_data cpsw_data = {
#if ((defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USBETH_SUPPORT)) &&\
defined(CONFIG_SPL_BUILD)) || \
((defined(CONFIG_DRIVER_TI_CPSW) || \
- defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)) && \
+ defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET)) && \
!defined(CONFIG_SPL_BUILD))
int board_eth_init(bd_t *bis)
{
diff --git a/board/compulab/cm_t3517/cm_t3517.c b/board/compulab/cm_t3517/cm_t3517.c
index 03b2badd028..b33522ec8bc 100644
--- a/board/compulab/cm_t3517/cm_t3517.c
+++ b/board/compulab/cm_t3517/cm_t3517.c
@@ -50,12 +50,12 @@ static struct omap_musb_board_data cm_t3517_musb_board_data = {
};
static struct musb_hdrc_platform_data cm_t3517_musb_pdata = {
-#if defined(CONFIG_MUSB_HOST)
+#if defined(CONFIG_USB_MUSB_HOST)
.mode = MUSB_HOST,
-#elif defined(CONFIG_MUSB_GADGET)
+#elif defined(CONFIG_USB_MUSB_GADGET)
.mode = MUSB_PERIPHERAL,
#else
-#error "Please define either CONFIG_MUSB_HOST or CONFIG_MUSB_GADGET"
+#error "Please define either CONFIG_USB_MUSB_HOST or CONFIG_USB_MUSB_GADGET"
#endif
.config = &cm_t3517_musb_config,
.power = 250,
diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c
index 24be6eabfcd..24ff9c36a1a 100644
--- a/board/logicpd/am3517evm/am3517evm.c
+++ b/board/logicpd/am3517evm/am3517evm.c
@@ -65,12 +65,12 @@ static struct omap_musb_board_data musb_board_data = {
};
static struct musb_hdrc_platform_data musb_plat = {
-#if defined(CONFIG_MUSB_HOST)
+#if defined(CONFIG_USB_MUSB_HOST)
.mode = MUSB_HOST,
-#elif defined(CONFIG_MUSB_GADGET)
+#elif defined(CONFIG_USB_MUSB_GADGET)
.mode = MUSB_PERIPHERAL,
#else
-#error "Please define either CONFIG_MUSB_HOST or CONFIG_MUSB_GADGET"
+#error "Please define either CONFIG_USB_MUSB_HOST or CONFIG_USB_MUSB_GADGET"
#endif
.config = &musb_config,
.power = 250,
@@ -159,7 +159,7 @@ int board_mmc_init(bd_t *bis)
}
#endif
-#if defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)
+#if defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET)
int board_eth_init(bd_t *bis)
{
int rv, n = 0;
diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index 1bf9d730e5b..4f3853ac426 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -208,7 +208,7 @@ static struct cpsw_platform_data cpsw_data = {
#endif
#if defined(CONFIG_DRIVER_TI_CPSW) || \
- (defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET))
+ (defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET))
int board_eth_init(bd_t *bis)
{
int rv, n = 0;
diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c
index 2697762076a..48823141daa 100644
--- a/board/siemens/draco/board.c
+++ b/board/siemens/draco/board.c
@@ -267,7 +267,7 @@ static struct cpsw_platform_data cpsw_data = {
};
#if defined(CONFIG_DRIVER_TI_CPSW) || \
- (defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET))
+ (defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET))
int board_eth_init(bd_t *bis)
{
struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c
index 4d8ba3cd800..750f3388974 100644
--- a/board/siemens/pxm2/board.c
+++ b/board/siemens/pxm2/board.c
@@ -213,7 +213,7 @@ static struct cpsw_platform_data cpsw_data = {
#endif /* #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) */
#if defined(CONFIG_DRIVER_TI_CPSW) || \
- (defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET))
+ (defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET))
int board_eth_init(bd_t *bis)
{
int n = 0;
diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c
index fb840f7ed22..f94e3e5736f 100644
--- a/board/siemens/rut/board.c
+++ b/board/siemens/rut/board.c
@@ -174,7 +174,7 @@ static struct cpsw_platform_data cpsw_data = {
};
#if defined(CONFIG_DRIVER_TI_CPSW) || \
- (defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET))
+ (defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET))
int board_eth_init(bd_t *bis)
{
struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 441c8808138..c4b5a855a5e 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -539,22 +539,6 @@ config VIDEO_LCD_TL059WV5C0
endchoice
-config USB_MUSB_SUNXI
- bool "Enable sunxi OTG / DRC USB controller in host mode"
- default n
- ---help---
- Say y here to enable support for the sunxi OTG / DRC USB controller
- used on almost all sunxi boards. Note currently u-boot can only have
- one usb host controller enabled at a time, so enabling this on boards
- which also use the ehci host controller will result in build errors.
-
-config USB_KEYBOARD
- boolean "Enable USB keyboard support"
- default y
- ---help---
- Say Y here to add support for using a USB keyboard (typically used
- in combination with a graphical console).
-
config GMAC_TX_DELAY
int "GMAC Transmit Clock Delay Chain"
default 0
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 96245a3306a..1dc2ed0cf42 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -569,7 +569,7 @@ static struct cpsw_platform_data cpsw_data = {
#if ((defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USBETH_SUPPORT)) \
&& defined(CONFIG_SPL_BUILD)) || \
((defined(CONFIG_DRIVER_TI_CPSW) || \
- defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)) && \
+ defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET)) && \
!defined(CONFIG_SPL_BUILD))
int board_eth_init(bd_t *bis)
{
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 7b37fbe299e..3b0a9e7141b 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -306,12 +306,12 @@ static struct omap_musb_board_data musb_board_data = {
};
static struct musb_hdrc_platform_data musb_plat = {
-#if defined(CONFIG_MUSB_HOST)
+#if defined(CONFIG_USB_MUSB_HOST)
.mode = MUSB_HOST,
-#elif defined(CONFIG_MUSB_GADGET)
+#elif defined(CONFIG_USB_MUSB_GADGET)
.mode = MUSB_PERIPHERAL,
#else
-#error "Please define either CONFIG_MUSB_HOST or CONFIG_MUSB_GADGET"
+#error "Please define either CONFIG_USB_MUSB_HOST or CONFIG_USB_MUSB_GADGET"
#endif
.config = &musb_config,
.power = 100,
@@ -568,7 +568,7 @@ int ehci_hcd_stop(int index)
#endif /* CONFIG_USB_EHCI */
-#if defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)
+#if defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET)
int board_eth_init(bd_t *bis)
{
return usb_eth_initialize(bis);
diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c
index 09bc8c682a4..638d14f6d06 100644
--- a/board/vscom/baltos/board.c
+++ b/board/vscom/baltos/board.c
@@ -407,7 +407,7 @@ static struct cpsw_platform_data cpsw_data = {
#if ((defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USBETH_SUPPORT)) \
&& defined(CONFIG_SPL_BUILD)) || \
((defined(CONFIG_DRIVER_TI_CPSW) || \
- defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)) && \
+ defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET)) && \
!defined(CONFIG_SPL_BUILD))
int board_eth_init(bd_t *bis)
{
diff --git a/common/usb_hub.c b/common/usb_hub.c
index f621ddb9ab5..652a104361f 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -489,11 +489,15 @@ static int usb_hub_configure(struct usb_device *dev)
portstatus = le16_to_cpu(portsts->wPortStatus);
portchange = le16_to_cpu(portsts->wPortChange);
- if ((portchange & USB_PORT_STAT_C_CONNECTION) ==
- (portstatus & USB_PORT_STAT_CONNECTION))
+ /* No connection change happened, wait a bit more. */
+ if (!(portchange & USB_PORT_STAT_C_CONNECTION))
+ continue;
+
+ /* Test if the connection came up, and if so, exit. */
+ if (portstatus & USB_PORT_STAT_CONNECTION)
break;
- } while (get_timer(start) < CONFIG_SYS_HZ * 10);
+ } while (get_timer(start) < CONFIG_SYS_HZ * 1);
if (ret < 0)
continue;
diff --git a/configs/Ainol_AW1_defconfig b/configs/Ainol_AW1_defconfig
index e1262e67ea3..ff7abfad8f6 100644
--- a/configs/Ainol_AW1_defconfig
+++ b/configs/Ainol_AW1_defconfig
@@ -11,7 +11,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:40000,le:87,ri:112,up:38,lo
CONFIG_VIDEO_LCD_POWER="PH8"
CONFIG_VIDEO_LCD_BL_EN="PH7"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-ainol-aw1"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/Ampe_A76_defconfig b/configs/Ampe_A76_defconfig
index 2ee0307c0c0..1d36919ca58 100644
--- a/configs/Ampe_A76_defconfig
+++ b/configs/Ampe_A76_defconfig
@@ -10,7 +10,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:45,ri:82,up:22,lo:
CONFIG_VIDEO_LCD_POWER="AXP0-0"
CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-ampe-a76"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/CSQ_CS908_defconfig b/configs/CSQ_CS908_defconfig
index fe88a7b29f6..7c8eca883a9 100644
--- a/configs/CSQ_CS908_defconfig
+++ b/configs/CSQ_CS908_defconfig
@@ -15,4 +15,4 @@ CONFIG_ETH_DESIGNWARE=y
CONFIG_AXP221_DLDO1_VOLT=3300
CONFIG_AXP221_ALDO1_VOLT=3300
CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
diff --git a/configs/Chuwi_V7_CW0825_defconfig b/configs/Chuwi_V7_CW0825_defconfig
index cb659c902ce..40113515951 100644
--- a/configs/Chuwi_V7_CW0825_defconfig
+++ b/configs/Chuwi_V7_CW0825_defconfig
@@ -10,7 +10,7 @@ CONFIG_VIDEO_LCD_POWER="PH8"
CONFIG_VIDEO_LCD_BL_EN="PH7"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
CONFIG_VIDEO_LCD_PANEL_HITACHI_TX18D42VM=y
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-chuwi-v7-cw0825"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/Et_q8_v1_6_defconfig b/configs/Et_q8_v1_6_defconfig
index 278334710fa..ca8db19f5c4 100644
--- a/configs/Et_q8_v1_6_defconfig
+++ b/configs/Et_q8_v1_6_defconfig
@@ -11,7 +11,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
CONFIG_VIDEO_LCD_POWER="PH7"
CONFIG_VIDEO_LCD_BL_EN="PH6"
CONFIG_VIDEO_LCD_BL_PWM="PH0"
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-et-q8-v1.6"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/Hyundai_A7HD_defconfig b/configs/Hyundai_A7HD_defconfig
index 06fdd2a62a5..065a3f9a45a 100644
--- a/configs/Hyundai_A7HD_defconfig
+++ b/configs/Hyundai_A7HD_defconfig
@@ -12,7 +12,7 @@ CONFIG_VIDEO_LCD_BL_EN="PH9"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
# CONFIG_VIDEO_LCD_BL_PWM_ACTIVE_LOW is not set
CONFIG_VIDEO_LCD_PANEL_LVDS=y
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-hyundai-a7hd"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/Ippo_q8h_v1_2_a33_1024x600_defconfig b/configs/Ippo_q8h_v1_2_a33_1024x600_defconfig
index fda7683a7b8..213de5a4cfd 100644
--- a/configs/Ippo_q8h_v1_2_a33_1024x600_defconfig
+++ b/configs/Ippo_q8h_v1_2_a33_1024x600_defconfig
@@ -12,7 +12,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
CONFIG_VIDEO_LCD_POWER="PH7"
CONFIG_VIDEO_LCD_BL_EN="PH6"
CONFIG_VIDEO_LCD_BL_PWM="PH0"
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-ippo-q8h-v1.2"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/Ippo_q8h_v1_2_defconfig b/configs/Ippo_q8h_v1_2_defconfig
index 490cbe2be8e..ff5ec309351 100644
--- a/configs/Ippo_q8h_v1_2_defconfig
+++ b/configs/Ippo_q8h_v1_2_defconfig
@@ -12,7 +12,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
CONFIG_VIDEO_LCD_POWER="PH7"
CONFIG_VIDEO_LCD_BL_EN="PH6"
CONFIG_VIDEO_LCD_BL_PWM="PH0"
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-ippo-q8h-v1.2"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/Ippo_q8h_v5_defconfig b/configs/Ippo_q8h_v5_defconfig
index aa1eb691e70..b67206c3eb8 100644
--- a/configs/Ippo_q8h_v5_defconfig
+++ b/configs/Ippo_q8h_v5_defconfig
@@ -12,7 +12,7 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
CONFIG_VIDEO_LCD_POWER="PH7"
CONFIG_VIDEO_LCD_BL_EN="PH6"
CONFIG_VIDEO_LCD_BL_PWM="PH0"
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-ippo-q8h-v5"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/MSI_Primo81_defconfig b/configs/MSI_Primo81_defconfig
index b3b21cbd462..b089e97ab64 100644
--- a/configs/MSI_Primo81_defconfig
+++ b/configs/MSI_Primo81_defconfig
@@ -10,7 +10,7 @@ CONFIG_VIDEO_LCD_MODE="x:768,y:1024,depth:18,pclk_khz:66000,le:56,ri:60,up:30,lo
CONFIG_VIDEO_LCD_BL_EN="PA25"
CONFIG_VIDEO_LCD_BL_PWM="PH13"
CONFIG_VIDEO_LCD_PANEL_MIPI_4_LANE_513_MBPS_VIA_SSD2828=y
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
# CONFIG_USB_KEYBOARD is not set
CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-primo81"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
diff --git a/configs/Mele_A1000G_quad_defconfig b/configs/Mele_A1000G_quad_defconfig
index ffc8d9b7bd2..5e31ef61c72 100644
--- a/configs/Mele_A1000G_quad_defconfig
+++ b/configs/Mele_A1000G_quad_defconfig
@@ -17,4 +17,4 @@ CONFIG_AXP221_DLDO1_VOLT=3300
CONFIG_AXP221_DLDO4_VOLT=3300
CONFIG_AXP221_ALDO1_VOLT=3300
CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
diff --git a/configs/Mini-X_defconfig b/configs/Mini-X_defconfig
index c721c877422..00b6c63b82f 100644
--- a/configs/Mini-X_defconfig
+++ b/configs/Mini-X_defconfig
@@ -9,5 +9,5 @@ CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER"
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_USB0_VBUS_PIN="PB9"
diff --git a/configs/TZX-Q8-713B7_defconfig b/configs/TZX-Q8-713B7_defconfig
index 6a716bd1a82..35088347496 100644
--- a/configs/TZX-Q8-713B7_defconfig
+++ b/configs/TZX-Q8-713B7_defconfig
@@ -10,7 +10,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:87,ri:40,up:31,lo:
CONFIG_VIDEO_LCD_POWER="AXP0-0"
CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-tzx-q8-713b7"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/UTOO_P66_defconfig b/configs/UTOO_P66_defconfig
index d59a0448eb4..0266299f719 100644
--- a/configs/UTOO_P66_defconfig
+++ b/configs/UTOO_P66_defconfig
@@ -15,7 +15,7 @@ CONFIG_VIDEO_LCD_RESET="PG11"
CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
CONFIG_VIDEO_LCD_TL059WV5C0=y
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-utoo-p66"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/Yones_Toptech_BD1078_defconfig b/configs/Yones_Toptech_BD1078_defconfig
index 22b51a25951..27f2e2bb4ef 100644
--- a/configs/Yones_Toptech_BD1078_defconfig
+++ b/configs/Yones_Toptech_BD1078_defconfig
@@ -16,7 +16,7 @@ CONFIG_VIDEO_LCD_BL_EN="PH7"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
# CONFIG_VIDEO_LCD_BL_PWM_ACTIVE_LOW is not set
CONFIG_VIDEO_LCD_PANEL_LVDS=y
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-yones-toptech-bd1078"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/ba10_tv_box_defconfig b/configs/ba10_tv_box_defconfig
index ae302c544e4..5b5fc122f77 100644
--- a/configs/ba10_tv_box_defconfig
+++ b/configs/ba10_tv_box_defconfig
@@ -12,5 +12,5 @@ CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC"
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_USB0_VBUS_PIN="PB9"
diff --git a/configs/forfun_q88db_defconfig b/configs/forfun_q88db_defconfig
index 8f10c25b16c..6fff7255ed0 100644
--- a/configs/forfun_q88db_defconfig
+++ b/configs/forfun_q88db_defconfig
@@ -9,7 +9,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:87,ri:40,up:31,lo:
CONFIG_VIDEO_LCD_POWER="AXP0-0"
CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-forfun-q88db"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/ga10h_v1_1_defconfig b/configs/ga10h_v1_1_defconfig
index e766db4f6fd..098284db695 100644
--- a/configs/ga10h_v1_1_defconfig
+++ b/configs/ga10h_v1_1_defconfig
@@ -14,7 +14,7 @@ CONFIG_VIDEO_LCD_POWER="PH7"
CONFIG_VIDEO_LCD_BL_EN="PH6"
CONFIG_VIDEO_LCD_BL_PWM="PH0"
CONFIG_VIDEO_LCD_PANEL_LVDS=y
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-ga10h-v1.1"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/iNet_3F_defconfig b/configs/iNet_3F_defconfig
index c4611cff4c9..22d0caf8f74 100644
--- a/configs/iNet_3F_defconfig
+++ b/configs/iNet_3F_defconfig
@@ -11,7 +11,7 @@ CONFIG_VIDEO_LCD_POWER="PH8"
CONFIG_VIDEO_LCD_BL_EN="PH7"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
CONFIG_VIDEO_LCD_PANEL_LVDS=y
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet-3f"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/iNet_3W_defconfig b/configs/iNet_3W_defconfig
index d75eb218601..c296c0c5d41 100644
--- a/configs/iNet_3W_defconfig
+++ b/configs/iNet_3W_defconfig
@@ -11,7 +11,7 @@ CONFIG_VIDEO_LCD_MODE="x:1024,y:768,depth:24,pclk_khz:65000,le:159,ri:160,up:22,
CONFIG_VIDEO_LCD_POWER="PH8"
CONFIG_VIDEO_LCD_BL_EN="PH7"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-inet-3w"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/configs/iNet_86VS_defconfig b/configs/iNet_86VS_defconfig
index b9f2066d1e7..33162d18083 100644
--- a/configs/iNet_86VS_defconfig
+++ b/configs/iNet_86VS_defconfig
@@ -9,7 +9,7 @@ CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:45,ri:209,up:22,lo
CONFIG_VIDEO_LCD_POWER="AXP0-0"
CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
-CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_MUSB_HOST=y
CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-inet-86vs"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index 716dad478d1..abb06fcfe5b 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -1,10 +1,5 @@
-menu USB
-config USB_ARCH_HAS_HCD
- def_bool y
-
-config USB
- bool "Support for Host-side USB"
- depends on USB_ARCH_HAS_HCD
+menuconfig USB
+ bool "USB support"
---help---
Universal Serial Bus (USB) is a specification for a serial bus
subsystem which offers higher speeds and more features than the
@@ -18,8 +13,10 @@ config USB
such as scanners, keyboards, mice, modems, cameras, disks,
flash memory, network links, and printers to the PC.
- Say Y here if your computer has a host-side USB port and you want
- to use USB devices. You then need to say Y to at least one of the
+ Say Y here if your device has an USB port, either host, peripheral or
+ dual-role.
+
+ For an USB host port, you then need to say Y to at least one of the
Host Controller Driver (HCD) options below. Choose a USB 1.1
controller, such as "UHCI HCD support" or "OHCI HCD support",
and "EHCI HCD (USB 2.0) support" except for older systems that
@@ -52,8 +49,12 @@ config DM_USB
source "drivers/usb/host/Kconfig"
+source "drivers/usb/musb-new/Kconfig"
+
source "drivers/usb/emul/Kconfig"
+comment "USB peripherals"
+
config USB_STORAGE
bool "USB Mass Storage support"
---help---
@@ -88,4 +89,3 @@ endchoice
endif
endif
-endmenu
diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index 72ec41ea896..8a43e7c27d6 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -1,6 +1,8 @@
/*
* Copyright (c) 2011 The Chromium OS Authors.
*
+ * Patched for AX88772B by Antmicro Ltd <www.antmicro.com>
+ *
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -64,8 +66,11 @@
AX_MEDIUM_AC | AX_MEDIUM_RE)
/* AX88772 & AX88178 RX_CTL values */
-#define AX_RX_CTL_SO 0x0080
-#define AX_RX_CTL_AB 0x0008
+#define AX_RX_CTL_RH2M 0x0200 /* 32-bit aligned RX IP header */
+#define AX_RX_CTL_RH1M 0x0100 /* Enable RX header format type 1 */
+#define AX_RX_CTL_SO 0x0080
+#define AX_RX_CTL_AB 0x0008
+#define AX_RX_HEADER_DEFAULT (AX_RX_CTL_RH1M | AX_RX_CTL_RH2M)
#define AX_DEFAULT_RX_CTL \
(AX_RX_CTL_SO | AX_RX_CTL_AB)
@@ -92,6 +97,8 @@
#define FLAG_TYPE_AX88772B (1U << 2)
#define FLAG_EEPROM_MAC (1U << 3) /* initial mac address in eeprom */
+#define ASIX_USB_VENDOR_ID 0x0b95
+#define AX88772B_USB_PRODUCT_ID 0x772b
/* driver private */
struct asix_private {
@@ -418,15 +425,23 @@ static int asix_basic_reset(struct ueth_data *dev)
return 0;
}
-static int asix_init_common(struct ueth_data *dev)
+static int asix_init_common(struct ueth_data *dev, uint8_t *enetaddr)
{
int timeout = 0;
#define TIMEOUT_RESOLUTION 50 /* ms */
int link_detected;
+ u32 ctl = AX_DEFAULT_RX_CTL;
debug("** %s()\n", __func__);
- if (asix_write_rx_ctl(dev, AX_DEFAULT_RX_CTL) < 0)
+ if ((dev->pusb_dev->descriptor.idVendor == ASIX_USB_VENDOR_ID) &&
+ (dev->pusb_dev->descriptor.idProduct == AX88772B_USB_PRODUCT_ID))
+ ctl |= AX_RX_HEADER_DEFAULT;
+
+ if (asix_write_rx_ctl(dev, ctl) < 0)
+ goto out_err;
+
+ if (asix_write_hwaddr_common(dev, enetaddr) < 0)
goto out_err;
do {
@@ -447,6 +462,12 @@ static int asix_init_common(struct ueth_data *dev)
goto out_err;
}
+ /*
+ * Wait some more to avoid timeout on first transfer
+ * (e.g. EHCI timed out on TD - token=0x8008d80)
+ */
+ mdelay(25);
+
return 0;
out_err:
return -1;
@@ -488,7 +509,7 @@ static int asix_init(struct eth_device *eth, bd_t *bd)
{
struct ueth_data *dev = (struct ueth_data *)eth->priv;
- return asix_init_common(dev);
+ return asix_init_common(dev, eth->enetaddr);
}
static int asix_send(struct eth_device *eth, void *packet, int length)
@@ -550,6 +571,12 @@ static int asix_recv(struct eth_device *eth)
return -1;
}
+ if ((dev->pusb_dev->descriptor.idVendor ==
+ ASIX_USB_VENDOR_ID) &&
+ (dev->pusb_dev->descriptor.idProduct ==
+ AX88772B_USB_PRODUCT_ID))
+ buf_ptr += 2;
+
/* Notify net stack */
net_process_received_packet(buf_ptr + sizeof(packet_len),
packet_len);
@@ -729,9 +756,10 @@ int asix_eth_get_info(struct usb_device *dev, struct ueth_data *ss,
#ifdef CONFIG_DM_ETH
static int asix_eth_start(struct udevice *dev)
{
+ struct eth_pdata *pdata = dev_get_platdata(dev);
struct asix_private *priv = dev_get_priv(dev);
- return asix_init_common(&priv->ueth);
+ return asix_init_common(&priv->ueth, pdata->enetaddr);
}
void asix_eth_stop(struct udevice *dev)
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
index c859df2f7f8..e9811c3864e 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -125,7 +125,7 @@
#endif
/* Mentor high speed "dual role" controller, in peripheral role */
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
#define gadget_is_musbhdrc(g) (!strcmp("musb-hdrc", (g)->name))
#else
#define gadget_is_musbhdrc(g) 0
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index eee60a2b039..ad35841769e 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -929,6 +929,10 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
root_hub_devnum = 0;
+ /* board dependant init */
+ if (board_usb_init(index, USB_INIT_HOST))
+ return -1;
+
snpsid = readl(&regs->gsnpsid);
printf("Core Release: %x.%03x\n", snpsid >> 12 & 0xf, snpsid & 0xfff);
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index c5d1e7feb9d..b17a7d762e0 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -173,7 +173,9 @@ int usb_stop(void)
uclass_foreach_dev(dev, uc)
usb_emul_reset(dev);
#endif
+#ifdef CONFIG_USB_STORAGE
usb_stor_reset();
+#endif
usb_hub_reset();
uc_priv->companion_device_count = 0;
usb_started = 0;
diff --git a/drivers/usb/musb-new/Kconfig b/drivers/usb/musb-new/Kconfig
new file mode 100644
index 00000000000..0082ff87f03
--- /dev/null
+++ b/drivers/usb/musb-new/Kconfig
@@ -0,0 +1,28 @@
+#
+# MUSB Controller Driver
+#
+comment "MUSB Controller Driver"
+
+config USB_MUSB_HOST
+ bool "MUSB host mode support"
+ help
+ Enables the MUSB USB dual-role controller in host mode.
+
+config USB_MUSB_GADGET
+ bool "MUSB gadget mode support"
+ help
+ Enables the MUSB USB dual-role controller in gadget mode.
+
+if USB_MUSB_HOST || USB_MUSB_GADGET
+
+config USB_MUSB_SUNXI
+ bool "Enable sunxi OTG / DRC USB controller"
+ depends on ARCH_SUNXI
+ default y
+ ---help---
+ Say y here to enable support for the sunxi OTG / DRC USB controller
+ used on almost all sunxi boards. Note currently u-boot can only have
+ one usb host controller enabled at a time, so enabling this on boards
+ which also use the ehci host controller will result in build errors.
+
+endif
diff --git a/drivers/usb/musb-new/Makefile b/drivers/usb/musb-new/Makefile
index 9edeece381d..fd9df72ed40 100644
--- a/drivers/usb/musb-new/Makefile
+++ b/drivers/usb/musb-new/Makefile
@@ -2,9 +2,9 @@
# for USB OTG silicon based on Mentor Graphics INVENTRA designs
#
-obj-$(CONFIG_MUSB_GADGET) += musb_gadget.o musb_gadget_ep0.o musb_core.o
-obj-$(CONFIG_MUSB_GADGET) += musb_uboot.o
-obj-$(CONFIG_MUSB_HOST) += musb_host.o musb_core.o musb_uboot.o
+obj-$(CONFIG_USB_MUSB_GADGET) += musb_gadget.o musb_gadget_ep0.o musb_core.o
+obj-$(CONFIG_USB_MUSB_GADGET) += musb_uboot.o
+obj-$(CONFIG_USB_MUSB_HOST) += musb_host.o musb_core.o musb_uboot.o
obj-$(CONFIG_USB_MUSB_DSPS) += musb_dsps.o
obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o
obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
diff --git a/drivers/usb/musb-new/musb_core.c b/drivers/usb/musb-new/musb_core.c
index f530af4fb73..411e5a08848 100644
--- a/drivers/usb/musb-new/musb_core.c
+++ b/drivers/usb/musb-new/musb_core.c
@@ -1437,7 +1437,7 @@ static int __devinit musb_core_init(u16 musb_type, struct musb *musb)
strcat(aInfo, ", dyn FIFOs");
musb->dyn_fifo = true;
}
-#ifndef CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
+#ifndef CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
if (reg & MUSB_CONFIGDATA_MPRXE) {
strcat(aInfo, ", bulk combine");
musb->bulk_combine = true;
@@ -1662,7 +1662,7 @@ irqreturn_t musb_interrupt(struct musb *musb)
}
EXPORT_SYMBOL_GPL(musb_interrupt);
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
static bool __devinitdata use_dma = 1;
/* "modprobe ... use_dma=0" etc */
@@ -2011,7 +2011,7 @@ musb_init_controller(struct musb_hdrc_platform_data *plat, struct device *dev,
pm_runtime_get_sync(musb->controller);
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
if (use_dma && dev->dma_mask) {
struct dma_controller *c;
@@ -2194,7 +2194,7 @@ fail0:
* bridge to a platform device; this driver then suffices.
*/
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
static u64 *orig_dma_mask;
#endif
@@ -2217,7 +2217,7 @@ static int __devinit musb_probe(struct platform_device *pdev)
return -ENOMEM;
}
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
/* clobbered by use_dma=n */
orig_dma_mask = dev->dma_mask;
#endif
@@ -2244,7 +2244,7 @@ static int __devexit musb_remove(struct platform_device *pdev)
musb_free(musb);
iounmap(ctrl_base);
device_init_wakeup(&pdev->dev, 0);
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
pdev->dev.dma_mask = orig_dma_mask;
#endif
return 0;
diff --git a/drivers/usb/musb-new/musb_core.h b/drivers/usb/musb-new/musb_core.h
index 8727f6415e7..c8180404811 100644
--- a/drivers/usb/musb-new/musb_core.h
+++ b/drivers/usb/musb-new/musb_core.h
@@ -97,7 +97,7 @@ struct musb_ep;
#ifndef __UBOOT__
#define is_peripheral_capable() (1)
#else
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
#define is_peripheral_capable() (1)
#else
#define is_peripheral_capable() (0)
@@ -118,7 +118,7 @@ extern void musb_g_disconnect(struct musb *);
#ifndef __UBOOT__
#define is_host_capable() (1)
#else
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
#define is_host_capable() (1)
#else
#define is_host_capable() (0)
diff --git a/drivers/usb/musb-new/musb_dma.h b/drivers/usb/musb-new/musb_dma.h
index 3a97c4e2d4f..17fe89fdcbf 100644
--- a/drivers/usb/musb-new/musb_dma.h
+++ b/drivers/usb/musb-new/musb_dma.h
@@ -62,7 +62,7 @@ struct musb_hw_ep;
#define DMA_ADDR_INVALID (~(dma_addr_t)0)
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
#define is_dma_capable() (1)
#else
#define is_dma_capable() (0)
diff --git a/drivers/usb/musb-new/musb_gadget.c b/drivers/usb/musb-new/musb_gadget.c
index 97acf93d316..309dc7f93f6 100644
--- a/drivers/usb/musb-new/musb_gadget.c
+++ b/drivers/usb/musb-new/musb_gadget.c
@@ -99,7 +99,7 @@
#define is_buffer_mapped(req) (is_dma_capable() && \
(req->map_state != UN_MAPPED))
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
/* Maps the buffer to dma */
static inline void map_dma_buffer(struct musb_request *request,
@@ -382,7 +382,7 @@ static void txstate(struct musb *musb, struct musb_request *req)
epnum, musb_ep->packet_sz, fifo_count,
csr);
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
if (is_buffer_mapped(req)) {
struct dma_controller *c = musb->dma_controller;
size_t request_size;
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index 9b56e904e44..10f6b5d1cf1 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -15,7 +15,7 @@
#include "musb_gadget.h"
#include "musb_uboot.h"
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
struct int_queue {
struct usb_host_endpoint hep;
struct urb urb;
@@ -368,9 +368,9 @@ struct dm_usb_ops musb_usb_ops = {
.reset_root_port = musb_reset_root_port,
};
#endif /* CONFIG_DM_USB */
-#endif /* CONFIG_MUSB_HOST */
+#endif /* CONFIG_USB_MUSB_HOST */
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
static struct musb *gadget;
int usb_gadget_handle_interrupts(int index)
@@ -420,7 +420,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
driver->unbind(&gadget->g);
return 0;
}
-#endif /* CONFIG_MUSB_GADGET */
+#endif /* CONFIG_USB_MUSB_GADGET */
int musb_register(struct musb_hdrc_platform_data *plat, void *bdata,
void *ctl_regs)
@@ -428,12 +428,12 @@ int musb_register(struct musb_hdrc_platform_data *plat, void *bdata,
struct musb **musbp;
switch (plat->mode) {
-#if defined(CONFIG_MUSB_HOST) && !defined(CONFIG_DM_USB)
+#if defined(CONFIG_USB_MUSB_HOST) && !defined(CONFIG_DM_USB)
case MUSB_HOST:
musbp = &musb_host.host;
break;
#endif
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
case MUSB_PERIPHERAL:
musbp = &gadget;
break;
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 3a29b18e5f4..16a264a9dde 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -200,6 +200,9 @@ static int sunxi_musb_enable(struct musb *musb)
pr_debug("%s():\n", __func__);
+ musb_ep_select(musb->mregs, 0);
+ musb_writeb(musb->mregs, MUSB_FADDR, 0);
+
if (enabled)
return 0;
@@ -286,7 +289,7 @@ static struct musb_hdrc_config musb_config = {
};
static struct musb_hdrc_platform_data musb_plat = {
-#if defined(CONFIG_MUSB_HOST)
+#if defined(CONFIG_USB_MUSB_HOST)
.mode = MUSB_HOST,
#else
.mode = MUSB_PERIPHERAL,
@@ -296,7 +299,7 @@ static struct musb_hdrc_platform_data musb_plat = {
.platform_ops = &sunxi_musb_ops,
};
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
int musb_usb_probe(struct udevice *dev)
{
struct musb_host_data *host = dev_get_priv(dev);
@@ -341,7 +344,7 @@ U_BOOT_DRIVER(usb_musb) = {
void sunxi_musb_board_init(void)
{
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
struct udevice *dev;
/*
diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile
index 3c9ed98bc04..bd2b7c521fc 100644
--- a/drivers/usb/musb/Makefile
+++ b/drivers/usb/musb/Makefile
@@ -5,8 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-obj-$(CONFIG_MUSB_HCD) += musb_hcd.o musb_core.o
-obj-$(CONFIG_MUSB_UDC) += musb_udc.o musb_core.o
+obj-$(CONFIG_USB_MUSB_HCD) += musb_hcd.o musb_core.o
+obj-$(CONFIG_USB_MUSB_UDC) += musb_udc.o musb_core.o
obj-$(CONFIG_USB_BLACKFIN) += blackfin_usb.o
obj-$(CONFIG_USB_DAVINCI) += davinci.o
obj-$(CONFIG_USB_OMAP3) += omap3.o
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 786909fb60c..ea3996a5551 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -19,7 +19,7 @@ struct musb_regs *musbr;
*/
void musb_start(void)
{
-#if defined(CONFIG_MUSB_HCD)
+#if defined(CONFIG_USB_MUSB_HCD)
u8 devctl;
u8 busctl;
#endif
@@ -32,7 +32,7 @@ void musb_start(void)
/* put into basic highspeed mode and start session */
writeb(MUSB_POWER_HSENAB, &musbr->power);
-#if defined(CONFIG_MUSB_HCD)
+#if defined(CONFIG_USB_MUSB_HCD)
/* Program PHY to use EXT VBUS if required */
if (musb_cfg.extvbus == 1) {
busctl = musb_read_ulpi_buscontrol(musbr);
@@ -81,7 +81,7 @@ void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt)
config_fifo(tx, idx, fifoaddr);
csr = readw(&musbr->txcsr);
-#if defined(CONFIG_MUSB_HCD)
+#if defined(CONFIG_USB_MUSB_HCD)
/* clear the data toggle bit */
writew(csr | MUSB_TXCSR_CLRDATATOG, &musbr->txcsr);
#endif
@@ -94,7 +94,7 @@ void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt)
config_fifo(rx, idx, fifoaddr);
csr = readw(&musbr->rxcsr);
-#if defined(CONFIG_MUSB_HCD)
+#if defined(CONFIG_USB_MUSB_HCD)
/* clear the data toggle bit */
writew(csr | MUSB_RXCSR_CLRDATATOG, &musbr->rxcsr);
#endif
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index f0ba8aaaa32..9a3b61aa557 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -117,7 +117,7 @@ static int wait_until_ep0_ready(struct usb_device *dev, u32 bit_mask)
{
u16 csr;
int result = 1;
- int timeout = CONFIG_MUSB_TIMEOUT;
+ int timeout = CONFIG_USB_MUSB_TIMEOUT;
while (result > 0) {
csr = readw(&musbr->txcsr);
@@ -179,7 +179,7 @@ static int wait_until_ep0_ready(struct usb_device *dev, u32 bit_mask)
static int wait_until_txep_ready(struct usb_device *dev, u8 ep)
{
u16 csr;
- int timeout = CONFIG_MUSB_TIMEOUT;
+ int timeout = CONFIG_USB_MUSB_TIMEOUT;
do {
if (check_stall(ep, 1)) {
@@ -211,7 +211,7 @@ static int wait_until_txep_ready(struct usb_device *dev, u8 ep)
static int wait_until_rxep_ready(struct usb_device *dev, u8 ep)
{
u16 csr;
- int timeout = CONFIG_MUSB_TIMEOUT;
+ int timeout = CONFIG_USB_MUSB_TIMEOUT;
do {
if (check_stall(ep, 0)) {
diff --git a/drivers/usb/musb/musb_hcd.h b/drivers/usb/musb/musb_hcd.h
index 0c8e75d46c1..831957d9f9f 100644
--- a/drivers/usb/musb/musb_hcd.h
+++ b/drivers/usb/musb/musb_hcd.h
@@ -17,8 +17,8 @@
extern unsigned char new[];
#endif
-#ifndef CONFIG_MUSB_TIMEOUT
-# define CONFIG_MUSB_TIMEOUT 100000
+#ifndef CONFIG_USB_MUSB_TIMEOUT
+# define CONFIG_USB_MUSB_TIMEOUT 100000
#endif
/* This defines the endpoint number used for control transfers */
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 633391bc93c..e89c49e1e3a 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -283,14 +283,14 @@
*/
#define CONFIG_USB_MUSB_DSPS
#define CONFIG_ARCH_MISC_INIT
-#define CONFIG_MUSB_GADGET
-#define CONFIG_MUSB_PIO_ONLY
-#define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
+#define CONFIG_USB_MUSB_GADGET
+#define CONFIG_USB_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
#define CONFIG_USB_GADGET
#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_USB_GADGET_DUALSPEED
#define CONFIG_USB_GADGET_VBUS_DRAW 2
-#define CONFIG_MUSB_HOST
+#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
#define CONFIG_AM335X_USB1
@@ -309,12 +309,12 @@
#define CONFIG_FASTBOOT_FLASH_MMC_DEV 1
#endif
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
#endif
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
#define CONFIG_USB_ETHER
#define CONFIG_USB_ETH_RNDIS
#define CONFIG_USBNET_HOST_ADDR "de:ad:be:af:00:00"
@@ -323,7 +323,7 @@
#define CONFIG_G_DNL_VENDOR_NUM 0x0451
#define CONFIG_G_DNL_PRODUCT_NUM 0xD022
#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
-#endif /* CONFIG_MUSB_GADGET */
+#endif /* CONFIG_USB_MUSB_GADGET */
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
/* Remove other SPL modes. */
@@ -333,7 +333,7 @@
#define CONFIG_ENV_IS_NOWHERE
#undef CONFIG_ENV_IS_IN_NAND
/* disable host part of MUSB in SPL */
-#undef CONFIG_MUSB_HOST
+#undef CONFIG_USB_MUSB_HOST
/* disable EFI partitions and partition UUID support */
#undef CONFIG_PARTITION_UUIDS
#undef CONFIG_EFI_PARTITION
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 6a0240b9038..600fefbc203 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -91,15 +91,15 @@
/*
* USB configuration
- * Enable CONFIG_MUSB_HCD for Host functionalities MSC, keyboard
- * Enable CONFIG_MUSB_UDC for Device functionalities.
+ * Enable CONFIG_USB_MUSB_HCD for Host functionalities MSC, keyboard
+ * Enable CONFIG_USB_MUSB_UDC for Device functionalities.
*/
#define CONFIG_USB_AM35X 1
-#define CONFIG_MUSB_HCD 1
+#define CONFIG_USB_MUSB_HCD 1
#ifdef CONFIG_USB_AM35X
-#ifdef CONFIG_MUSB_HCD
+#ifdef CONFIG_USB_MUSB_HCD
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
@@ -111,9 +111,9 @@
#define CONFIG_PREBOOT "usb start"
#endif /* CONFIG_USB_KEYBOARD */
-#endif /* CONFIG_MUSB_HCD */
+#endif /* CONFIG_USB_MUSB_HCD */
-#ifdef CONFIG_MUSB_UDC
+#ifdef CONFIG_USB_MUSB_UDC
/* USB device configuration */
#define CONFIG_USB_DEVICE 1
#define CONFIG_USB_TTY 1
@@ -123,7 +123,7 @@
#define CONFIG_USBD_PRODUCTID 0x5678
#define CONFIG_USBD_MANUFACTURER "Texas Instruments"
#define CONFIG_USBD_PRODUCT_NAME "AM3517CRANE"
-#endif /* CONFIG_MUSB_UDC */
+#endif /* CONFIG_USB_MUSB_UDC */
#endif /* CONFIG_USB_AM35X */
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index e9808a7473a..30f31a93ada 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -97,16 +97,16 @@
/*
* USB configuration
- * Enable CONFIG_MUSB_HOST for Host functionalities MSC, keyboard
- * Enable CONFIG_MUSB_GADGET for Device functionalities.
+ * Enable CONFIG_USB_MUSB_HOST for Host functionalities MSC, keyboard
+ * Enable CONFIG_USB_MUSB_GADGET for Device functionalities.
*/
#define CONFIG_USB_MUSB_AM35X
-#define CONFIG_MUSB_HOST
-#define CONFIG_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_HOST
+#define CONFIG_USB_MUSB_PIO_ONLY
#ifdef CONFIG_USB_MUSB_AM35X
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
@@ -118,13 +118,13 @@
#define CONFIG_PREBOOT "usb start"
#endif /* CONFIG_USB_KEYBOARD */
-#endif /* CONFIG_MUSB_HOST */
+#endif /* CONFIG_USB_MUSB_HOST */
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
#define CONFIG_USB_GADGET_DUALSPEED
#define CONFIG_USB_ETHER
#define CONFIG_USB_ETH_RNDIS
-#endif /* CONFIG_MUSB_GADGET */
+#endif /* CONFIG_USB_MUSB_GADGET */
#endif /* CONFIG_USB_MUSB_AM35X */
diff --git a/include/configs/baltos.h b/include/configs/baltos.h
index cce5e4f2857..5545cf0f10f 100644
--- a/include/configs/baltos.h
+++ b/include/configs/baltos.h
@@ -273,25 +273,25 @@
*/
#define CONFIG_USB_MUSB_DSPS
#define CONFIG_ARCH_MISC_INIT
-#define CONFIG_MUSB_GADGET
-#define CONFIG_MUSB_PIO_ONLY
-#define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
+#define CONFIG_USB_MUSB_GADGET
+#define CONFIG_USB_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
#define CONFIG_USB_GADGET
#define CONFIG_USBDOWNLOAD_GADGET
#define CONFIG_USB_GADGET_DUALSPEED
#define CONFIG_USB_GADGET_VBUS_DRAW 2
-#define CONFIG_MUSB_HOST
+#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_HOST
#define CONFIG_AM335X_USB1
#define CONFIG_AM335X_USB1_MODE MUSB_OTG
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
#endif
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
#define CONFIG_USB_ETHER
#define CONFIG_USB_ETH_RNDIS
#define CONFIG_USBNET_HOST_ADDR "de:ad:be:af:00:00"
@@ -300,11 +300,11 @@
#define CONFIG_G_DNL_VENDOR_NUM 0x0403
#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
-#endif /* CONFIG_MUSB_GADGET */
+#endif /* CONFIG_USB_MUSB_GADGET */
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
/* disable host part of MUSB in SPL */
-#undef CONFIG_MUSB_HOST
+#undef CONFIG_USB_MUSB_HOST
/* disable EFI partitions and partition UUID support */
#undef CONFIG_PARTITION_UUIDS
#undef CONFIG_EFI_PARTITION
diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h
index fa32fa43d15..9917627fc0b 100644
--- a/include/configs/bav335x.h
+++ b/include/configs/bav335x.h
@@ -440,14 +440,14 @@ DEFAULT_LINUX_BOOT_ENV \
*/
#define CONFIG_USB_MUSB_DSPS
#define CONFIG_ARCH_MISC_INIT
-#define CONFIG_MUSB_GADGET
-#define CONFIG_MUSB_PIO_ONLY
-#define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
+#define CONFIG_USB_MUSB_GADGET
+#define CONFIG_USB_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
#define CONFIG_USB_GADGET
#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_USB_GADGET_DUALSPEED
#define CONFIG_USB_GADGET_VBUS_DRAW 2
-#define CONFIG_MUSB_HOST
+#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
#define CONFIG_AM335X_USB1
@@ -466,12 +466,12 @@ DEFAULT_LINUX_BOOT_ENV \
#define CONFIG_FASTBOOT_FLASH_MMC_DEV 1
#endif
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
#endif
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
#define CONFIG_CMD_USB_MASS_STORAGE
#define CONFIG_USB_FUNCTION_MASS_STORAGE
@@ -479,11 +479,11 @@ DEFAULT_LINUX_BOOT_ENV \
#define CONFIG_G_DNL_VENDOR_NUM 0x0451
#define CONFIG_G_DNL_PRODUCT_NUM 0xD022
#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
-#endif /* CONFIG_MUSB_GADGET */
+#endif /* CONFIG_USB_MUSB_GADGET */
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
/* disable host part of MUSB in SPL */
-#undef CONFIG_MUSB_HOST
+#undef CONFIG_USB_MUSB_HOST
/* disable EFI partitions and partition UUID support */
#undef CONFIG_PARTITION_UUIDS
#undef CONFIG_EFI_PARTITION
diff --git a/include/configs/bf526-ezbrd.h b/include/configs/bf526-ezbrd.h
index 5767ac1bd78..a8f0979624a 100644
--- a/include/configs/bf526-ezbrd.h
+++ b/include/configs/bf526-ezbrd.h
@@ -136,10 +136,10 @@
*/
#if !defined(__ADSPBF522__) && !defined(__ADSPBF523__)
#define CONFIG_USB
-#define CONFIG_MUSB_HCD
+#define CONFIG_USB_MUSB_HCD
#define CONFIG_USB_BLACKFIN
#define CONFIG_USB_STORAGE
-#define CONFIG_MUSB_TIMEOUT 100000
+#define CONFIG_USB_MUSB_TIMEOUT 100000
#endif
diff --git a/include/configs/bf527-ezkit.h b/include/configs/bf527-ezkit.h
index 28b3760f69c..d23602bb329 100644
--- a/include/configs/bf527-ezkit.h
+++ b/include/configs/bf527-ezkit.h
@@ -139,10 +139,10 @@
*/
#if !defined(__ADSPBF522__) && !defined(__ADSPBF523__)
#define CONFIG_USB
-#define CONFIG_MUSB_HCD
+#define CONFIG_USB_MUSB_HCD
#define CONFIG_USB_BLACKFIN
#define CONFIG_USB_STORAGE
-#define CONFIG_MUSB_TIMEOUT 100000
+#define CONFIG_USB_MUSB_TIMEOUT 100000
#endif
/* Don't waste time transferring a logo over the UART */
diff --git a/include/configs/bf548-ezkit.h b/include/configs/bf548-ezkit.h
index c7b44ae427c..f0f768ac092 100644
--- a/include/configs/bf548-ezkit.h
+++ b/include/configs/bf548-ezkit.h
@@ -163,10 +163,10 @@
*/
#if !defined(__ADSPBF544__)
#define CONFIG_USB
-#define CONFIG_MUSB_HCD
+#define CONFIG_USB_MUSB_HCD
#define CONFIG_USB_BLACKFIN
#define CONFIG_USB_STORAGE
-#define CONFIG_MUSB_TIMEOUT 100000
+#define CONFIG_USB_MUSB_TIMEOUT 100000
#endif
diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h
index 21e3a0c2db9..3400dd46f97 100644
--- a/include/configs/cam_enc_4xx.h
+++ b/include/configs/cam_enc_4xx.h
@@ -488,7 +488,7 @@
/* USB Configuration */
#define CONFIG_USB_DAVINCI
-#define CONFIG_MUSB_HCD
+#define CONFIG_USB_MUSB_HCD
#define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN | \
USBPHY_PHY24MHZ)
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 41df106ee0e..6885ae1e36c 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -100,7 +100,7 @@
#define CONFIG_USB_EHCI
#define CONFIG_USB_EHCI_OMAP
#define CONFIG_USB_STORAGE
-#define CONFIG_MUSB_UDC
+#define CONFIG_USB_MUSB_UDC
#define CONFIG_TWL4030_USB
#define CONFIG_CMD_USB
diff --git a/include/configs/cm_t3517.h b/include/configs/cm_t3517.h
index a8d0b972879..cf0841499bf 100644
--- a/include/configs/cm_t3517.h
+++ b/include/configs/cm_t3517.h
@@ -112,8 +112,8 @@
#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 146
#define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 147
#else /* !CONFIG_USB_MUSB_AM35X */
-#define CONFIG_MUSB_HOST
-#define CONFIG_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_HOST
+#define CONFIG_USB_MUSB_PIO_ONLY
#endif /* CONFIG_USB_MUSB_AM35X */
#define CONFIG_USB_STORAGE
diff --git a/include/configs/da830evm.h b/include/configs/da830evm.h
index 729b6e74aa2..b82140e9397 100644
--- a/include/configs/da830evm.h
+++ b/include/configs/da830evm.h
@@ -135,7 +135,7 @@
* USB configuration
*/
#define CONFIG_USB_DA8XX /* Platform hookup to MUSB controller */
-#define CONFIG_MUSB_HCD
+#define CONFIG_USB_MUSB_HCD
/*
* U-Boot general configuration
@@ -233,7 +233,7 @@
#ifdef CONFIG_USB_DA8XX
-#ifdef CONFIG_MUSB_HCD /* include support for usb host */
+#ifdef CONFIG_USB_MUSB_HCD /* include support for usb host */
#define CONFIG_CMD_USB /* include support for usb cmd */
#define CONFIG_USB_STORAGE /* MSC class support */
@@ -244,9 +244,9 @@
#define CONFIG_PREBOOT "usb start"
#endif /* CONFIG_USB_KEYBOARD */
-#endif /* CONFIG_MUSB_HCD */
+#endif /* CONFIG_USB_MUSB_HCD */
-#ifdef CONFIG_MUSB_UDC
+#ifdef CONFIG_USB_MUSB_UDC
/* USB device configuration */
#define CONFIG_USB_DEVICE 1
#define CONFIG_USB_TTY 1
@@ -256,7 +256,7 @@
#define CONFIG_USBD_PRODUCTID 0x5678
#define CONFIG_USBD_MANUFACTURER "Texas Instruments"
#define CONFIG_USBD_PRODUCT_NAME "DA830EVM"
-#endif /* CONFIG_MUSB_UDC */
+#endif /* CONFIG_USB_MUSB_UDC */
#endif /* CONFIG_USB_DA8XX */
diff --git a/include/configs/davinci_dm355evm.h b/include/configs/davinci_dm355evm.h
index 847d7882925..e873fa4d8d8 100644
--- a/include/configs/davinci_dm355evm.h
+++ b/include/configs/davinci_dm355evm.h
@@ -96,11 +96,11 @@
#endif
#ifdef CONFIG_USB_DAVINCI
-#define CONFIG_MUSB_HCD
+#define CONFIG_USB_MUSB_HCD
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
#else
-#undef CONFIG_MUSB_HCD
+#undef CONFIG_USB_MUSB_HCD
#undef CONFIG_CMD_USB
#undef CONFIG_USB_STORAGE
#endif
diff --git a/include/configs/davinci_dm365evm.h b/include/configs/davinci_dm365evm.h
index 8b42c50dd99..9bdd2d66119 100644
--- a/include/configs/davinci_dm365evm.h
+++ b/include/configs/davinci_dm365evm.h
@@ -78,7 +78,7 @@
/* USB Configuration */
#define CONFIG_USB_DAVINCI
-#define CONFIG_MUSB_HCD
+#define CONFIG_USB_MUSB_HCD
#ifdef CONFIG_USB_DAVINCI
#define CONFIG_CMD_USB /* include support for usb */
@@ -87,7 +87,7 @@
#define CONFIG_DOS_PARTITION /* include support for FAT/storage*/
#endif
-#ifdef CONFIG_MUSB_HCD /* include support for usb host */
+#ifdef CONFIG_USB_MUSB_HCD /* include support for usb host */
#define CONFIG_CMD_USB /* include support for usb cmd */
#define CONFIG_USB_STORAGE /* MSC class support */
#define CONFIG_CMD_STORAGE /* inclue support for usb-storage cmd */
@@ -99,9 +99,9 @@
#define CONFIG_PREBOOT "usb start"
#endif /* CONFIG_USB_KEYBOARD */
-#endif /* CONFIG_MUSB_HCD */
+#endif /* CONFIG_USB_MUSB_HCD */
-#ifdef CONFIG_MUSB_UDC
+#ifdef CONFIG_USB_MUSB_UDC
#define CONFIG_USB_DEVICE 1
#define CONFIG_USB_TTY 1
#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
@@ -109,7 +109,7 @@
#define CONFIG_USBD_PRODUCTID 0x5678
#define CONFIG_USBD_MANUFACTURER "Texas Instruments"
#define CONFIG_USBD_PRODUCT_NAME "DM365VM"
-#endif /* CONFIG_MUSB_UDC */
+#endif /* CONFIG_USB_MUSB_UDC */
/* U-Boot command configuration */
#define CONFIG_CMD_ASKENV
diff --git a/include/configs/davinci_dvevm.h b/include/configs/davinci_dvevm.h
index 61087363b2f..35e9a15a9de 100644
--- a/include/configs/davinci_dvevm.h
+++ b/include/configs/davinci_dvevm.h
@@ -156,7 +156,7 @@
#define CONFIG_SYS_LONGHELP
#define CONFIG_CRC32_VERIFY
#define CONFIG_MX_CYCLIC
-#define CONFIG_MUSB_HCD
+#define CONFIG_USB_MUSB_HCD
#define CONFIG_USB_DAVINCI
/*===================*/
/* Linux Information */
@@ -194,7 +194,7 @@
/*==========================*/
#ifdef CONFIG_USB_DAVINCI
#define CONFIG_CMD_USB
-#ifdef CONFIG_MUSB_HCD
+#ifdef CONFIG_USB_MUSB_HCD
#define CONFIG_USB_STORAGE
#define CONFIG_CMD_STORAGE
#define CONFIG_CMD_FAT
diff --git a/include/configs/kwb.h b/include/configs/kwb.h
index acff5b9f89d..96f2e9d39b4 100644
--- a/include/configs/kwb.h
+++ b/include/configs/kwb.h
@@ -116,20 +116,20 @@ BUR_COMMON_ENV \
/* USB configuration */
#define CONFIG_USB_MUSB_DSPS
#define CONFIG_ARCH_MISC_INIT
-#define CONFIG_MUSB_PIO_ONLY
-#define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
+#define CONFIG_USB_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
/* attention! not only for gadget, enables also highspeed in hostmode */
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_MUSB_HOST
+#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_HOST
#define CONFIG_AM335X_USB1
#define CONFIG_AM335X_USB1_MODE MUSB_HOST
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
-#endif /* CONFIG_MUSB_HOST */
+#endif /* CONFIG_USB_MUSB_HOST */
#undef CONFIG_ENV_IS_NOWHERE
#define CONFIG_ENV_IS_IN_MMC
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index 6e3ce4d3c7f..7ec9965a464 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -108,8 +108,8 @@
#define CONFIG_DOS_PARTITION
/* USB */
-#define CONFIG_MUSB_UDC
-#define CONFIG_MUSB_HCD
+#define CONFIG_USB_MUSB_UDC
+#define CONFIG_USB_MUSB_HCD
#define CONFIG_USB_OMAP3
#define CONFIG_TWL4030_USB
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 804e30708fe..dbe3e9be8ca 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -59,9 +59,9 @@
#define CONFIG_SYS_I2C_NOPROBES {{0x0, 0x0}}
/* USB */
-#define CONFIG_MUSB_GADGET
+#define CONFIG_USB_MUSB_GADGET
#define CONFIG_USB_MUSB_OMAP2PLUS
-#define CONFIG_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_PIO_ONLY
#define CONFIG_USB_GADGET_DUALSPEED
#define CONFIG_TWL4030_USB 1
#define CONFIG_USB_ETHER
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 70fab4b0f4e..1dd71a8eb6d 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -77,12 +77,12 @@
/* USB
*
- * Enable CONFIG_MUSB_HCD for Host functionalities MSC, keyboard
- * Enable CONFIG_MUSB_UDD for Device functionalities.
+ * Enable CONFIG_USB_MUSB_HCD for Host functionalities MSC, keyboard
+ * Enable CONFIG_USB_MUSB_UDD for Device functionalities.
*/
#define CONFIG_USB_OMAP3
-#define CONFIG_MUSB_HCD
-/* #define CONFIG_MUSB_UDC */
+#define CONFIG_USB_MUSB_HCD
+/* #define CONFIG_USB_MUSB_UDC */
/* NAND SPL */
#define CONFIG_SPL_NAND_SIMPLE
diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h
index 370f21e3ee6..66c314fc42c 100644
--- a/include/configs/omap3_evm_common.h
+++ b/include/configs/omap3_evm_common.h
@@ -146,7 +146,7 @@
*/
#ifdef CONFIG_USB_OMAP3
-#ifdef CONFIG_MUSB_HCD
+#ifdef CONFIG_USB_MUSB_HCD
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
@@ -158,9 +158,9 @@
#define CONFIG_PREBOOT "usb start"
#endif /* CONFIG_USB_KEYBOARD */
-#endif /* CONFIG_MUSB_HCD */
+#endif /* CONFIG_USB_MUSB_HCD */
-#ifdef CONFIG_MUSB_UDC
+#ifdef CONFIG_USB_MUSB_UDC
/* USB device configuration */
#define CONFIG_USB_DEVICE
#define CONFIG_USB_TTY
@@ -171,7 +171,7 @@
#define CONFIG_USBD_PRODUCTID 0x5678
#define CONFIG_USBD_MANUFACTURER "Texas Instruments"
#define CONFIG_USBD_PRODUCT_NAME "EVM"
-#endif /* CONFIG_MUSB_UDC */
+#endif /* CONFIG_USB_MUSB_UDC */
#endif /* CONFIG_USB_OMAP3 */
diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h
index 89ec73cc36f..8785d8fd501 100644
--- a/include/configs/omap3_igep00x0.h
+++ b/include/configs/omap3_igep00x0.h
@@ -54,7 +54,7 @@
#define CONFIG_OMAP3_GPIO_6 /* GPIO160..191 is in GPIO bank 6 */
/* USB */
-#define CONFIG_MUSB_UDC 1
+#define CONFIG_USB_MUSB_UDC 1
#define CONFIG_USB_OMAP3 1
#define CONFIG_TWL4030_USB 1
diff --git a/include/configs/omap3_mvblx.h b/include/configs/omap3_mvblx.h
index 4339b0558c2..19543a12b25 100644
--- a/include/configs/omap3_mvblx.h
+++ b/include/configs/omap3_mvblx.h
@@ -94,7 +94,7 @@
#define CONFIG_SILENT_CONSOLE 1
/* USB */
-#define CONFIG_MUSB_UDC 1
+#define CONFIG_USB_MUSB_UDC 1
#define CONFIG_USB_OMAP3 1
#define CONFIG_TWL4030_USB 1
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
index d90cc42d93f..2d1d53dc381 100644
--- a/include/configs/omap3_zoom1.h
+++ b/include/configs/omap3_zoom1.h
@@ -49,7 +49,7 @@
*/
/* USB */
-#define CONFIG_MUSB_UDC 1
+#define CONFIG_USB_MUSB_UDC 1
#define CONFIG_USB_OMAP3 1
#define CONFIG_TWL4030_USB 1
diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
index d80cf32cbe9..275e952fb26 100644
--- a/include/configs/pcm051.h
+++ b/include/configs/pcm051.h
@@ -143,24 +143,24 @@
*/
#define CONFIG_USB_MUSB_DSPS
#define CONFIG_ARCH_MISC_INIT
-#define CONFIG_MUSB_GADGET
-#define CONFIG_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_GADGET
+#define CONFIG_USB_MUSB_PIO_ONLY
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_MUSB_HOST
+#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
#define CONFIG_AM335X_USB1
#define CONFIG_AM335X_USB1_MODE MUSB_HOST
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
#endif
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
#define CONFIG_USB_ETHER
#define CONFIG_USB_ETH_RNDIS
-#endif /* CONFIG_MUSB_GADGET */
+#endif /* CONFIG_USB_MUSB_GADGET */
#define CONFIG_PHY_GIGE
#define CONFIG_PHYLIB
diff --git a/include/configs/pengwyn.h b/include/configs/pengwyn.h
index 4684ad68522..ccb5dd3c03e 100644
--- a/include/configs/pengwyn.h
+++ b/include/configs/pengwyn.h
@@ -174,26 +174,26 @@
*/
#define CONFIG_USB_MUSB_DSPS
#define CONFIG_ARCH_MISC_INIT
-#define CONFIG_MUSB_GADGET
-#define CONFIG_MUSB_PIO_ONLY
-#define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
+#define CONFIG_USB_MUSB_GADGET
+#define CONFIG_USB_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
#define CONFIG_USB_GADGET
#define CONFIG_USB_GADGET_DUALSPEED
#define CONFIG_USB_GADGET_VBUS_DRAW 2
-#define CONFIG_MUSB_HOST
+#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
#define CONFIG_AM335X_USB1
#define CONFIG_AM335X_USB1_MODE MUSB_HOST
-#if defined(CONFIG_MUSB_HOST)
+#if defined(CONFIG_USB_MUSB_HOST)
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
#endif
#if defined(CONFIG_SPL_BUILD)
/* disable host part of MUSB in SPL */
-#undef CONFIG_MUSB_HOST
+#undef CONFIG_USB_MUSB_HOST
/* Disable CPSW SPL support so we fit within the 101KiB limit. */
#undef CONFIG_SPL_ETH_SUPPORT
#endif
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index f7bef706eb6..08235c74453 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -226,27 +226,27 @@
*/
#define CONFIG_USB_MUSB_DSPS
#define CONFIG_ARCH_MISC_INIT
-#define CONFIG_MUSB_GADGET
-#define CONFIG_MUSB_PIO_ONLY
-#define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
+#define CONFIG_USB_MUSB_GADGET
+#define CONFIG_USB_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
#undef CONFIG_USB_GADGET_DUALSPEED
#define CONFIG_USB_GADGET_VBUS_DRAW 2
-#define CONFIG_MUSB_HOST
+#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
#define CONFIG_AM335X_USB1
#define CONFIG_AM335X_USB1_MODE MUSB_HOST
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
#endif
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
#define CONFIG_USB_ETHER
#define CONFIG_USB_ETH_RNDIS
#define CONFIG_USBNET_HOST_ADDR "de:ad:be:af:00:00"
-#endif /* CONFIG_MUSB_GADGET */
+#endif /* CONFIG_USB_MUSB_GADGET */
#define CONFIG_USB_GADGET
#define CONFIG_USB_GADGET_DOWNLOAD
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 5adcc39e02a..edcacd5c148 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -318,7 +318,7 @@ extern int soft_i2c_gpio_scl;
#define CONFIG_PHYLIB
#endif
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_EHCI_HCD
#define CONFIG_USB_OHCI_NEW
#define CONFIG_USB_OHCI_SUNXI
#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
@@ -326,8 +326,37 @@ extern int soft_i2c_gpio_scl;
#endif
#ifdef CONFIG_USB_MUSB_SUNXI
-#define CONFIG_MUSB_HOST
-#define CONFIG_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_PIO_ONLY
+#endif
+
+#ifdef CONFIG_USB_MUSB_GADGET
+#define CONFIG_USB_GADGET
+#define CONFIG_USB_GADGET_DUALSPEED
+#define CONFIG_USB_GADGET_VBUS_DRAW 0
+
+#define CONFIG_USB_GADGET_DOWNLOAD
+#define CONFIG_USB_FUNCTION_FASTBOOT
+#define CONFIG_USB_FUNCTION_MASS_STORAGE
+#endif
+
+#ifdef CONFIG_USB_GADGET_DOWNLOAD
+#define CONFIG_G_DNL_VENDOR_NUM 0x1f3a
+#define CONFIG_G_DNL_PRODUCT_NUM 0x1010
+#define CONFIG_G_DNL_MANUFACTURER "Allwinner Technology"
+#endif
+
+#ifdef CONFIG_USB_FUNCTION_FASTBOOT
+#define CONFIG_CMD_FASTBOOT
+#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
+#define CONFIG_FASTBOOT_BUF_SIZE 0x2000000
+
+#define CONFIG_FASTBOOT_FLASH
+#define CONFIG_FASTBOOT_FLASH_MMC_DEV 0
+#define CONFIG_EFI_PARTITION
+#endif
+
+#ifdef CONFIG_USB_FUNCTION_MASS_STORAGE
+#define CONFIG_CMD_USB_MASS_STORAGE
#endif
#ifdef CONFIG_USB_KEYBOARD
@@ -379,7 +408,7 @@ extern int soft_i2c_gpio_scl;
#define BOOT_TARGET_DEVICES_SCSI(func)
#endif
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_USB_STORAGE
#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
#else
#define BOOT_TARGET_DEVICES_USB(func)
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index b299aedb2e7..2eaa3b61b4c 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -70,7 +70,7 @@
#endif
/* USB */
-#define CONFIG_MUSB_UDC 1
+#define CONFIG_USB_MUSB_UDC 1
#define CONFIG_USB_OMAP3 1
/* USB device configuration */
diff --git a/include/configs/tseries.h b/include/configs/tseries.h
index 6a1835efe68..4265b8a4ffa 100644
--- a/include/configs/tseries.h
+++ b/include/configs/tseries.h
@@ -245,20 +245,20 @@ MMCARGS
/* USB configuration */
#define CONFIG_USB_MUSB_DSPS
#define CONFIG_ARCH_MISC_INIT
-#define CONFIG_MUSB_PIO_ONLY
-#define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
+#define CONFIG_USB_MUSB_PIO_ONLY
+#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
/* attention! not only for gadget, enables also highspeed in hostmode */
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_MUSB_HOST
+#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_HOST
#define CONFIG_AM335X_USB1
#define CONFIG_AM335X_USB1_MODE MUSB_HOST
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
-#endif /* CONFIG_MUSB_HOST */
+#endif /* CONFIG_USB_MUSB_HOST */
#if defined(CONFIG_SPI_BOOT)
/* McSPI IP block */
diff --git a/include/usb.h b/include/usb.h
index cf00ffdf532..88ebbe6e3f9 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -174,7 +174,7 @@ enum usb_init_type {
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller);
int usb_lowlevel_stop(int index);
-#if defined(CONFIG_MUSB_HOST) || defined(CONFIG_DM_USB)
+#if defined(CONFIG_USB_MUSB_HOST) || defined(CONFIG_DM_USB)
int usb_reset_root_port(struct usb_device *dev);
#else
#define usb_reset_root_port(dev)
@@ -187,7 +187,7 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int transfer_len, int interval);
-#if defined CONFIG_USB_EHCI || defined CONFIG_MUSB_HOST || defined(CONFIG_DM_USB)
+#if defined CONFIG_USB_EHCI || defined CONFIG_USB_MUSB_HOST || defined(CONFIG_DM_USB)
struct int_queue *create_int_queue(struct usb_device *dev, unsigned long pipe,
int queuesize, int elementsize, void *buffer, int interval);
int destroy_int_queue(struct usb_device *dev, struct int_queue *queue);