On Fri, May 21, 2010 at 07:15:37AM +0200, ext Gupta, Ajay Kumar wrote:
Hi,
> +#ifdef CONFIG_USB_MUSB_OTG
> +    .mode
>         = MUSB_OTG,
> +#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
> +    .mode
>         = MUSB_HOST,
> +#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
>      .mode
>         = MUSB_PERIPHERAL,
> +#endif

>         = MUSB_PERIPHERAL,
> +#endif

By the way ... the #ifdeffery should indeed vanish from all board
configs except the Davinci DM6446 EVM.

If we are claiming to support:
        A. Same kernel would work on multiple boards
        B. Single kernel for one single board

Then I think these #ifdefferys are required in all the board files.

Let's consider the OMAP3EVM which supports all the three modes and

you don't support "all three modes" you support OTG. If you want to build for peripheral only, that's your choice, but the board is wired so that it has OTG support.

If these #ifdefferys are not present and .mode is set to OTG.
Then if I choose to compile the Kernel only for peripheral mode
(Case-B above) then I would get below error from musb_core.c.

"incompatible Kconfig role setting"

there's a patch making that a warning instead of an #error if I'm not wrong.

--
balbi

DefectiveByDesign.org
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to