All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Michael Trimarchi <michael@amarulasolutions.com>,
	Felipe Balbi <balbi@ti.com>,
	lee.jones@linaro.org, sameo@linux.intel.com,
	tomi.valkeinen@ti.com, Stefan Roese <sr@denx.de>,
	ljkenny.mailinglists@gmail.com,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] mfd: omap-usb-host: Fix USB device detection problems on OMAP4 Panda
Date: Mon, 2 Dec 2013 17:12:43 +0200	[thread overview]
Message-ID: <529CA36B.2000900@ti.com> (raw)
In-Reply-To: <529C9343.3010000@linutronix.de>

On 12/02/2013 04:03 PM, Sebastian Andrzej Siewior wrote:
> On 12/02/2013 02:44 PM, Roger Quadros wrote:
>> "Errata id: i660
>> DESCRIPTION
>> In the following configuration :
>> • USBHOST module is set to smart-idle mode
>> • PRCM asserts idle_req to the USBHOST module. (This typically happens when the system is going to
>> a low power mode : all ports have been suspended, the master part of the USBHOST module has
>> entered the standby state, and SW has cut the functional clocks.)
>> • an USBHOST interrupt occurs before the module is able to answer idle_ack, typically a remote wakeup
>> IRQ.
>> Then the USB HOST module will enter a deadlock situation where it is no more accessible nor functional.
>> The only way to recover will be to perform a software reset of the module.
>>
>> WORKAROUND
>> The best workaround consists in switching the module to force idle mode right before cutting the
>> module's FCLK.
>> • the bus has reached the suspend state.
>> • write SYSCONFIG:Idlemode= ForceIdle and read it back to ensure the write has been taken into
>> account in case of posted writes.
>> • cut the FCLK
>> • Idle_req will be asserted and idle_ack answered within one L3 clock cycle.
>> Upon resume or remote wakeup, switch back the module to smart-idle.
>> This workaround reduces the failure window to only one L3 clock cycle. The probability for an interrupt to
>> fire at this exact time is considered extremely low, and the case has never been hit on board."
>>
>> Based on this, I don't see anything wrong in Resetting the module at probe or at boot.
> 
> If u-boot configured USB into something not smart-idle and the reset
> would bring it back then the reset should remain.
> If you could tell hwmod not use smart-idle nor smart-standby and you
> make sure that the suspend code manually puts the device into suspend
> via forceidle then I think could get rid of the "do-not-reset-thingy".
> 

We are already telling hwmod to not use smart-idle or smart-standby.
So the device is always put in no-idle,no-standby during resume and force-idle,force-standby
during suspend.

I'll send a new patch to remove "do-not-reset" flag from hwmod data and then we
don't need this patch.

cheers,
-roger

WARNING: multiple messages have this Message-ID (diff)
From: Roger Quadros <rogerq@ti.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Michael Trimarchi <michael@amarulasolutions.com>,
	Felipe Balbi <balbi@ti.com>, <lee.jones@linaro.org>,
	<sameo@linux.intel.com>, <tomi.valkeinen@ti.com>,
	Stefan Roese <sr@denx.de>, <ljkenny.mailinglists@gmail.com>,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] mfd: omap-usb-host: Fix USB device detection problems on OMAP4 Panda
Date: Mon, 2 Dec 2013 17:12:43 +0200	[thread overview]
Message-ID: <529CA36B.2000900@ti.com> (raw)
In-Reply-To: <529C9343.3010000@linutronix.de>

On 12/02/2013 04:03 PM, Sebastian Andrzej Siewior wrote:
> On 12/02/2013 02:44 PM, Roger Quadros wrote:
>> "Errata id: i660
>> DESCRIPTION
>> In the following configuration :
>> • USBHOST module is set to smart-idle mode
>> • PRCM asserts idle_req to the USBHOST module. (This typically happens when the system is going to
>> a low power mode : all ports have been suspended, the master part of the USBHOST module has
>> entered the standby state, and SW has cut the functional clocks.)
>> • an USBHOST interrupt occurs before the module is able to answer idle_ack, typically a remote wakeup
>> IRQ.
>> Then the USB HOST module will enter a deadlock situation where it is no more accessible nor functional.
>> The only way to recover will be to perform a software reset of the module.
>>
>> WORKAROUND
>> The best workaround consists in switching the module to force idle mode right before cutting the
>> module's FCLK.
>> • the bus has reached the suspend state.
>> • write SYSCONFIG:Idlemode= ForceIdle and read it back to ensure the write has been taken into
>> account in case of posted writes.
>> • cut the FCLK
>> • Idle_req will be asserted and idle_ack answered within one L3 clock cycle.
>> Upon resume or remote wakeup, switch back the module to smart-idle.
>> This workaround reduces the failure window to only one L3 clock cycle. The probability for an interrupt to
>> fire at this exact time is considered extremely low, and the case has never been hit on board."
>>
>> Based on this, I don't see anything wrong in Resetting the module at probe or at boot.
> 
> If u-boot configured USB into something not smart-idle and the reset
> would bring it back then the reset should remain.
> If you could tell hwmod not use smart-idle nor smart-standby and you
> make sure that the suspend code manually puts the device into suspend
> via forceidle then I think could get rid of the "do-not-reset-thingy".
> 

We are already telling hwmod to not use smart-idle or smart-standby.
So the device is always put in no-idle,no-standby during resume and force-idle,force-standby
during suspend.

I'll send a new patch to remove "do-not-reset" flag from hwmod data and then we
don't need this patch.

cheers,
-roger

  reply	other threads:[~2013-12-02 15:12 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 13:01 [PATCH 0/1] mfd: omap-usb-host: Bug fix for 3.13 rc Roger Quadros
2013-11-29 13:01 ` Roger Quadros
2013-11-29 13:01 ` [PATCH 1/1] mfd: omap-usb-host: Fix USB device detection problems on OMAP4 Panda Roger Quadros
2013-11-29 13:01   ` Roger Quadros
2013-11-29 13:17   ` David Laight
2013-11-29 13:17     ` David Laight
2013-12-02  8:39     ` Roger Quadros
2013-12-02  8:39       ` Roger Quadros
2013-12-02 16:28       ` David Laight
2013-12-02 16:28         ` David Laight
2013-12-03  9:43         ` Roger Quadros
2013-12-03  9:43           ` Roger Quadros
     [not found]   ` <1385730118-26402-2-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2013-11-29 15:32     ` Michael Trimarchi
2013-11-29 15:32       ` Michael Trimarchi
2013-12-02  9:41       ` Roger Quadros
2013-12-02  9:41         ` Roger Quadros
2013-12-02 12:01         ` Sebastian Andrzej Siewior
2013-12-02 12:12           ` Roger Quadros
2013-12-02 12:12             ` Roger Quadros
2013-12-02 13:04             ` Sebastian Andrzej Siewior
2013-12-02 13:35               ` Roger Quadros
2013-12-02 13:35                 ` Roger Quadros
2013-12-02 13:39                 ` Sebastian Andrzej Siewior
2013-12-02 13:44                   ` Roger Quadros
2013-12-02 13:44                     ` Roger Quadros
     [not found]                     ` <529C8ED0.6060805-l0cyMroinI0@public.gmane.org>
2013-12-02 14:03                       ` Sebastian Andrzej Siewior
2013-12-02 14:03                         ` Sebastian Andrzej Siewior
2013-12-02 15:12                         ` Roger Quadros [this message]
2013-12-02 15:12                           ` Roger Quadros
2013-11-30  4:48   ` Michael Trimarchi
2013-11-30  5:10     ` Michael Trimarchi
2013-12-01  3:14       ` Michael Trimarchi
2013-12-02  9:39     ` Roger Quadros
2013-12-02  9:39       ` Roger Quadros
2013-12-02  9:51       ` Michael Trimarchi
     [not found]         ` <CAOf5uwmpiOv_GED23hWDArcOvs6DpHNEy=OJ9vnKem1pg8jSgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-02 12:05           ` Roger Quadros
2013-12-02 12:05             ` Roger Quadros
2013-12-02 15:00       ` Paul Walmsley

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=529CA36B.2000900@ti.com \
    --to=rogerq@ti.com \
    --cc=balbi@ti.com \
    --cc=bigeasy@linutronix.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=ljkenny.mailinglists@gmail.com \
    --cc=michael@amarulasolutions.com \
    --cc=sameo@linux.intel.com \
    --cc=sr@denx.de \
    --cc=tomi.valkeinen@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.