Skip to contentSkip to conversation

ARM: omap3logic: Encapsulate the MUSB functions in check for DM

PATCH In review Adam Ford 2 participants 2 messages Oct 7, 2018 – Oct 22, 2018

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 ARM: omap3logic: Encapsulate the MUSB functions in check for DM

With the DM_USB working for USB host features, encapsulate the USB gadget initialization in a precomiler check. If DM is enabled, we don't need to manually initialize the MUSB driver.

board/logicpd/omap3som/omap3logic.c +4 -2
index 0b827355a8..2f63e76a53 100644
@@ -148,6 +148,7 @@ void spl_board_prepare_for_linux(void)
 }
 #endif
 
+#if !CONFIG_IS_ENABLED(DM_USB)
 #ifdef CONFIG_USB_MUSB_OMAP2PLUS
 static struct musb_hdrc_config musb_config = {
 	.multipoint     = 1,
@@ -201,7 +202,7 @@ int ehci_hcd_stop(int index)
 }
 
 #endif /* CONFIG_USB_EHCI_HCD */
-
+#endif /* !DM_USB*/
 /*
  * Routine: misc_init_r
  * Description: Configure board specific parts
@@ -211,10 +212,11 @@ int misc_init_r(void)
 	twl4030_power_init();
 	omap_die_id_display();
 
+#if !CONFIG_IS_ENABLED(DM_USB)
 #ifdef CONFIG_USB_MUSB_OMAP2PLUS
 	musb_register(&musb_plat, &musb_board_data, (void *)MUSB_BASE);
 #endif
-
+#endif
 	return 0;
 }
 
Signature · 1 line
2.17.1
#1 lore raw

board/logicpd/omap3som/omap3logic.c

Quoted 8 lines · Adam Ford

With the DM_USB working for USB host features, encapsulate the USB gadget initialization in a precomiler check. If DM is enabled, we don't need to manually initialize the MUSB driver.

board/logicpd/omap3som/omap3logic.c +0 -0
index 0b827355a8..2f63e76a53 100644

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181022/8d545f23/attachment.sig>