linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Tero Kristo <t-kristo@ti.com>,
	linux-omap@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv4 00/15] clk: ti: add support for hwmod clocks
Date: Mon, 12 Dec 2016 17:31:34 -0800	[thread overview]
Message-ID: <20161213013133.GR4920@atomide.com> (raw)
In-Reply-To: <20161213004914.GM5423@codeaurora.org>

* Stephen Boyd <sboyd@codeaurora.org> [161212 16:49]:
> On 12/12, Michael Turquette wrote:
> > Quoting Tero Kristo (2016-12-02 00:15:53)
> > > On 29/10/16 02:37, Stephen Boyd wrote:
> > > > On 10/28, Tero Kristo wrote:
> > > >> Eventually that should happen. However, we have plenty of legacy
> > > >> code still in place which depend on clk_get functionality within
> > > >> kernel. The major contributing factor is the hwmod codebase, for
> > > >> which we have plans to:
> > > >>
> > > >> - get this clock driver merged
> > > >> - implement a new interconnect driver for OMAP family SoCs
> > > >> - interconnect driver will use DT handles for fetching clocks,
> > > >> rather than clock aliases
> > > >> - reset handling will be implemented as part of the interconnect
> > > >> driver somehow (no prototype / clear plans for that as of yet)
> > > >> - all the hwmod stuff can be dropped
> > > >>
> > > >> The clock alias handling is still needed as a transition phase until
> > > >> all the above is done, then we can start dropping them. Basically
> > > >> anything that is using omap_hwmod depends on the clock aliases right
> > > >> now.
> > > >
> > > > Ok, sounds good. Thanks.
> > > 
> > > Stephen, any final comments on this series? I guess its too late to push 
> > > for 4.10, but I would like to get this merged early for 4.11 window.
> > 
> > Hi Tero,
> > 
> > No final comments from me. I needed to go back and forth with Tony about
> > the clockdomain modeling, but it seems sensible to create clock
> > providers from the clock domains if you want to pass those struct clk
> > objects down to the drivers.
> > 
> > One thing I wasn't able to follow exactly in the code is how the
> > clockdomains are linking parent clocks from cm1, cm2, etc to the clock
> > domains. Are the clockdomain providers calling clk_get() on the clocks
> > that it *consumes*, or are the clockdomain providers never calling
> > clk_get() on those clocks and just establishing the tree hierarchy at
> > clk_register() time?
> > 
> > Unless Stephen has any more review comments we can merge this into a
> > clk-next based on v4.10-rc1 when that drops.
> > 
> 
> I spent a bunch of time looking at this again today. From a DT
> perspective we don't want to have clocks or clockdomains nodes
> below the cm1/cm2/prm dt nodes. That's getting to the point of
> describing individual elements of a device that should be
> described in the driver instead of DT.

I agree we don't need separate clocks and clockdomain nodes.. But
I think you're missing something here though. The clockdomains in
this case are separate devices on the interconnect, not individual
elements within a device. The outputs of a clockdomain are individual
elements of a clockdomain and can be just described as indexed
outputs of the clockdomain.

So we just need the clockdomain clock nodes, then each clock output is
just offset from that clockdomain. And we can have readable defines
for the offsets. That's all there should be to it.

> I'd also prefer we didn't have cm1/cm2/prm nodes and just had one
> prcm node as the clock provider (#clock-cells) because that's the
> aligned register address space that's visible on the bus.  From
> my perspective cm1/cm2/prm look like macros that are put inside
> the prcm container and they're at least aligned on some register
> address boundary so I'm not too worried if we keep describing
> down to the level of these modules in DT. Anything beyond that is
> not good though.

Having just one prcm node instead of cm1, cm2 and prm is wrong from
hardware point of view. These are on separate interconnect instances.
Ideally the clockdomain clock driver works for all these though, just
separate instances of the same driver.

> Finally we come to using clock providers or genpds for the clock
> domains. If we don't put clockdomains into DT (because I don't
> want clockdomain nodes) then this problem almost goes away. At
> least, I don't really care what happens here because it will be
> an internal TI prcm driver question of implementation. A clk
> consumer will just see a provider that outputs some sort of clk.
> If that happens to go through a clockdomain and we need to toggle
> some bits inside the domain registers to make the clk actually
> output a signal, that's fine. The prcm driver can take care of it
> behind the scenes. Or at a later date we can model the domain as
> a genpd and have the framework turn on/off genpds attached to
> certain clocks. There's a lot of freedom here as long as we don't
> put things in DT.

Yeah totally agree. And this problem also goes away when we just
assume a clockdomain is just a clock device with multiple outputs.
Any magic that needs to happen beyond that can be dealt with at
the interconnect level.

Regards,

Tony

  reply	other threads:[~2016-12-13  1:31 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 15:45 [PATCHv4 00/15] clk: ti: add support for hwmod clocks Tero Kristo
2016-10-18 15:45 ` [PATCHv4 01/15] clk: ti: remove un-used definitions from public clk_hw_omap struct Tero Kristo
2016-10-18 15:45 ` [PATCHv4 02/15] clk: ti: mux: export mux clock APIs locally Tero Kristo
2016-10-18 15:45 ` [PATCHv4 03/15] dt-bindings: clock: add omap4 hwmod clock IDs Tero Kristo
2016-10-20 12:47   ` Tony Lindgren
2016-10-20 12:59     ` Tero Kristo
2016-10-20 13:11       ` Tony Lindgren
2016-10-18 15:45 ` [PATCHv4 04/15] clk: ti: add support for automatic clock alias generation Tero Kristo
2016-10-18 15:45 ` [PATCHv4 05/15] clk: ti: create clock aliases automatically for simple clock types Tero Kristo
2016-10-18 15:45 ` [PATCHv4 06/15] clk: ti: use automatic clock alias generation framework Tero Kristo
2016-10-18 15:46 ` [PATCHv4 07/15] clk: ti: rename ti_clk_register_legacy_clks API Tero Kristo
2016-10-18 15:46 ` [PATCHv4 08/15] clk: ti: add clkdm_lookup to the exported functions Tero Kristo
2016-10-18 15:46 ` [PATCHv4 09/15] clk: ti: move omap2_init_clk_clkdm under TI clock driver Tero Kristo
2016-10-20 12:59   ` Tony Lindgren
2016-10-18 15:46 ` [PATCHv4 10/15] clk: ti: add support API for fetching memmap index Tero Kristo
2016-10-18 15:46 ` [PATCHv4 11/15] clk: ti: clockdomain: add clock provider support to clockdomains Tero Kristo
2016-10-20 13:06   ` Tony Lindgren
     [not found]   ` <1476805568-19264-12-git-send-email-t-kristo-l0cyMroinI0@public.gmane.org>
2016-10-28  0:50     ` Stephen Boyd
2016-10-28  7:41       ` Tero Kristo
     [not found]         ` <cd32a554-ba0a-33cd-c15c-121524ce679b-l0cyMroinI0@public.gmane.org>
2016-10-28 12:51           ` Tony Lindgren
     [not found]             ` <20161028125112.xfyrx7l7m64z6cu6-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-28 23:36               ` Stephen Boyd
2016-10-28 23:54                 ` Tony Lindgren
2016-12-02 22:33                   ` Michael Turquette
2016-12-02 23:12                     ` Tony Lindgren
2016-12-02 23:52                       ` Michael Turquette
2016-12-03  0:18                         ` Tony Lindgren
2016-12-05 10:08                           ` Tero Kristo
     [not found]                             ` <ed253013-1f12-9fd8-d007-400a6c6fd427-l0cyMroinI0@public.gmane.org>
2016-12-05 15:25                               ` Tony Lindgren
     [not found]                                 ` <20161205152534.GJ4705-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-12-09 20:02                                   ` Michael Turquette
2016-12-09 20:40                                     ` Tony Lindgren
2016-12-09 21:28                                       ` Michael Turquette
2016-12-09 21:58                                         ` Tony Lindgren
2016-10-18 15:46 ` [PATCHv4 12/15] clk: ti: enforce const types on string arrays Tero Kristo
2016-10-18 15:46 ` [PATCHv4 13/15] clk: ti: add support for omap4 module clocks Tero Kristo
2016-10-18 15:46 ` [PATCHv4 14/15] clk: ti: omap4: add hwmod clock data Tero Kristo
2016-10-18 15:46 ` [PATCHv4 15/15] clk: ti: omap4: cleanup unnecessary clock aliases Tero Kristo
2016-10-28  0:53 ` [PATCHv4 00/15] clk: ti: add support for hwmod clocks Stephen Boyd
2016-10-28  7:19   ` Tero Kristo
2016-10-28 23:37     ` Stephen Boyd
2016-12-02  8:15       ` Tero Kristo
2016-12-12 18:25         ` Michael Turquette
2016-12-13  0:49           ` Stephen Boyd
2016-12-13  1:31             ` Tony Lindgren [this message]
2016-12-13  1:37               ` Tony Lindgren
2016-12-13  4:40               ` Michael Turquette
2016-12-13  8:31                 ` Tero Kristo
2016-12-13 15:37                   ` Tony Lindgren
2016-12-13 22:02                     ` Michael Turquette
2016-12-14  0:43                       ` Tony Lindgren
2016-12-17  1:46                   ` Stephen Boyd
2016-12-19  6:22                     ` Tero Kristo
2016-12-20 22:56                       ` Stephen Boyd
2016-12-20 23:04                         ` Tony Lindgren

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=20161213013133.GR4920@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=t-kristo@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;
as well as URLs for NNTP newsgroup(s).