linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: Dove clock support
Date: Wed, 20 Jun 2012 07:43:14 +0200	[thread overview]
Message-ID: <20120620054314.GC28139@lunn.ch> (raw)
In-Reply-To: <20120619230610.GA3210@schnuecks.de>

On Wed, Jun 20, 2012 at 01:06:10AM +0200, Simon Baatz wrote:
> On Tue, Jun 19, 2012 at 10:55:47PM +0200, Sebastian Hesselbarh wrote:
> > On 06/19/2012 10:42 PM, Simon Baatz wrote:
> > >Should we make this symmetric and add an enable function to gate_fn?
> > 
> > I also thought about that issue and I think that as long as PHY is
> > controlled by controller specific registers it should be handled
> > by the driver and not by common clock framework.
> > 
> > This is true for SATA and PCIe and will also remove the need for
> > gate_fn - as long as it doen't break other orion-based SoCs. ...
> 
> If PHY control is part of the driver, where do we turn off PHYs that
> are on by default and that we don't use?
> 
> Don't we still need something like gate_fn or the clk gate/phy gate
> parent/child mechanism you propose?

Hi Simon

This is the interesting part to the puzzle.

Probably the correct way for the driver to turn the PHY clk on/off is
via PM runtime functions. This interface should allow a good level of
abstraction such that Dove can do what it needs, while one older
devices, which do not require anything will just have a NOP.

The problem with runtime PM functions is that you need a device
structure. However, when turning off unused clks at boot, it is unused
because we don't have a device driver using the hardware and hence
there is no device structure we can pass to the runtime PM functions.
The same applies for device where there is a kernel module for the
hardware, but it has not been loaded yet.

We probably need both, the extended gate_fn to turn off unused
hardware, and runtime pm to control used hardware.

      Andrew

  reply	other threads:[~2012-06-20  5:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18  0:07 RFC: [PATCH] ARM: Kirkwood: clk_register_gate_fn: add fn assignment Marc Kleine-Budde
2012-06-18  7:42 ` Andrew Lunn
2012-06-18  7:54   ` Marc Kleine-Budde
2012-06-18  8:04     ` Andrew Lunn
2012-06-18  8:28       ` Dove clock support (was: Re: RFC: [PATCH] ARM: Kirkwood: clk_register_gate_fn: add fn assignment) Marc Kleine-Budde
2012-06-18  8:43         ` Andrew Lunn
2012-06-18  9:42           ` Dove clock support Sebastian Hesselbarh
2012-06-18  9:54             ` Marc Kleine-Budde
2012-06-18 10:01               ` Sebastian Hesselbarh
2012-06-18 10:11                 ` Andrew Lunn
2012-06-18 20:38                   ` Sebastian Hesselbarh
2012-06-19 19:25                     ` Andrew Lunn
2012-06-19 19:31                       ` Sebastian Hesselbarh
2012-06-19 19:35                         ` Andrew Lunn
2012-06-18 11:50                 ` Marc Kleine-Budde
2012-06-18 21:41           ` Dove clock support (was: Re: RFC: [PATCH] ARM: Kirkwood: clk_register_gate_fn: add fn assignment) Simon Baatz
2012-06-18 22:10             ` Dove clock support Sebastian Hesselbarh
2012-06-19 19:32               ` Andrew Lunn
2012-06-19 20:42                 ` Simon Baatz
2012-06-19 20:43                   ` Marc Kleine-Budde
2012-06-19 20:55                   ` Sebastian Hesselbarh
2012-06-19 23:06                     ` Simon Baatz
2012-06-20  5:43                       ` Andrew Lunn [this message]
2012-06-20  5:51                   ` Andrew Lunn
2012-06-24 15:17                     ` Simon Baatz

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=20120620054314.GC28139@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).