[U-Boot] [PATCH 03/11] am437x: board: do not register usb devices when CONFIG_DM_USB is defined
Vignesh R
vigneshr at ti.com
Tue May 23 11:55:38 UTC 2017
From: Mugunthan V N <mugunthanvnm at ti.com>
Do not register usb devices when CONFIG_DM_USB is define.
Signed-off-by: Mugunthan V N <mugunthanvnm at ti.com>
Signed-off-by: Vignesh R <vigneshr at ti.com>
---
board/ti/am43xx/board.c | 10 ++--------
configs/am43xx_evm_usbhost_boot_defconfig | 1 +
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index 3797ac2adabb..f6b36949f756 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -624,7 +624,7 @@ int board_late_init(void)
}
#endif
-#ifdef CONFIG_USB_DWC3
+#if defined(CONFIG_USB_DWC3) && !defined(CONFIG_DM_USB)
static struct dwc3_device usb_otg_ss1 = {
.maximum_speed = USB_SPEED_HIGH,
.base = USB_OTG_SS1_BASE,
@@ -660,13 +660,10 @@ static struct ti_usb_phy_device usb_phy2_device = {
.usb2_phy_power = (void *)USB2_PHY2_POWER,
.index = 1,
};
-#endif /* CONFIG_USB_DWC3 */
-#if defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP)
int omap_xhci_board_usb_init(int index, enum usb_init_type init)
{
enable_usb_clocks(index);
-#ifdef CONFIG_USB_DWC3
switch (index) {
case 0:
if (init == USB_INIT_DEVICE) {
@@ -689,14 +686,12 @@ int omap_xhci_board_usb_init(int index, enum usb_init_type init)
default:
printf("Invalid Controller Index\n");
}
-#endif
return 0;
}
int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
{
-#ifdef CONFIG_USB_DWC3
switch (index) {
case 0:
case 1:
@@ -709,12 +704,11 @@ int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
default:
printf("Invalid Controller Index\n");
}
-#endif
disable_usb_clocks(index);
return 0;
}
-#endif /* defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP) */
+#endif /* defined(CONFIG_USB_DWC3) && !defined(CONFIG_DM_USB) */
#ifdef CONFIG_DRIVER_TI_CPSW
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
index a98a97fa427c..89d2ba8d8315 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -69,6 +69,7 @@ CONFIG_USB_DWC3_PHY_OMAP=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_SPL_USB_GADGET_SUPPORT=y
CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
CONFIG_G_DNL_VENDOR_NUM=0x0403
CONFIG_G_DNL_PRODUCT_NUM=0xbd00
--
2.13.0
More information about the U-Boot
mailing list