Browse Source

am33xx: board: do not register usb devices when CONFIG_DM_USB is defined

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>
Mugunthan V N 8 years ago
parent
commit
195702217d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      arch/arm/mach-omap2/am33xx/board.c

+ 4 - 1
arch/arm/mach-omap2/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 */
 /* AM33XX has two MUSB controllers which can be host or gadget */
 #if (defined(CONFIG_USB_MUSB_GADGET) || defined(CONFIG_USB_MUSB_HOST)) && \
 #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;
 static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
 
 
 /* USB 2.0 PHY Control */
 /* USB 2.0 PHY Control */
@@ -187,6 +188,7 @@ static struct musb_hdrc_platform_data otg1_plat = {
 
 
 int arch_misc_init(void)
 int arch_misc_init(void)
 {
 {
+#ifndef CONFIG_DM_USB
 #ifdef CONFIG_AM335X_USB0
 #ifdef CONFIG_AM335X_USB0
 	musb_register(&otg0_plat, &otg0_board_data,
 	musb_register(&otg0_plat, &otg0_board_data,
 		(void *)USB0_OTG_BASE);
 		(void *)USB0_OTG_BASE);
@@ -194,6 +196,7 @@ int arch_misc_init(void)
 #ifdef CONFIG_AM335X_USB1
 #ifdef CONFIG_AM335X_USB1
 	musb_register(&otg1_plat, &otg1_board_data,
 	musb_register(&otg1_plat, &otg1_board_data,
 		(void *)USB1_OTG_BASE);
 		(void *)USB1_OTG_BASE);
+#endif
 #endif
 #endif
 	return 0;
 	return 0;
 }
 }