* [PATCH] musb_hdrc: Fix musb_hnp_stop() to return to device mode
@ 2007-08-21 12:41 Tony Lindgren
2007-08-21 13:54 ` How do we update mach-types on OMAPGIT? Syed Mohammed, Khasim
2007-08-22 6:22 ` [PATCH] musb_hdrc: Fix musb_hnp_stop() to return to device mode Tony Lindgren
0 siblings, 2 replies; 6+ messages in thread
From: Tony Lindgren @ 2007-08-21 12:41 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 57 bytes --]
This one fixes some USB HS OPT test unreliability.
Tony
[-- Attachment #2: musb-fix-hnp.patch --]
[-- Type: text/x-diff, Size: 1706 bytes --]
From: Tony Lindgren <tony@atomide.com>
Subject: musb_hdrc: Fix musb_hnp_stop() to return to device mode
Without this patch HNP does not return to device mode, which can
confuse OPT tests. Also change to b_host if SUSPEND and CONNECT
simultaneously as b_peripheral, and fix a comment.
Signed-off-by: Tony Lindgren <tony@atomide.com>
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -331,6 +331,7 @@ void musb_hnp_stop(struct musb *musb)
DBG(1, "HNP: Disabling HR\n");
hcd->self.is_b_host = 0;
musb->xceiv.state = OTG_STATE_B_PERIPHERAL;
+ MUSB_DEV_MODE(musb);
reg = musb_readb(mbase, MUSB_POWER);
reg |= MUSB_POWER_SUSPENDM;
musb_writeb(mbase, MUSB_POWER, reg);
@@ -579,6 +580,15 @@ static irqreturn_t musb_stage0_irq(struct musb * musb, u8 int_usb,
/* indicate new connection to OTG machine */
switch (musb->xceiv.state) {
+ case OTG_STATE_B_PERIPHERAL:
+ if (int_usb & MUSB_INTR_SUSPEND) {
+ DBG(1, "HNP: SUSPEND and CONNECT, now b_host\n");
+ musb->xceiv.state = OTG_STATE_B_HOST;
+ hcd->self.is_b_host = 1;
+ int_usb &= ~MUSB_INTR_SUSPEND;
+ } else
+ DBG(1, "CONNECT as b_peripheral???\n");
+ break;
case OTG_STATE_B_WAIT_ACON:
DBG(1, "HNP: Waiting to switch to b_host state\n");
musb->xceiv.state = OTG_STATE_B_HOST;
@@ -707,11 +717,11 @@ static irqreturn_t musb_stage2_irq(struct musb * musb, u8 int_usb,
case OTG_STATE_B_HOST:
musb_hnp_stop(musb);
break;
- /* FALLTHROUGH */
case OTG_STATE_A_PERIPHERAL:
musb_root_disconnect(musb);
/* FALLTHROUGH */
case OTG_STATE_B_WAIT_ACON:
+ /* FALLTHROUGH */
#endif /* OTG */
#ifdef CONFIG_USB_GADGET_MUSB_HDRC
case OTG_STATE_B_PERIPHERAL:
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* How do we update mach-types on OMAPGIT?
2007-08-21 12:41 [PATCH] musb_hdrc: Fix musb_hnp_stop() to return to device mode Tony Lindgren
@ 2007-08-21 13:54 ` Syed Mohammed, Khasim
2007-08-21 13:56 ` Tony Lindgren
2007-08-22 6:22 ` [PATCH] musb_hdrc: Fix musb_hnp_stop() to return to device mode Tony Lindgren
1 sibling, 1 reply; 6+ messages in thread
From: Syed Mohammed, Khasim @ 2007-08-21 13:54 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap-open-source
Hi Tony,
To be in sync with 2430 naming convention we requested RMK to rename the Machine ID for 3430
Old one:
omap_sdp3430 MACH_OMAP_SDP3430 OMAP_SDP3430 1138
New one:
omap_3430sdp MACH_OMAP_3430SDP OMAP_3430SDP 1138
Do I need to send a Patch for arch/arm/tools/mach-types?
Regards,
Khasim
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How do we update mach-types on OMAPGIT?
2007-08-21 13:54 ` How do we update mach-types on OMAPGIT? Syed Mohammed, Khasim
@ 2007-08-21 13:56 ` Tony Lindgren
2007-08-21 14:04 ` Syed Mohammed, Khasim
0 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2007-08-21 13:56 UTC (permalink / raw)
To: Syed Mohammed, Khasim; +Cc: linux-omap-open-source
* Syed Mohammed, Khasim <x0khasim@ti.com> [070821 06:54]:
> Hi Tony,
>
> To be in sync with 2430 naming convention we requested RMK to rename the Machine ID for 3430
>
> Old one:
> omap_sdp3430 MACH_OMAP_SDP3430 OMAP_SDP3430 1138
>
> New one:
> omap_3430sdp MACH_OMAP_3430SDP OMAP_3430SDP 1138
>
> Do I need to send a Patch for arch/arm/tools/mach-types?
I believe you just need to send email to RMK on that.
Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: How do we update mach-types on OMAPGIT?
2007-08-21 13:56 ` Tony Lindgren
@ 2007-08-21 14:04 ` Syed Mohammed, Khasim
2007-08-22 6:21 ` Tony Lindgren
0 siblings, 1 reply; 6+ messages in thread
From: Syed Mohammed, Khasim @ 2007-08-21 14:04 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap-open-source
Tony,
>> To be in sync with 2430 naming convention we requested RMK to rename the
>Machine ID for 3430
>>
>> Old one:
>> omap_sdp3430 MACH_OMAP_SDP3430 OMAP_SDP3430 1138
>>
>> New one:
>> omap_3430sdp MACH_OMAP_3430SDP OMAP_3430SDP 1138
>>
>> Do I need to send a Patch for arch/arm/tools/mach-types?
>
>I believe you just need to send email to RMK on that.
>
RMK has already re-named this today. I would like to know how do we update this on OMAP GIT?
Regards,
Khasim
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How do we update mach-types on OMAPGIT?
2007-08-21 14:04 ` Syed Mohammed, Khasim
@ 2007-08-22 6:21 ` Tony Lindgren
0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2007-08-22 6:21 UTC (permalink / raw)
To: Syed Mohammed, Khasim; +Cc: linux-omap-open-source
* Syed Mohammed, Khasim <x0khasim@ti.com> [070821 07:05]:
>
> Tony,
>
> >> To be in sync with 2430 naming convention we requested RMK to rename the
> >Machine ID for 3430
> >>
> >> Old one:
> >> omap_sdp3430 MACH_OMAP_SDP3430 OMAP_SDP3430 1138
> >>
> >> New one:
> >> omap_3430sdp MACH_OMAP_3430SDP OMAP_3430SDP 1138
> >>
> >> Do I need to send a Patch for arch/arm/tools/mach-types?
> >
> >I believe you just need to send email to RMK on that.
> >
> RMK has already re-named this today. I would like to know how do we update this on OMAP GIT?
Patch?
Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] musb_hdrc: Fix musb_hnp_stop() to return to device mode
2007-08-21 12:41 [PATCH] musb_hdrc: Fix musb_hnp_stop() to return to device mode Tony Lindgren
2007-08-21 13:54 ` How do we update mach-types on OMAPGIT? Syed Mohammed, Khasim
@ 2007-08-22 6:22 ` Tony Lindgren
1 sibling, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2007-08-22 6:22 UTC (permalink / raw)
To: linux-omap-open-source
* Tony Lindgren <tony@atomide.com> [070821 05:42]:
> This one fixes some USB HS OPT test unreliability.
>
> Tony
> From: Tony Lindgren <tony@atomide.com>
> Subject: musb_hdrc: Fix musb_hnp_stop() to return to device mode
>
> Without this patch HNP does not return to device mode, which can
> confuse OPT tests. Also change to b_host if SUSPEND and CONNECT
> simultaneously as b_peripheral, and fix a comment.
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
>
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -331,6 +331,7 @@ void musb_hnp_stop(struct musb *musb)
> DBG(1, "HNP: Disabling HR\n");
> hcd->self.is_b_host = 0;
> musb->xceiv.state = OTG_STATE_B_PERIPHERAL;
> + MUSB_DEV_MODE(musb);
> reg = musb_readb(mbase, MUSB_POWER);
> reg |= MUSB_POWER_SUSPENDM;
> musb_writeb(mbase, MUSB_POWER, reg);
> @@ -579,6 +580,15 @@ static irqreturn_t musb_stage0_irq(struct musb * musb, u8 int_usb,
>
> /* indicate new connection to OTG machine */
> switch (musb->xceiv.state) {
> + case OTG_STATE_B_PERIPHERAL:
> + if (int_usb & MUSB_INTR_SUSPEND) {
> + DBG(1, "HNP: SUSPEND and CONNECT, now b_host\n");
> + musb->xceiv.state = OTG_STATE_B_HOST;
> + hcd->self.is_b_host = 1;
> + int_usb &= ~MUSB_INTR_SUSPEND;
> + } else
> + DBG(1, "CONNECT as b_peripheral???\n");
> + break;
> case OTG_STATE_B_WAIT_ACON:
> DBG(1, "HNP: Waiting to switch to b_host state\n");
> musb->xceiv.state = OTG_STATE_B_HOST;
> @@ -707,11 +717,11 @@ static irqreturn_t musb_stage2_irq(struct musb * musb, u8 int_usb,
> case OTG_STATE_B_HOST:
> musb_hnp_stop(musb);
> break;
> - /* FALLTHROUGH */
> case OTG_STATE_A_PERIPHERAL:
> musb_root_disconnect(musb);
> /* FALLTHROUGH */
> case OTG_STATE_B_WAIT_ACON:
> + /* FALLTHROUGH */
> #endif /* OTG */
> #ifdef CONFIG_USB_GADGET_MUSB_HDRC
> case OTG_STATE_B_PERIPHERAL:
Pushing this today.
Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-08-22 6:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-21 12:41 [PATCH] musb_hdrc: Fix musb_hnp_stop() to return to device mode Tony Lindgren
2007-08-21 13:54 ` How do we update mach-types on OMAPGIT? Syed Mohammed, Khasim
2007-08-21 13:56 ` Tony Lindgren
2007-08-21 14:04 ` Syed Mohammed, Khasim
2007-08-22 6:21 ` Tony Lindgren
2007-08-22 6:22 ` [PATCH] musb_hdrc: Fix musb_hnp_stop() to return to device mode Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox