Message ID | 1374000777-5626-1-git-send-email-zonque@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Jul 16, 2013 at 08:52:57PM +0200, Daniel Mack wrote: > Commit b7e2e75a8c ("usb: gadget: drop unused USB_GADGET_MUSB_HDRC") > dropped a config symbol that was unused by the musb core, but it turns > out that board support code had references to it. > > As the core now has a fall-back to host-only mode if support for > dual-role is not compiled in, so we can just pass MUSB_OTG as > mode from board files. > > Signed-off-by: Daniel Mack <zonque@gmail.com> > Reported-and-tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Acked-by: Felipe Balbi <balbi@ti.com>
On 07/16/2013 08:52 PM, Daniel Mack wrote: > Commit b7e2e75a8c ("usb: gadget: drop unused USB_GADGET_MUSB_HDRC") > dropped a config symbol that was unused by the musb core, but it turns > out that board support code had references to it. > > As the core now has a fall-back to host-only mode if support for > dual-role is not compiled in, so we can just pass MUSB_OTG as > mode from board files. > > Signed-off-by: Daniel Mack <zonque@gmail.com> > Reported-and-tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> I'm testing musb as OTG on beagleboard (old one, not Beagle-xm). And using the latest kernel.org version with this patch applied I see the following messages while booting (repeatedly): [ 4.998168] usb usb1: bus auto-suspend, wakeup 1 [ 5.003112] musb_bus_suspend 2457: trying to suspend as b_idle while active [ 5.010498] usb usb1: bus suspend fail, err -16 [ 5.015289] hub 1-0:1.0: hub_resume [ 5.019073] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000 [ 5.024963] hub 1-0:1.0: hub_suspend [ 5.028778] usb usb1: bus auto-suspend, wakeup 1 ... This is without a cable connected to the OTG port. Any ideas what might be missing here? BTW: I enabled USB support for beagle in the dts this way: +&usb_otg_hs { + interface-type = <0>; + usb-phy = <&usb2_phy>; + mode = <3>; + power = <50>; +}; Thanks, Stefan
Hi, On Thursday 18 July 2013 02:44 PM, Stefan Roese wrote: > On 07/16/2013 08:52 PM, Daniel Mack wrote: >> Commit b7e2e75a8c ("usb: gadget: drop unused USB_GADGET_MUSB_HDRC") >> dropped a config symbol that was unused by the musb core, but it turns >> out that board support code had references to it. >> >> As the core now has a fall-back to host-only mode if support for >> dual-role is not compiled in, so we can just pass MUSB_OTG as >> mode from board files. >> >> Signed-off-by: Daniel Mack <zonque@gmail.com> >> Reported-and-tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> > > I'm testing musb as OTG on beagleboard (old one, not Beagle-xm). And > using the latest kernel.org version with this patch applied I see the > following messages while booting (repeatedly): > > [ 4.998168] usb usb1: bus auto-suspend, wakeup 1 > [ 5.003112] musb_bus_suspend 2457: trying to suspend as b_idle while active > [ 5.010498] usb usb1: bus suspend fail, err -16 > [ 5.015289] hub 1-0:1.0: hub_resume > [ 5.019073] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000 > [ 5.024963] hub 1-0:1.0: hub_suspend > [ 5.028778] usb usb1: bus auto-suspend, wakeup 1 > ... > > This is without a cable connected to the OTG port. > > Any ideas what might be missing here? Even I observed these prints when I have dual mode enabled. When kept as gadget only mode I dint see these prints. However if you connect a cable, you should still see that enumeration should succeed. Not sure why those prints come though :-s Thanks Kishon
On 07/18/2013 11:18 AM, Kishon Vijay Abraham I wrote: >> I'm testing musb as OTG on beagleboard (old one, not Beagle-xm). And >> using the latest kernel.org version with this patch applied I see the >> following messages while booting (repeatedly): >> >> [ 4.998168] usb usb1: bus auto-suspend, wakeup 1 >> [ 5.003112] musb_bus_suspend 2457: trying to suspend as b_idle while active >> [ 5.010498] usb usb1: bus suspend fail, err -16 >> [ 5.015289] hub 1-0:1.0: hub_resume >> [ 5.019073] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000 >> [ 5.024963] hub 1-0:1.0: hub_suspend >> [ 5.028778] usb usb1: bus auto-suspend, wakeup 1 >> ... >> >> This is without a cable connected to the OTG port. >> >> Any ideas what might be missing here? > > Even I observed these prints when I have dual mode enabled. When kept as gadget > only mode I dint see these prints. Yes. With gadget-only I don't see those messages. Thanks for the hint. > However if you connect a cable, you should still see that enumeration should > succeed. > Not sure why those prints come though :-s No. When configured as dual-role these endless messages are still there with a cable connected to the PC USB host port (musb gadget mode). Thanks, Stefan
On 18.07.2013 11:40, Stefan Roese wrote: > On 07/18/2013 11:18 AM, Kishon Vijay Abraham I wrote: >>> I'm testing musb as OTG on beagleboard (old one, not Beagle-xm). And >>> using the latest kernel.org version with this patch applied I see the >>> following messages while booting (repeatedly): >>> >>> [ 4.998168] usb usb1: bus auto-suspend, wakeup 1 >>> [ 5.003112] musb_bus_suspend 2457: trying to suspend as b_idle while active >>> [ 5.010498] usb usb1: bus suspend fail, err -16 >>> [ 5.015289] hub 1-0:1.0: hub_resume >>> [ 5.019073] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000 >>> [ 5.024963] hub 1-0:1.0: hub_suspend >>> [ 5.028778] usb usb1: bus auto-suspend, wakeup 1 >>> ... >>> >>> This is without a cable connected to the OTG port. >>> >>> Any ideas what might be missing here? >> >> Even I observed these prints when I have dual mode enabled. When kept as gadget >> only mode I dint see these prints. > > Yes. With gadget-only I don't see those messages. Thanks for the hint. So in which mode does your port operate then? Gadget or dual-role? And I take it this does not happen with 3.10? Unfortunately, I have no board here anymore with such a port in dual-role mode ... Daniel
On 07/18/2013 02:02 PM, Daniel Mack wrote: > On 18.07.2013 11:40, Stefan Roese wrote: >> On 07/18/2013 11:18 AM, Kishon Vijay Abraham I wrote: >>>> I'm testing musb as OTG on beagleboard (old one, not Beagle-xm). And >>>> using the latest kernel.org version with this patch applied I see the >>>> following messages while booting (repeatedly): >>>> >>>> [ 4.998168] usb usb1: bus auto-suspend, wakeup 1 >>>> [ 5.003112] musb_bus_suspend 2457: trying to suspend as b_idle while active >>>> [ 5.010498] usb usb1: bus suspend fail, err -16 >>>> [ 5.015289] hub 1-0:1.0: hub_resume >>>> [ 5.019073] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000 >>>> [ 5.024963] hub 1-0:1.0: hub_suspend >>>> [ 5.028778] usb usb1: bus auto-suspend, wakeup 1 >>>> ... >>>> >>>> This is without a cable connected to the OTG port. >>>> >>>> Any ideas what might be missing here? >>> >>> Even I observed these prints when I have dual mode enabled. When kept as gadget >>> only mode I dint see these prints. >> >> Yes. With gadget-only I don't see those messages. Thanks for the hint. > > So in which mode does your port operate then? Gadget or dual-role? Its the original Beagleboard (revision C2), so I suppose its dual-role. Or am I mistaken here? > And I > take it this does not happen with 3.10? I just checked v3.10 as again. No, I'm not seeing these messages here. Thanks, Stefan
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index f6eeb87..827d150 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -122,11 +122,7 @@ static struct musb_hdrc_config musb_config = { }; static struct musb_hdrc_platform_data tusb_data = { -#ifdef CONFIG_USB_GADGET_MUSB_HDRC .mode = MUSB_OTG, -#else - .mode = MUSB_HOST, -#endif .set_power = tusb_set_power, .min_power = 25, /* x2 = 50 mA drawn from VBUS as peripheral */ .power = 100, /* Max 100 mA VBUS for host mode */ diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 8c4de27..bc89723 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c @@ -38,11 +38,8 @@ static struct musb_hdrc_config musb_config = { }; static struct musb_hdrc_platform_data musb_plat = { -#ifdef CONFIG_USB_GADGET_MUSB_HDRC .mode = MUSB_OTG, -#else - .mode = MUSB_HOST, -#endif + /* .clock is set dynamically */ .config = &musb_config,
Commit b7e2e75a8c ("usb: gadget: drop unused USB_GADGET_MUSB_HDRC") dropped a config symbol that was unused by the musb core, but it turns out that board support code had references to it. As the core now has a fall-back to host-only mode if support for dual-role is not compiled in, so we can just pass MUSB_OTG as mode from board files. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-and-tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> --- arch/arm/mach-omap2/board-n8x0.c | 4 ---- arch/arm/mach-omap2/usb-musb.c | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-)