public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-usb@vger.kernel.org, Felipe Balbi <balbi@ti.com>,
	Benoit Cousson <benoit.cousson@linaro.org>,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 3/4] usb: musb: am335x: Do not remove the session bit HOST-only mode
Date: Fri, 20 Sep 2013 10:45:06 -0500	[thread overview]
Message-ID: <20130920154506.GY26101@radagast> (raw)
In-Reply-To: <1376580112-17677-4-git-send-email-bigeasy@linutronix.de>

[-- Attachment #1: Type: text/plain, Size: 2212 bytes --]

On Thu, Aug 15, 2013 at 05:21:51PM +0200, Sebastian Andrzej Siewior wrote:
> This is what I observe:
> On the first connect, the musb starts with DEVCTL.Session set. On
> disconnect, musb_core calls try_idle. That functions removes the Session
> bit signalizing that the session is over (something that only in OTG is
> required). A new device, that is plugged, is no longer recognized.
> I've setup a timer and checked the DEVCTL register and I haven't seen a
> change in VBus and I saw the B-Device bit set. After setting the IDDIG
> into A mode and forcing the device to behave like a A device, I didn't
> see a change.
> Neither VBUS goes to 0b11 nor does a session start request comes.
> In the TI-v3.2 kernel they skip to call musb_platform_try_idle() in the
> OTG_STATE_A_WAIT_BCON state while not in OTG mode.
> Since the second port hast a standard A plug the patch changes the port
> to run in host mode only and skips the timer which would remove
> DEVCTL.Session so we can reconnect to another device later.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Acked-by: Felipe Balbi <balbi@ti.com>

> ---
>  arch/arm/boot/dts/am335x-evm.dts | 3 +++
>  drivers/usb/musb/musb_dsps.c     | 2 ++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
> index 648a67e..794b38b9 100644
> --- a/arch/arm/boot/dts/am335x-evm.dts
> +++ b/arch/arm/boot/dts/am335x-evm.dts
> @@ -192,6 +192,9 @@
>  
>  			usb@47401800 {
>  				status = "okay";
> +				musb1: usb@47401c00 {
> +					port-mode = <1>;
> +				};
>  			};
>  
>  			dma-controller@07402000  {
> diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
> index 7368577..b7b2346 100644
> --- a/drivers/usb/musb/musb_dsps.c
> +++ b/drivers/usb/musb/musb_dsps.c
> @@ -230,6 +230,8 @@ static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout)
>  		glue->last_timer = jiffies;
>  		return;
>  	}
> +	if (musb->port_mode == MUSB_PORT_MODE_HOST)
> +		return;
>  
>  	if (time_after(glue->last_timer, timeout) &&
>  				timer_pending(&glue->timer)) {
> -- 
> 1.8.4.rc2
> 

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-09-20 15:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1376580112-17677-1-git-send-email-bigeasy@linutronix.de>
     [not found] ` <1376580112-17677-2-git-send-email-bigeasy@linutronix.de>
2013-09-20 15:44   ` [PATCH 1/4] usb: usb: dsps: update code according to the binding document Felipe Balbi
     [not found] ` <1376580112-17677-3-git-send-email-bigeasy@linutronix.de>
2013-09-20 15:44   ` [PATCH 2/4] usb: musb: am335x: add second port to beagle bone Felipe Balbi
     [not found] ` <1376580112-17677-4-git-send-email-bigeasy@linutronix.de>
2013-09-20 15:45   ` Felipe Balbi [this message]
2013-09-23 14:47     ` [PATCH 3/4] usb: musb: am335x: Do not remove the session bit HOST-only mode Sebastian Andrzej Siewior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130920154506.GY26101@radagast \
    --to=balbi@ti.com \
    --cc=benoit.cousson@linaro.org \
    --cc=bigeasy@linutronix.de \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox