From: gregory.clement@free-electrons.com (Gregory CLEMENT)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/9] clocksource: time-armada-370-xp: Marvell Armada 370/XP SoC timer driver
Date: Fri, 15 Jun 2012 13:38:45 +0200 [thread overview]
Message-ID: <4FDB1EC5.8090602@free-electrons.com> (raw)
In-Reply-To: <20120615104547.GK26034@lunn.ch>
On 06/15/2012 12:45 PM, Andrew Lunn wrote:
>> +void __init armada_370_xp_timer_init(void)
>> +{
>> + u32 u;
>> + struct device_node *np;
>> + unsigned int timer_clk;
>> + int ret;
>> + np = of_find_compatible_node(NULL, NULL, "marvell,timer");
>> + timer_base = of_iomap(np, 0);
>> + WARN_ON(!timer_base);
>> +
>> + if (of_find_property(np, "marvell,timer-25Mhz", NULL)) {
>> + /* The fixed 25MHz timer is available so let's use it */
>> + u = readl(timer_base + TIMER_CTRL_OFF);
>> + writel(u | TIMER0_25MHZ | TIMER1_25MHZ,
>> + timer_base + TIMER_CTRL_OFF);
>> + timer_clk = 25000000;
>> + } else {
>> + u32 clk = 0;
>> + ret = of_property_read_u32(np, "clock-frequency", &clk);
>> + WARN_ON(!clk || ret < 0);
>> + u = readl(timer_base + TIMER_CTRL_OFF);
>> + writel(u & ~(TIMER0_25MHZ | TIMER1_25MHZ),
>> + timer_base + TIMER_CTRL_OFF);
>> + timer_clk = clk / TIMER_DIVIDER;
>> + }
>
> Hi Gregory
>
> This all looks very similar to plat-orion/timer.c. The biggest
> difference is the support for this 25Mhz timer mode. Maybe, so long as
> this property is not used, the code will work for all orion platforms.
> If so, we should drop all the armada_370_xp prefixes and just call it
> orion.
>
> I will try to test it on a Kirkwood today/tomorrow.
I wait for your results, and if it works for you then I drop all the
armada_370_xp prefixes. About calling it orion, it should be mvebu I
think.
>
> Andrew
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
+33 602 196 044
next prev parent reply other threads:[~2012-06-15 11:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-15 7:44 [PATCH v3] arm: Add basic support for new Marvell Armada 370 and Armada XP SoC Gregory Clement
2012-06-15 7:44 ` [PATCH v3 1/9] clocksource: time-armada-370-xp: Marvell Armada 370/XP SoC timer driver Gregory Clement
2012-06-15 9:09 ` Arnd Bergmann
2012-06-15 9:14 ` Gregory CLEMENT
2012-06-15 10:45 ` Andrew Lunn
2012-06-15 11:38 ` Gregory CLEMENT [this message]
2012-06-15 11:54 ` Andrew Lunn
2012-06-15 13:14 ` Nicolas Pitre
2012-06-15 7:44 ` [PATCH v3 2/9] arm: mach-mvebu: add header Gregory Clement
2012-06-15 7:44 ` [PATCH v3 3/9] arm: mach-mvebu: add source files Gregory Clement
2012-06-15 9:12 ` Arnd Bergmann
2012-06-15 10:07 ` Andrew Lunn
2012-06-15 18:13 ` Device Tree, abstraction of the SoC or the board? Thomas Petazzoni
2012-06-15 20:19 ` Arnd Bergmann
2012-06-15 7:44 ` [PATCH v3 4/9] arm: mach-mvebu: add support for Armada 370 and Armada XP with DT Gregory Clement
2012-06-15 7:44 ` [PATCH v3 5/9] arm: mach-mvebu: add documentation for new device tree bindings Gregory Clement
2012-06-15 9:14 ` Arnd Bergmann
2012-06-15 7:44 ` [PATCH v3 6/9] arm: mach-mvebu: add defconfig Gregory Clement
2012-06-15 7:44 ` [PATCH v3 7/9] arm: mach-mvebu: add compilation/configuration change Gregory Clement
2012-06-15 7:56 ` Andrew Lunn
2012-06-15 8:32 ` Gregory CLEMENT
2012-06-15 9:07 ` Arnd Bergmann
2012-06-15 7:44 ` [PATCH v3 8/9] arm: mach-mvebu: add entry to MAINTAINERS Gregory Clement
2012-06-15 7:44 ` [PATCH v3 9/9] ARM: mvebu: MPIC: read number of interrupts from control register Gregory Clement
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=4FDB1EC5.8090602@free-electrons.com \
--to=gregory.clement@free-electrons.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.