ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Peter De Schrijver <pdeschrijver@nvidia.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Magnus Damm <magnus.damm@gmail.com>,
	"ksummit-discuss@lists.linuxfoundation.org"
	<ksummit-discuss@lists.linuxfoundation.org>
Subject: Re: [Ksummit-discuss] [TECH TOPIC] PM dependencies
Date: Mon, 26 May 2014 17:30:35 +0300	[thread overview]
Message-ID: <20140526143035.GF5961@tbergstrom-lnx.Nvidia.com> (raw)
In-Reply-To: <CACRpkdabUuhebq=Pi3v277TVYRfN1KdqYcytZqFft2qYH5eJCg@mail.gmail.com>

On Fri, May 23, 2014 at 10:32:24AM +0200, Linus Walleij wrote:
> On Fri, May 23, 2014 at 2:39 AM, Kevin Hilman <khilman@linaro.org> wrote:
> 
> > Of course, for many "simple" platforms, runtime PM get/put just ends up
> > doing a clk_enable/disable, but on the platforms where runtime PM is
> > slightly more... um, "interesting"... just doing a clk enable/disable
> > won't do what you hope.
> 
> And drivers/base/power/clock_ops.c as invoked from
> drivers/sh/pm_runtime.c does exactly that simple thing using
> PM domains. Quite elegantly too, I'd say.
> 
> But now I get curious - can we define the "interesting PM" more
> generally, like get the details out? And I mean like for a few different
> platforms, I know OMAP with its hwmod is one such thing, but how
> much interesting stuff do we have out there that we know we must
> be able to handle?
> 
> Cc:ing in Peter De Schrijver who might have some interesting PM
> to tell us about :-)
> 

On Tegra to powergate a domain you have to:

1) wait until all outstanding memory accesses by DMA clients in the domain have finished and assert the reset of the DMA clients. This is because DMA to/from memory goes via a seperate path compared to control MMIO (register accesses).
2) assert reset of the modules in the domain
3) disable the clocks of the modules in the domain
4) enable clamps
5) turn off power

to powerungate a domain you basically have to do:

1) enable power
2) enable all clocks of the modules in the domain
3) unclamp the domain
4) deassert reset (this is why the clocks have to be on, otherwise the reset signals wouldn't propagate)
6) deassert reset of the DMA clients
5) disable all module clocks again

My guess is that OMAP does most of this sequencing in hw (probably done by the PRCM). Also I guess that OMAP doesn't need the special handling of the DMA clients as both control MMIO and DMA goes via the same interconnect.

Cheers,

Peter.

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

  parent reply	other threads:[~2014-05-26 14:51 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12 17:43 Laurent Pinchart
2014-05-12 17:51 ` Shuah Khan
2014-05-18 15:42   ` Mauro Carvalho Chehab
2014-05-12 18:09 ` Tomasz Figa
2014-05-12 20:14 ` Mark Brown
2014-05-12 20:27   ` Laurent Pinchart
2014-05-12 20:31     ` Mark Brown
2014-05-12 21:16       ` Tomasz Figa
2014-05-12 22:07         ` Mark Brown
2014-05-13  7:43           ` Daniel Vetter
2014-05-13 10:31             ` Laurent Pinchart
2014-05-13 14:26               ` Shuah Khan
2014-05-15 23:43                 ` Laurent Pinchart
2014-05-19  1:00                   ` Shuah Khan
2014-05-19  7:30                     ` Geert Uytterhoeven
2014-05-13 22:27           ` Rafael J. Wysocki
2014-05-13 22:34             ` Rafael J. Wysocki
2014-05-14 12:59               ` Rafael J. Wysocki
2014-05-15 23:34               ` Laurent Pinchart
2014-05-20 16:57                 ` Kevin Hilman
2014-05-20 18:51                   ` Mark Brown
2014-05-21  9:26                   ` Ulf Hansson
2014-05-21 11:16                   ` Geert Uytterhoeven
2014-05-22  0:19                   ` Rafael J. Wysocki
2014-05-22 10:14                     ` Mark Brown
2014-05-23 23:15                       ` Rafael J. Wysocki
2014-05-24 10:53                         ` Mark Brown
2014-05-25 12:56                           ` Rafael J. Wysocki
2014-05-22 17:35                     ` Kevin Hilman
2014-05-23 23:26                       ` Rafael J. Wysocki
2014-05-23  0:18                   ` Laurent Pinchart
2014-05-23  0:39                     ` Kevin Hilman
2014-05-23  8:32                       ` Linus Walleij
2014-05-23 15:26                         ` Kevin Hilman
2014-05-24  0:13                           ` Rafael J. Wysocki
2014-05-24  0:08                         ` Rafael J. Wysocki
2014-05-26 14:30                         ` Peter De Schrijver [this message]
2014-05-23  8:25                     ` Linus Walleij
2014-05-23  9:10                       ` Ulf Hansson
2014-05-24  0:00                       ` Rafael J. Wysocki
2014-05-15 22:45             ` Laurent Pinchart
2014-05-14 21:08           ` Kevin Hilman
2014-05-14 12:11       ` Rafael J. Wysocki
2014-05-14 11:57         ` Mark Brown
2014-05-14 12:32           ` Rafael J. Wysocki
2014-05-14 15:14             ` Mark Brown
2014-05-14 15:26           ` Laurent Pinchart
2014-05-14 15:40             ` Mark Brown

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=20140526143035.GF5961@tbergstrom-lnx.Nvidia.com \
    --to=pdeschrijver@nvidia.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=magnus.damm@gmail.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