linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mturquette@linaro.org (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: PXA 2xx devictree port and clock infrastructure
Date: Tue, 27 May 2014 18:05:18 -0700	[thread overview]
Message-ID: <20140528010518.7816.7374@quantum> (raw)
In-Reply-To: <87vbsqdd27.fsf@free.fr>

Quoting Robert Jarzmik (2014-05-27 16:20:00)
> Arnd Bergmann <arnd@arndb.de> writes:
> 
> > Right, that is the general recommendation at least. I'm always a bit cautious
> > when it comes to PXA because I don't expect that platform to fully get
> > converted to DT in the long run, and very little new work is going on there.
> >
> > OTOH, if people like Robert and Daniel do this for fun, it's definitely
> > great to see the full solution.
> 
> OK, so let's suppose I go for (c), and :
>  - create drivers/clk/clk-pxa2xx.c
>    => OF clock driver
>  - amend the mach-pxa accordingly to move all clock stuff to this driver
> 
> Is there a clean way for the transition phase, where devicetree pxa-dt machine
> will have to exist with non-DT machine code ? ie. is there around a clock driver
> I can look at where both OF *and* non-OF are working ?
> 
> Ah, and given that PXA clocks are very simple :
>  - their rate is almost always constant, and not changeable
>  - only one register exists to enable/disable all the clocks (bitmask of 32
>  possible clock enables)
> 
> Isn't there already a skeleton to handle this type of clocks ? It looks to me
> pretty generic, yet I haven't found it in drivers/clk. Maybe I missed something
> ?

There is a fixed-rate clock type already and a fixed-factor (e.g.
fixed-divider) clock type. DT bindings exist for these types already.
See,

drivers/clk/clk-fixed-rate.c
drivers/clk/clk-fixed-factor.c
Documentation/devicetree/bindings/clock/fixed-clock.txt
Documentation/devicetree/bindings/clock/fixed-factor-clock.txt

For the gate clocks we have a gate-clock type:

drivers/clk/clk-gate.c

No DT binding exists for this type, as it it usually parsed by a
platform- or controller-specific compatible string. For an example of a
32-bit register where each bit toggles a clock gate, please see:

Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt

There might be simpler examples that don't use the clock-indices stuff,
but that was just from a quick grep.

Regards,
Mike

> 
> Cheers.
> 
> --
> Robert

  reply	other threads:[~2014-05-28  1:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-27 13:02 PXA 2xx devictree port and clock infrastructure Robert Jarzmik
2014-05-27 15:17 ` Arnd Bergmann
2014-05-27 15:43   ` Mark Rutland
2014-05-27 15:49     ` Arnd Bergmann
2014-05-27 23:20       ` Robert Jarzmik
2014-05-28  1:05         ` Mike Turquette [this message]
2014-06-05  3:01 ` Andrew Ruder
2014-06-07 18:49   ` Robert Jarzmik

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=20140528010518.7816.7374@quantum \
    --to=mturquette@linaro.org \
    --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).