From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vignesh R Date: Tue, 13 Jun 2017 17:39:59 +0530 Subject: [U-Boot] [PATCH v2 03/13] am437x: board: do not register usb devices when CONFIG_DM_USB is defined In-Reply-To: <20170613121009.25860-1-vigneshr@ti.com> References: <20170613121009.25860-1-vigneshr@ti.com> Message-ID: <20170613121009.25860-4-vigneshr@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Mugunthan V N Do not register usb devices when CONFIG_DM_USB is define. Signed-off-by: Mugunthan V N Signed-off-by: Vignesh R Reviewed-by: Simon Glass --- 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 0bbe366a362c..a2aefc08530a 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -632,7 +632,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, @@ -668,13 +668,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) { @@ -697,14 +694,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: @@ -717,12 +712,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 870ed0fb24ab..e810b86c671c 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