summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/tcb_clksrc.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: at91/tc/clocksource: Add 32 bit variant to Timer CounterNicolas Ferre2012-03-011-28/+62
| | | | | | | | | | | | | | | | Some SoC have a 32 bit variant of Timer Counter Blocks. We do not need the chaining of two 16 bit counters anymore for them. The SoC nature is deduced from the device tree "compatible" string. For non-device-tree configurations, backward compatibility is maintained by using the default 16 bit counter configuration. This patch addresses both the atmel_tclib and its user: tcb_clksrc clocksource. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Grant Likely <grant.likely@secretlab.ca>
* clocksource: Convert tcb_clksrc to use clocksource_register_hz/khzJohn Stultz2011-11-211-3/+1
| | | | | | | | | Convert tcb_clksrc to use clocksource_register_hz. CC: Nikolaus Voss <n.voss@weinmann.de> CC: Thomas Gleixner <tglx@linutronix.de> Acked-by: Nikolaus Voss <n.voss@weinmann.de> Signed-off-by: John Stultz <john.stultz@linaro.org>
* drivers/clocksource/tcb_clksrc.c: fix init sequenceVoss, Nikolaus2011-01-261-2/+2
| | | | | | | | | | | | setup_irq() was called before clockevents_register_device() which is needed by the irq handler. Bug was reproducible by restarting the kernel using kexec (reliable crash). Signed-off-by: Nikolaus Voss <n.voss@weinmann.de> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* clocksource: pass clocksource to read() callbackMagnus Damm2009-04-211-1/+1
| | | | | | | | | | | | | | Pass clocksource pointer to the read() callback for clocksources. This allows us to share the callback between multiple instances. [hugh@veritas.com: fix powerpc build of clocksource pass clocksource mods] [akpm@linux-foundation.org: cleanup] Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: John Stultz <johnstul@us.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cpumask: convert struct clock_event_device to cpumask pointers.Rusty Russell2008-12-131-1/+1
| | | | | | | | | | | | | Impact: change calling convention of existing clock_event APIs struct clock_event_timer's cpumask field gets changed to take pointer, as does the ->broadcast function. Another single-patch change. For safety, we BUG_ON() in clockevents_register_device() if it's not set. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@elte.hu>
* tclib: Fix compile warningsDavid Brownell2008-03-131-7/+4
| | | | | | | Does that have something analagous to this "remove warnings" patch? Seems setup_clkevents() no longer needs a t0_clk parameter either... Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* atmel_tc clocksource/clockevent codeDavid Brownell2008-03-041-0/+305
Clocksource and clockevent device based on the Atmel TC blocks. The clockevent device handles both periodic and oneshot modes, so this enables NO_HZ and high res timers on some platforms that previously couldn't use those mechanisms. This works on both AVR32 and AT91 chips, given relevant patches for tclib support (always) and clockevents (or else this will only look like a higher precision clocksource). It's an updated and modularized version of an AT91-only patch that has circulated for some time now. Changes relative to the original patch: * Update to use new tclib API * Replace open-coded do-while loop using goto with a real do-while loop * Minor irq handler optimization: Load register base address from dev_id instead of a global variable. * Aggressively turn off clocks when the clockevent isn't being used * Include the clockevent code on AT91RM9200 as well. The rating is lower than the System Timer, so the clock will usually stay off. * Don't assume that the number of clocks is always equal to the number of irqs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
OpenPOWER on IntegriCloud