diff mbox

[U-Boot,v3,02/10] am33xx: board: do not register usb devices when CONFIG_DM_USB is defined

Message ID 20161117090815.17226-3-mugunthanvnm@ti.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Mugunthan V N Nov. 17, 2016, 9:08 a.m. UTC
Do not register usb devices when CONFIG_DM_USB is define.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/cpu/armv7/am33xx/board.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Simon Glass Dec. 3, 2016, 6:40 p.m. UTC | #1
On 17 November 2016 at 02:08, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> Do not register usb devices when CONFIG_DM_USB is define.
>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> ---
>  arch/arm/cpu/armv7/am33xx/board.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Applied to u-boot-dm, thanks!
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/cpu/armv7/am33xx/board.c
index 68badedd14..fd4235e526 100644
--- a/arch/arm/cpu/armv7/am33xx/board.c
+++ b/arch/arm/cpu/armv7/am33xx/board.c
@@ -120,7 +120,8 @@  int cpu_mmc_init(bd_t *bis)
 
 /* AM33XX has two MUSB controllers which can be host or gadget */
 #if (defined(CONFIG_USB_MUSB_GADGET) || defined(CONFIG_USB_MUSB_HOST)) && \
-	(defined(CONFIG_AM335X_USB0) || defined(CONFIG_AM335X_USB1))
+	(defined(CONFIG_AM335X_USB0) || defined(CONFIG_AM335X_USB1)) && \
+	(!defined(CONFIG_DM_USB))
 static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
 
 /* USB 2.0 PHY Control */
@@ -187,6 +188,7 @@  static struct musb_hdrc_platform_data otg1_plat = {
 
 int arch_misc_init(void)
 {
+#ifndef CONFIG_DM_USB
 #ifdef CONFIG_AM335X_USB0
 	musb_register(&otg0_plat, &otg0_board_data,
 		(void *)USB0_OTG_BASE);
@@ -195,6 +197,7 @@  int arch_misc_init(void)
 	musb_register(&otg1_plat, &otg1_board_data,
 		(void *)USB1_OTG_BASE);
 #endif
+#endif
 	return 0;
 }