Permalink
Browse files

ARM: OMAP: automatically set musb mode in platform data based on CONF…

…IG options
  • Loading branch information...
1 parent 4404c7b commit 135cd245dc006bc85fd0d4c687a3742d492fe3b9 @sakoman sakoman committed Feb 24, 2010
Showing with 12 additions and 0 deletions.
  1. +6 −0 arch/arm/mach-omap2/board-omap3beagle.c
  2. +6 −0 arch/arm/mach-omap2/board-overo.c
@@ -605,7 +605,13 @@ static struct omap_board_mux board_mux[] __initdata = {
static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
+#if defined(CONFIG_USB_MUSB_OTG)
.mode = MUSB_OTG,
+#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
+ .mode = MUSB_PERIPHERAL,
+#else
+ .mode = MUSB_HOST,
+#endif
.power = 100,
};
@@ -623,7 +623,13 @@ static struct omap_board_mux board_mux[] __initdata = {
static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
+#if defined(CONFIG_USB_MUSB_OTG)
.mode = MUSB_OTG,
+#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
+ .mode = MUSB_PERIPHERAL,
+#else
+ .mode = MUSB_HOST,
+#endif
.power = 100,
};

0 comments on commit 135cd24

Please sign in to comment.