linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: pawel.moll@arm.com (Pawel Moll)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 06/11] ARM: vexpress: use clocksource_of_init for sp804
Date: Fri, 15 Mar 2013 12:58:32 +0000	[thread overview]
Message-ID: <1363352312.3100.175.camel@hornet> (raw)
In-Reply-To: <20130315123408.GJ4977@n2100.arm.linux.org.uk>

On Fri, 2013-03-15 at 12:34 +0000, Russell King - ARM Linux wrote:
> However, for SP804 selection, there are cases where it matters, such as
> on Versatile Express where you have to select the right set of SP804 to
> have a working system (because ARM didn't fully document the SP804 setup
> there) and we have no way to switch some of those timers from their
> 32kHz clock source.  But then we could just omit the clock source for
> the "bad" SP804s which would prevent them being used.

Both VE motherboard's SP804s TIMCLKENx inputs are fed by the SP810's
outputs:

v2m_timer01: timer at 11000 {
	compatible = "arm,sp804", "arm,primecell";
	reg = <0x11000 0x1000>;
	interrupts = <2>;
	clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&smbclk>;
	clock-names = "timclken1", "timclken2", "apb_pclk";
};      

v2m_timer23: timer at 12000 {
	compatible = "arm,sp804", "arm,primecell";
	reg = <0x12000 0x1000>;
	interrupts = <3>;
	clocks = <&v2m_sysctl 2>, <&v2m_sysctl 3>, <&smbclk>;
	clock-names = "timclken1", "timclken2", "apb_pclk";
};

TIMCLKs are wired to the SMB_CLK, so the effective rate depends on the
TIMCLKENx only.

The SP810 takes the 32kHz and 1MHz reference clocks:

v2m_sysctl: sysctl at 01000 {
	compatible = "arm,sp810", "arm,primecell";
	reg = <0x01000 0x1000>;
	clocks = <&v2m_refclk32khz>, <&v2m_refclk1mhz>, <&smbclk>;
	clock-names = "refclk", "timclk", "apb_pclk";
	#clock-cells = <1>;
	clock-output-names = "timerclken0", "timerclken1", "timerclken2", "timerclken3";
};

and the code in drivers/clk/versatile/clk-vexpress.c picks up the faster
one as the parent.

The V2P-CA9 SP804's TIMCLK is wired to one of the main clock generators:

timer at 100e4000 {
	compatible = "arm,sp804", "arm,primecell";
	reg = <0x100e4000 0x1000>;
	interrupts = <0 48 4>,
	             <0 49 4>;
	clocks = <&oscclk2>, <&oscclk2>;
	clock-names = "timclk", "apb_pclk";
};

Both TIMCLKEN0 & 1 are pulled up to 1 so they have no effect on the
timer rates.

Overall, the description of the VE clocking in the Device Tree is rather
complete.

Pawe?

  reply	other threads:[~2013-03-15 12:58 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13  5:05 [PATCH v3 00/11] add hisilicon SoC support Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 01/11] clocksource: move sp timer driver Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 02/11] clocksource: select USE_OF by default Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 03/11] clocksource: sp804: add device tree support Haojian Zhuang
2013-03-13 11:05   ` Pawel Moll
2013-03-13 11:37     ` Haojian Zhuang
2013-03-13 11:41       ` Pawel Moll
2013-03-13 14:17     ` Rob Herring
2013-03-13 14:42       ` Pawel Moll
2013-03-13 14:51         ` Rob Herring
2013-03-13 14:55           ` Pawel Moll
2013-03-13 15:11             ` Haojian Zhuang
2013-03-13 15:23               ` Pawel Moll
2013-03-13 15:25                 ` Haojian Zhuang
2013-03-13 15:29                   ` Pawel Moll
2013-03-13 15:39                     ` Rob Herring
2013-03-13 15:41                       ` Pawel Moll
2013-03-13 15:44                         ` Haojian Zhuang
2013-03-13 15:42                     ` Haojian Zhuang
2013-03-13 15:49                       ` Pawel Moll
2013-03-13 16:35                         ` Arnd Bergmann
2013-03-13 16:41                           ` Pawel Moll
2013-03-15 12:20       ` Russell King - ARM Linux
2013-03-13  5:05 ` [PATCH v3 04/11] ARM: integrator: use clocksource_of_init for sp804 Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 05/11] ARM: highbank: " Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 06/11] ARM: vexpress: " Haojian Zhuang
2013-03-13 11:10   ` Pawel Moll
2013-03-13 11:42     ` Haojian Zhuang
2013-03-13 11:46       ` Pawel Moll
2013-03-13 12:21         ` Haojian Zhuang
2013-03-13 14:48           ` Pawel Moll
2013-03-13 15:01             ` Haojian Zhuang
2013-03-13 15:19               ` Pawel Moll
2013-03-13 15:59                 ` Haojian Zhuang
2013-03-13 16:28                   ` Pawel Moll
2013-03-13 16:32                   ` Rob Herring
2013-03-15 12:34                     ` Russell King - ARM Linux
2013-03-15 12:58                       ` Pawel Moll [this message]
2013-03-15 18:10                         ` Russell King - ARM Linux
2013-03-13  5:05 ` [PATCH v3 07/11] ARM: debug: support debug ll on hisilicon soc Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 08/11] clk: hi3xxx: add clock support Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 09/11] ARM: hi3xxx: add board support with device tree Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 10/11] ARM: hi3xxx: enable hi4511 " Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 11/11] ARM: config: append arch hi3xxx into multi defconfig Haojian Zhuang

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=1363352312.3100.175.camel@hornet \
    --to=pawel.moll@arm.com \
    --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).