devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
To: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
	arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 4/6 v2] ARM: integrator: initial device tree support
Date: Thu, 6 Sep 2012 15:14:55 +0100	[thread overview]
Message-ID: <20120906141455.GA13739@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <5048A31E.2090704-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Thu, Sep 06, 2012 at 08:20:30AM -0500, Rob Herring wrote:
> Well, the dts doesn't really need to describe how Linux is using things.
> I'd like to get to common DT code for sp804 so all platforms just have a
> call to sp804_dt_init() which does all the initialization.

They don't all have SP804 timers.  The Integrator/AP does not have SP804,
and it would be wrong to try and merge them into the clean SP804 driver.

Integrator/AP timers are strictly 16-bit only affairs, which need special
clocking handling to ensure that their rollover rate is sufficiently long.
SP804 timers are 32-bit or 16-bit timers, we drive the only in 32-bit mode,
and so they don't suffer from the above issue.  Polluting this code with
the legacy 16-bit stuff just for one platform is not a good idea.  They
weren't even called SP804 in the Integrator/AP days - they were just a
random timer design embedded into a FPGA.

> Realview and Versatile use timer0 for clk-event and timer3 for clk-src.
> Is there something broken with timer1 and timer2? It is certainly
> possible the h/w has the clock tied off for 1 of the 2 timers.

I don't believe so, that's the way the timers were used when I received
the initial code drop from ARM Ltd, before it got cleaned up.  The
selection of what timers are used appears to me to be completely random.

> VExpress CA9 has broken timers on the core tile (at least they were
> ifdef'ed out before the last clean-up). We could just remove/disable
> them in the dts so they are not used.

The motherboard timers can be switched between 32kHz and 1MHz mode.  The
core tile timers can probably be switched between 32kHz and 1MHz mode but
god knows how - they default to 32kHz.  So given that choice, I opted for
the higher resolution motherboard timers and left the hooks for the core
tile timers in place, in the hope that someone would tell me or implement
the switching to 1MHz mode.

Obviously, no one did, and the code got removed.  I doubt it makes any
difference what so ever.

And that's a very good point - in the current way things are handled on
these platforms, the tweaking of the SP804 input clocks has been divorced
from the SP804 initialization.  This is bad, because it means that
dependency has been hidden by the DT conversion...

So, selection of the right SP804s to use is also a function of "do we know
how to control its clock rate".  If we don't, we can't be certain of the
rate at which the timer ticks.

  parent reply	other threads:[~2012-09-06 14:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-01  3:55 [PATCH 1/6 v2] ARM: integrator: call common init function from machine Linus Walleij
     [not found] ` <1346471760-23993-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-09-01  3:55   ` [PATCH 2/6 v2] ARM: integrator: check PL010 device name rather than base address Linus Walleij
     [not found]     ` <1346471760-23993-2-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-09-01  3:55       ` [PATCH 3/6 v2] ARM: plat-versatile: add DT support to FPGA IRQ controller Linus Walleij
     [not found]         ` <1346471760-23993-3-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-09-01  3:55           ` [PATCH 4/6 v2] ARM: integrator: initial device tree support Linus Walleij
     [not found]             ` <1346471760-23993-4-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-09-01  3:55               ` [PATCH 5/6 v2] ARM: integrator: convert AMBA devices to device tree Linus Walleij
     [not found]                 ` <1346471760-23993-5-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-09-01  3:55                   ` [PATCH 6/6 v2] ARM: integrator: convert platform devices to Device Tree Linus Walleij
2012-09-01 18:41               ` [PATCH 4/6 v2] ARM: integrator: initial device tree support Arnd Bergmann
     [not found]                 ` <201209011841.58977.arnd-r2nGTMty4D4@public.gmane.org>
2012-09-03 21:43                   ` Linus Walleij
2012-09-03 21:55                     ` Russell King - ARM Linux
     [not found]                       ` <20120903215505.GB31511-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2012-09-04  7:19                         ` Linus Walleij
     [not found]                           ` <CACRpkdbXSaBNystUv9RTmDKrmV=OakFF49LPkoQtoi9FnaXmDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-05  5:34                             ` Olof Johansson
     [not found]                               ` <20120905053402.GI6747-O5ziIzlqnXUVNXGz7ipsyg@public.gmane.org>
2012-09-05  5:47                                 ` Linus Walleij
2012-09-02 22:59               ` Rob Herring
     [not found]                 ` <5043E4BE.1060508-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-09-03 21:51                   ` Linus Walleij
     [not found]                     ` <CACRpkdbTRCUnx1JjCQ+WT4PoxtDG38MP=ctUp6TBPd64xQ39jw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-06 13:20                       ` Rob Herring
     [not found]                         ` <5048A31E.2090704-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-09-06 13:56                           ` Linus Walleij
     [not found]                             ` <CACRpkdYy2CZXXA+kkEaOTznaucxXEwiwSn-5ux0ByHjXrsm-2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-06 14:19                               ` Arnd Bergmann
     [not found]                                 ` <201209061419.07325.arnd-r2nGTMty4D4@public.gmane.org>
2012-09-12 16:52                                   ` Linus Walleij
2012-09-06 15:35                               ` Rob Herring
2012-09-06 14:14                           ` Russell King - ARM Linux [this message]
2012-09-01 18:32       ` [PATCH 2/6 v2] ARM: integrator: check PL010 device name rather than base address Arnd Bergmann
     [not found]         ` <201209011832.47805.arnd-r2nGTMty4D4@public.gmane.org>
2012-09-03 19:40           ` Linus Walleij
     [not found]             ` <CACRpkdYMjJFHscO1BztOFBRMf+YZo+jO5pCrEiGeeeU_Oh_rfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-03 19:51               ` Linus Walleij
  -- strict thread matches above, loose matches on Subject: below --
2012-09-05 19:28 [PATCH 4/6 v2] ARM: integrator: initial device tree support Linus Walleij

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=20120906141455.GA13739@n2100.arm.linux.org.uk \
    --to=linux-lfz/pmaqli7xmaaqvzeohq@public.gmane.org \
    --cc=arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.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).