Skip to contentSkip to conversation

ARM: omap2: fix musb usage for n8x0

PATCH New Daniel Mack 4 participants 7 messages Jul 16, 2013 – Jul 18, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: omap2: fix musb usage for n8x0

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.

---
 arch/arm/mach-omap2/board-n8x0.c | 4 ----
 arch/arm/mach-omap2/usb-musb.c   | 5 +----
 2 files changed, 1 insertion(+), 8 deletions(-)
arch/arm/mach-omap2/board-n8x0.c +0 -4
index f6eeb87..827d150 100644
@@ -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 */
arch/arm/mach-omap2/usb-musb.c +1 -4
index 8c4de27..bc89723 100644
@@ -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,
 
Signature · 1 line
1.8.1.4
#1 lore raw

PATCH 1/1 ARM: omap2: fix musb usage for n8x0

Quoted 10 lines · Daniel Mack

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.

Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130716/dbae9985/attachment.sig>
#2 lore raw

PATCH 1/1 ARM: omap2: fix musb usage for n8x0

In reply to Daniel Mack
Quoted 10 lines · Daniel Mack

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.

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

#3 lore raw

PATCH 1/1 ARM: omap2: fix musb usage for n8x0

Hi,

Quoted 23 lines · Stefan Roese
Quoted 10 lines · Daniel Mack

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.

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
Quoted 5 lines

...

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

#4 lore raw

PATCH 1/1 ARM: omap2: fix musb usage for n8x0

Quoted 13 lines · Kishon Vijay Abraham I
Quoted 13 lines

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

...

Quoted 6 lines
Quoted 3 lines

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.

Quoted 3 lines

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

#5 lore raw

PATCH 1/1 ARM: omap2: fix musb usage for n8x0

Quoted 14 lines · Stefan Roese
Quoted 13 lines · Kishon Vijay Abraham I
Quoted 13 lines

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

...

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

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

#6 lore raw

PATCH 1/1 ARM: omap2: fix musb usage for n8x0

Quoted 17 lines · Daniel Mack
Quoted 16 lines · Stefan Roese
Quoted 15 lines · Kishon Vijay Abraham I
Quoted 15 lines

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.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

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?

Quoted 2 lines

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