Re: [PATCH] arm: omap3beagle: init musb default role by Kconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 16, 2011 at 10:07:26AM +0800, Bob Liu wrote:
> On Tue, Feb 15, 2011 at 7:23 PM, Felipe Balbi <balbi@xxxxxx> wrote:
> > Hi,
> >
> > On Tue, Feb 15, 2011 at 04:55:00PM +0800, Bob Liu wrote:
> >> Currently musb is initialized to OTG mode by default in musb_board_data, it's
> >> better to init it depending on Kconfig.
> >
> > what's the problem in always keeping OTG ? that board is wired for OTG
> > anyway.
> >
> 
> Yeah, but it's better if user can make their choices by themselves.
> Or mask the other choices in Kconfig if keeping OTG.
> Currently user can select HOST-only mode in Kconfig, but will receive
> compiler error.
> In my opinion, this should be consist.

compile error ?? Would you share that ? All I see is a dev_err() when
Kconfig doesn't match board-file.

> Another problem is if keeping in OTG mode, my board can't recognize usb device.
> HOST-only mode works fine, I am still debugging on it.
> But I think it's not related with current topic.

I can be related. Try this:

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 54a8bd1..bc29655 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1949,31 +1949,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
                goto fail0;
        }
 
-       switch (plat->mode) {
-       case MUSB_HOST:
-#ifdef CONFIG_USB_MUSB_HDRC_HCD
-               break;
-#else
-               goto bad_config;
-#endif
-       case MUSB_PERIPHERAL:
-#ifdef CONFIG_USB_GADGET_MUSB_HDRC
-               break;
-#else
-               goto bad_config;
-#endif
-       case MUSB_OTG:
-#ifdef CONFIG_USB_MUSB_OTG
-               break;
-#else
-bad_config:
-#endif
-       default:
-               dev_err(dev, "incompatible Kconfig role setting\n");
-               status = -EINVAL;
-               goto fail0;
-       }
-
        /* allocate */
        musb = allocate_instance(dev, plat->config, ctrl);
        if (!musb) {

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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux