aboutsummaryrefslogtreecommitdiff
path: root/drivers/clocksource/dw_apb_timer_of.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-02clocksource: dw_apb_timer_of: Mark a few more functions as __initUwe Kleine-König1-5/+5
These are all only called by dw_apb_timer_init which is an __init function, too Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2013-10-02clocksource: Put nodes passed to CLOCKSOURCE_OF_DECLARE callbacks centrallyUwe Kleine-König1-2/+0
Instead of letting each driver call of_node_put do it centrally in the loop that also calls the CLOCKSOURCE_OF_DECLARE callbacks. This is less prone to error and also moves getting and putting the references into the same function. Consequently all respective of_node_put calls in drivers are removed. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: David Brown <[email protected]>
2013-07-30clocksource: dw_apb_timer_of: Switch to sched_clock_register()Stephen Boyd1-2/+2
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. Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: John Stultz <[email protected]>
2013-07-06Merge branch 'timers-core-for-linus' of ↵Linus Torvalds1-4/+2
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer core updates from Thomas Gleixner: "The timer changes contain: - posix timer code consolidation and fixes for odd corner cases - sched_clock implementation moved from ARM to core code to avoid duplication by other architectures - alarm timer updates - clocksource and clockevents unregistration facilities - clocksource/events support for new hardware - precise nanoseconds RTC readout (Xen feature) - generic support for Xen suspend/resume oddities - the usual lot of fixes and cleanups all over the place The parts which touch other areas (ARM/XEN) have been coordinated with the relevant maintainers. Though this results in an handful of trivial to solve merge conflicts, which we preferred over nasty cross tree merge dependencies. The patches which have been committed in the last few days are bug fixes plus the posix timer lot. The latter was in akpms queue and next for quite some time; they just got forgotten and Frederic collected them last minute." * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (59 commits) hrtimer: Remove unused variable hrtimers: Move SMP function call to thread context clocksource: Reselect clocksource when watchdog validated high-res capability posix-cpu-timers: don't account cpu timer after stopped thread runtime accounting posix_timers: fix racy timer delta caching on task exit posix-timers: correctly get dying task time sample in posix_cpu_timer_schedule() selftests: add basic posix timers selftests posix_cpu_timers: consolidate expired timers check posix_cpu_timers: consolidate timer list cleanups posix_cpu_timer: consolidate expiry time type tick: Sanitize broadcast control logic tick: Prevent uncontrolled switch to oneshot mode tick: Make oneshot broadcast robust vs. CPU offlining x86: xen: Sync the CMOS RTC as well as the Xen wallclock x86: xen: Sync the wallclock when the system time is set timekeeping: Indicate that clock was set in the pvclock gtod notifier timekeeping: Pass flags instead of multiple bools to timekeeping_update() xen: Remove clock_was_set() call in the resume path hrtimers: Support resuming with two or more CPUs online (but stopped) timer: Fix jiffies wrap behavior of round_jiffies_common() ...
2013-06-18Revert "dw_apb_timer_of.c: Remove parts that were picoxcell-specific"John Stultz1-23/+29
This reverts commit 55a68c23e0a675b2b8ac2656fd6edbf98b78e4c6. In order to avoid a collision with dw_apb_timer changes in the arm-soc tree, revert this change. I'm leaving it to the arm-soc folks to sort out if they want to keep the other side of the collision or if they're just going to back it all out and try again during the next release cycle. Reported-by: Dinh Nguyen <[email protected]> Signed-off-by: John Stultz <[email protected]>
2013-06-12sched_clock: Make ARM's sched_clock generic for all architecturesStephen Boyd1-2/+1
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 <[email protected]> [jstultz: Merge minor collisions with other patches in my tree] Signed-off-by: John Stultz <[email protected]>
2013-06-12clocksource: dw_apb_timer_of: use clocksource_of_initHeiko Stuebner1-21/+20
dw_apb_timer_init used to search the devicetree for matching timer devices, making calls to it from board files necessary. Change the dw_apb_timer_init to work with CLOCKSOURCE_OF_DECLARE. With this change the function gets called once for each timer node and tracks these number of calls to attach clockevent and clocksource devices to the nodes. Also remove the calls to dw_apb_timer_init from all previous users, as clocksource_of_init is the default for init_time now. Tested on the upcoming rk3066 code. Signed-off-by: Heiko Stuebner <[email protected]> Acked-by: Rob Herring <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Jamie Iles <[email protected]> Acked-by: Dinh Nguyen <[email protected]>
2013-06-12clocksource: dw_apb_timer_of: add clock-handlingHeiko Stuebner1-1/+25
Add the possibility to get the clock-frequency from a timer clock instead of specifying it as dt property. Additionally also add the possibility to also define a controlling periphal clock for the timer block. The clock-frequency property is kept to act as fallback if no clocks are specified. Signed-off-by: Heiko Stuebner <[email protected]> Acked-by: Jamie Iles <[email protected]>
2013-06-12clocksource: dw_apb_timer_of: enable the use the clocksource as sched clockHeiko Stuebner1-9/+17
Currently the dw_apb_timer always expects a separate special timer to be availbable for the sched_clock. Some devices using dw_apb_timers do not have this sptimer but can use the clocksource as sched_clock instead. Therefore enable the driver to distiguish between devices with and without sptimer based on the devicetree data and select the correct timer as sched_clock. Signed-off-by: Heiko Stuebner <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Jamie Iles <[email protected]>
2013-06-08Merge branch 'timers/clockevents' of ↵Thomas Gleixner1-1/+1
git://git.linaro.org/people/dlezcano/clockevents into timers/core
2013-06-06clocksource: dw_apb: Fix error checkBaruch Siach1-1/+1
irq_of_parse_and_map() returns 0 on error, while the code checks for NO_IRQ. This breaks on platforms that have NO_IRQ != 0. Cc: <[email protected]> Signed-off-by: Baruch Siach <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2013-05-28clocksource: dw_apb: Remove unused headerBaruch Siach1-1/+0
The time.h header seems not to be used by current code. Removing this include allows the driver to build on other architecture that do not have this header. Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: John Stultz <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Jamie Iles <[email protected]> Cc: Dinh Nguyen <[email protected]> Acked-by: Jamie Iles <[email protected]> Signed-off-by: Baruch Siach <[email protected]> [tweaked commit message and header] Signed-off-by: John Stultz <[email protected]>
2013-05-28dw_apb_timer_of.c: Remove parts that were picoxcell-specificPavel Machek1-29/+23
It seems we made a mistake when creating dw_apb_timer_of.c: picoxcell sched_clock had parts that were not related to dw_apb_timer, yet we moved them to dw_apb_timer_of, and tried to use them on socfpga. This results in system where user/system time is not measured properly, as demonstrated by time dd if=/dev/urandom of=/dev/zero bs=100000 count=100 So this patch switches sched_clock to hardware that exists on both platforms, and adds missing of_node_put() in dw_apb_timer_init(). Signed-off-by: Pavel Machek <[email protected]> Acked-by: Jamie Iles <[email protected]> Signed-off-by: John Stultz <[email protected]>
2012-12-24ARM: delete struct sys_timerStephen Warren1-5/+1
Now that the only field in struct sys_timer is .init, delete the struct, and replace the machine descriptor .timer field with the initialization function itself. This will enable moving timer drivers into drivers/clocksource without having to place a public prototype of each struct sys_timer object into include/linux; the intent is to create a single of_clocksource_init() function that determines which timer driver to initialize by scanning the device dtree, much like the proposed irqchip_init() at: http://www.spinics.net/lists/arm-kernel/msg203686.html Includes mach-omap2 fixes from Igor Grinberg. Tested-by: Robert Jarzmik <[email protected]> Signed-off-by: Stephen Warren <[email protected]>
2012-07-12clocksource: dw_apb_timer: Add common DTS glue for dw_apb_timerDinh Nguyen1-0/+131
Make a common device tree glue for clocksource/dw_apb_timer. Move mach-picoxcell/time.c to be a generic device tree application of the dw_apb_timer. Configure mach-picoxcell to use the dw_apb_timer_of device tree implementation in drivers/clocksource. Signed-off-by: Pavel Machek <[email protected]> Signed-off-by: Dinh Nguyen <[email protected]> Acked-by: Jamie Iles <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>