History log of /arch/arm/common/timer-sp.c
Revision Date Author Comments
1bde9906414b46b6922464e7c91dd815e5f217b3 29-May-2014 Rob Herring <robh@kernel.org> ARM: timer-sp: allow getting timer1 clock from DT to fallback to legacy clock

The sp804 clocks may be specified in DT, but the kernel may still be using
legacy clocks. This is handled if a single clock for sp804 is present,
but not when 3 clocks are present.

This prevents Versatile platforms from breaking when the DT has clocks
added.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
9cf31380598466a6ce1d95e68a3f89582eaddc13 10-Jan-2014 Linus Walleij <linus.walleij@linaro.org> ARM: SP804: make Integrator/CP timer pick clock from DT

This modifies the SP804 driver so that the clock will be taken
from the device tree node for the timer.

Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Rob Herring <rob.herring@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9b12f3a86a2cb82ca6f3b0a0207b12c07dc701b7 16-Nov-2013 Stephen Boyd <sboyd@codeaurora.org> ARM: timer-sp: Switch to sched_clock_register()

The 32 bit sched_clock interface now supports 64 bits. Upgrade to
the 64 bit function to allow us to remove the 32 bit registration
interface. Also mark the read function notrace since we're here
and failure to do so would cause ftrace to break.

Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
728fae6f6f73b34cf94afe6c87ce102889abc786 14-Oct-2013 Michael Opdenacker <michael@free-electrons.com> ARM: 7856/1: timer-sp: remove deprecated IRQF_DISABLED

This patch proposes to remove the use of the IRQF_DISABLED flag

It's a NOOP since 2.6.35 and it will be removed one day.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
887708f0ac7641e7d5131409cedf6774f26f0cb6 02-Mar-2013 Viresh Kumar <viresh.kumar@linaro.org> ARM: timer-sp: Set dynamic irq affinity

When a cpu goes to a deep idle state where its local timer is shutdown, it
notifies the time frame work to use the broadcast timer instead.

Unfortunately, the broadcast device could wake up any CPU, including an idle one
which is not concerned by the wake up at all.

This implies, in the worst case, an idle CPU will wake up to send an IPI to
another idle cpu.

This patch fixes this for ARM platforms using timer-sp, by setting
CLOCK_EVT_FEAT_DYNIRQ feature.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
38ff87f77af0b5a93fc8581cff1d6e5692ab8970 02-Jun-2013 Stephen Boyd <sboyd@codeaurora.org> sched_clock: Make ARM's sched_clock generic for all architectures

Nothing about the sched_clock implementation in the ARM port is
specific to the architecture. Generalize the code so that other
architectures can use it by selecting GENERIC_SCHED_CLOCK.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[jstultz: Merge minor collisions with other patches in my tree]
Signed-off-by: John Stultz <john.stultz@linaro.org>
870e2928cf3368ca9b06bc925d0027b0a56bcd8e 13-Mar-2013 Rob Herring <rob.herring@calxeda.com> ARM: integrator-cp: convert use CLKSRC_OF for timer init

Move the integrator-cp timer init to timer-sp.c and use CLKSRC_OF. There is
no reason to use the aliases, so drop them from the init code.

The integrator-cp timers are mistakenly called sp804 timers in the dts, but
in fact they are not sp804 dual timers, but single timers with the same
programming model. Fix the dts to reflect this.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
7a0eca712118862a2ac25413b7ee24deb27808ea 25-Mar-2013 Rob Herring <rob.herring@calxeda.com> ARM: timer-sp: convert to use CLKSRC_OF init

This adds CLKSRC_OF based init for sp804 timer. The clock initialization is
refactored to support retrieving the clock(s) from the DT.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
ea3aacf5f22c1002cac97985354658072232e280 23-Nov-2012 Will Deacon <will.deacon@arm.com> ARM: 7586/1: sp804: set cpumask to cpu_possible_mask for clock event device

The SP804 driver statically initialises the cpumask of the clock event
device to be cpu_all_mask, which is derived from the compile-time
constant NR_CPUS. This breaks SMP_ON_UP systems where the interrupt
controller handling the sp804 doesn't have the irq_set_affinity callback
on the irq_chip, because the common timer code fails to identify the
device as cpu-local and ends up treating it as a broadcast device
instead.

This patch fixes the problem by using cpu_possible_mask at runtime,
which will correctly represent the possible CPUs when SMP_ON_UP is being
used.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
a7bf61620831c5578e434429bc7fa0fd0219c40c 12-Dec-2011 Rob Herring <rob.herring@calxeda.com> ARM: timer-sp: add sched_clock support

Add a sched_clock support for the sp804 timer. The clocksource timer
can optionally initialize itself as sched_clock timer.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
7c324d837f214290febac87da6815dff1ed41d04 21-Dec-2011 Linus Walleij <linus.walleij@linaro.org> ARM: 7243/1: sp804: modernize clock event registration

This removes the hardcoded shift value and lets the clockevent core
come up with suitable mult and div factors. Tested on the
Integrator/CP.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
6f5ad96301d4b897f09a893d331a0b18b3fff6b1 22-Sep-2011 Russell King <rmk+kernel@arm.linux.org.uk> clk: timer-sp: convert to clk_prepare()/clk_unprepare()

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
23828a7a976eb8dbe3b5f4e83584c3fe814b295b 12-May-2011 Russell King <rmk+kernel@arm.linux.org.uk> clockevents: ARM sp804: obtain sp804 timer rate via clks

This allows platforms to specify the rate of the SP804 clockevent via
the clk subsystem. While ARM boards clock these at 1MHz, BCMRing also
has SP804 timers but are clocked at different rates.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
57cc4f7de2b896ca79185e337eaf7ff9906c4656 12-May-2011 Russell King <rmk+kernel@arm.linux.org.uk> clockevents: ARM sp804: allow clockevent name to be specified

This allows platforms to specify the clcokevent name upon registration.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
7ff550de99141cbd3be0129d563cc4554fdde9f6 12-May-2011 Russell King <rmk+kernel@arm.linux.org.uk> clocksource: ARM sp804: obtain sp804 timer rate via clks

This allows platforms to specify the rate of the SP804 clocksource via
the clk subsystem. While ARM boards clock these at 1MHz, BCMRing also
has SP804 timers but are clocked at different rates.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
fb593cf38fc426331275d761fefe13096070f56a 12-May-2011 Russell King <rmk+kernel@arm.linux.org.uk> clocksource: ARM sp804: allow clocksource name to be specified

This allows platforms to specify the clocksource name upon
registration, which is necessary should they wish to register more
than one sp804 clocksource.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
bfe45e0be88d8a2e408226d473bff60da4a97d1f 08-May-2011 Russell King <rmk+kernel@arm.linux.org.uk> clocksource: convert ARM 32-bit down counting clocksources

Convert SP804, MXC, Nomadik and Orion 32-bit down-counting clocksources
to generic mmio clocksource infrastructure.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
8a9618f5dfca35edb0d7ab6374ff586e2e9e989b 06-Oct-2010 Rob Herring <r.herring@freescale.com> ARM: 6432/1: move timer-sp.c from versatile to common

From: Rob Herring <rob.herring@smooth-stone.com>

The timer-sp h/w used on versatile platforms can also be used for other
platforms, so move it to a common location.

Signed-off-by: Rob Herring <rob.herring@smooth-stone.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>