public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>,
	linux-omap@vger.kernel.org, khilman@ti.com, b-cousson@ti.com,
	Nishanth Menon <nm@ti.com>,
	s-sintes@ti.com, Moiz Sonasath <m-sonasath@ti.com>
Subject: Re: [PATCH 7/7] 4460sdp/blaze/panda: hwmod: Prevent gpio1 reset during hwmod init
Date: Mon, 4 Jul 2011 01:53:35 -0700	[thread overview]
Message-ID: <20110704085335.GP23145@atomide.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1107022103430.12499@utopia.booyaka.com>

* Paul Walmsley <paul@pwsan.com> [110702 21:09]:
> Hi Tony
> 
> On Thu, 30 Jun 2011, Tony Lindgren wrote:
> 
> > NAK for this patch. We don't want any of this in init_early.
> > 
> > The problem is with hwmod core code that wrongly assumes it
> > can just reset all devices.
> 
> I don't think the hwmod core code has any way of knowing which devices 
> shouldn't be reset unless the board file specifically tells it.  Even if 
> the reset happens right before the hwmod enable (as called by the device 
> driver), the 4460 boards would still crash when the GPIO driver starts.
> 
> What you suggested below should allow those omap_hwmod_no_setup_reset() 
> calls to live in init_machine, rather than init_early.  Hopefully that is 
> acceptable?  So I did a test implementation of your idea, and learned some 
> good news and bad news.

Yes later on that should be fine, but preferrably not until late_initcall
so we have decent debug output even without DEBUG_LL being enabled.
 
> The good news is that it seems to work for the PM runtime-converted 
> drivers.  omap_hwmod_no_setup_reset() calls can go into init_machine code.  
> We should also be able to get rid of the postsetup code in 
> mach-omap2/io.c.
> 
> The bad news is that the unused IP block reset code will reset IP blocks 
> used by drivers that haven't been converted to use runtime PM.  The hwmod 
> core code doesn't know that those IP blocks are in use, since 
> omap_hwmod_enable() is never called for them.  The unused IP block reset 
> code will then reset those blocks after the drivers have already probed, 
> and the drivers are not expecting this :-)

I guess we should keep it disabled for now :)
 
> GPTIMER and HSMMC drivers are the obvious problems in terms of getting a 
> successful boot, but DSS is another one that may cause some problems here.  
> There are HSMMC and DSS driver PM runtime conversion patches posted, 
> hopefully they will go into mainline soon, but there are probably some 
> other important drivers yet to be converted or yet to be pushed.
> 
> Here are some options that come to mind:
> 
> 1. Wait until the driver runtime PM conversion is finished before doing 
>    anything.  In the meantime, boards with IP blocks that can't be reset 
>    - N810, TI 4460 boards - will have problems.
> 
> 2. Merge the lazy/unused hwmod reset code, but prevent IP blocks 
>    controlled by non-runtime PM drivers from being reset.  We'd have to
>    maintain a list of these somewhere, perhaps in some common code called 
>    by board file init_machine code.  Then we'd need to redact that list as 
>    new driver runtime PM conversions complete.
> 
> 3. Merge the lazy/unused hwmod reset code, but disable the unused hwmod 
>    reset code until the driver runtime PM conversion is finished.  This
>    could cause problems with driverless devices that are left configured
>    by bootloaders or ROM code, and that problem would reoccur for each new
>    OMAP chip.
> 
> Do you have a preference as to which approach to take?

I think #3 above is the safest option. How about make it only happen with
hwmod_reset=1 cmdline with 0 being the default value?

Regards,

Tony 

  reply	other threads:[~2011-07-04  8:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01  2:07 [PATCH 0/7] OMAP4: Add 4460 base support Rajendra Nayak
2011-07-01  2:07 ` [PATCH 1/7] OMAP: ID: introduce chip detection for OMAP4460 Rajendra Nayak
2011-07-01  2:07   ` [PATCH 2/7] OMAP4: ID: add omap_has_feature for max freq supported Rajendra Nayak
2011-07-01  2:07     ` [PATCH 3/7] OMAP4: PRCM: OMAP4460 specific PRM and CM register bitshifts Rajendra Nayak
2011-07-01  2:07       ` [PATCH 4/7] OMAP4: clocks: Update the clock tree with 4460 clock nodes Rajendra Nayak
2011-07-01  2:07         ` [PATCH 5/7] OMAP4: powerdomain: Reuse on 4460 using CHIP_IS_44XX Rajendra Nayak
2011-07-01  2:08           ` [PATCH 6/7] OMAP4: clockdomain: " Rajendra Nayak
2011-07-01  2:08             ` [PATCH 7/7] 4460sdp/blaze/panda: hwmod: Prevent gpio1 reset during hwmod init Rajendra Nayak
2011-07-01  6:32               ` Tony Lindgren
2011-07-03  4:14                 ` Paul Walmsley
2011-07-04  8:53                   ` Tony Lindgren [this message]
2011-07-05  7:40                     ` Paul Walmsley
2011-07-05 10:45                       ` Tony Lindgren
2011-07-05 21:47                         ` Paul Walmsley
2011-07-06  6:47                           ` Tony Lindgren
2011-07-01  2:41     ` [PATCH 2/7] OMAP4: ID: add omap_has_feature for max freq supported Todd Poynor
2011-07-01  4:48       ` Aneesh V
2011-07-01  6:25   ` [PATCH 1/7] OMAP: ID: introduce chip detection for OMAP4460 Tony Lindgren
2011-07-01 10:15     ` Aneesh V
2011-07-01 16:31 ` [PATCH 0/7] OMAP4: Add 4460 base support Kevin Hilman
2011-07-01 16:36 ` Kevin Hilman
2011-07-01 16:40   ` Kevin Hilman
2011-07-01 17:00     ` Rajendra Nayak

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=20110704085335.GP23145@atomide.com \
    --to=tony@atomide.com \
    --cc=b-cousson@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=m-sonasath@ti.com \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.com \
    --cc=s-sintes@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox