History log of /drivers/clocksource/dw_apb_timer_of.c
Revision Date Author Comments
0d24d1f2495ec4d6996c70c8edec202053cf7e69 13-May-2014 Yang Wei <Wei.Yang@windriver.com> clocksource: dw_apb_timer_of: Do not trace read_sched_clock

We do not need to trace read_sched_clock function,
so add notrace attribute for this function.

Signed-off-by: Yang Wei <Wei.Yang@windriver.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
9ab4727c1d41e50b67aecde4bf11879560a3ca78 10-Dec-2013 Dinh Nguyen <dinguyen@altera.com> clocksource: dw_apb_timer_of: Fix support for dts binding "snps,dw-apb-timer"

In commit 620f5e1cbf (dts: Rename DW APB timer compatible strings), both
"snps,dw-apb-timer-sp" and "snps,dw-apb-timer-osc" were deprecated in place
of "snps,dw-apb-timer". But the driver also needs to be udpated in order to
support this new binding "snps,dw-apb-timer".

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
85dc6ee1237c8a4a7742e6abab96a20389b7d682 10-Dec-2013 Dinh Nguyen <dinguyen@altera.com> clocksource: dw_apb_timer_of: Fix read_sched_clock

The read_sched_clock should return the ~value because the clock is a
countdown implementation. read_sched_clock() should be the same as
__apbt_read_clocksource().

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1cf0203ac9e3d7abed67196db494469b24fe09e3 01-Oct-2013 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> clocksource: dw_apb_timer_of: Mark a few more functions as __init

These are all only called by dw_apb_timer_init which is an __init
function, too

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
326e31eebe61dc838e031ea16968b2cfb43443e3 01-Oct-2013 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> clocksource: Put nodes passed to CLOCKSOURCE_OF_DECLARE callbacks centrally

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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: David Brown <davidb@codeaurora.org>
fa8296ae62364d80bb82c4c011469ae3e423d509 19-Jul-2013 Stephen Boyd <sboyd@codeaurora.org> clocksource: dw_apb_timer_of: 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.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
d3d8fee4138a06b4b9ca172d25b8412fc33ad3f3 18-Jun-2013 John Stultz <john.stultz@linaro.org> Revert "dw_apb_timer_of.c: Remove parts that were picoxcell-specific"

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 <dinguyen@altera.com>
Signed-off-by: John Stultz <john.stultz@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>
10021488997317d1121505a7ac659124c058efed 04-Jun-2013 Heiko Stuebner <heiko@sntech.de> clocksource: dw_apb_timer_of: use clocksource_of_init

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 <heiko@sntech.de>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Dinh Nguyen <dinguyen@altera.com>
a8b447f2bbbba737ff4478f498d7f83c75a9461b 04-Jun-2013 Heiko Stuebner <heiko@sntech.de> clocksource: dw_apb_timer_of: add clock-handling

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 <heiko@sntech.de>
Acked-by: Jamie Iles <jamie@jamieiles.com>
a1198f83407ae3421f3f58355a0f296d5ea6249c 04-Jun-2013 Heiko Stuebner <heiko@sntech.de> clocksource: dw_apb_timer_of: enable the use the clocksource as sched clock

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 <heiko@sntech.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jamie Iles <jamie@jamieiles.com>
1a33bd2be705cbb3f57d7223b60baea441039307 29-May-2013 Baruch Siach <baruch@tkos.co.il> clocksource: dw_apb: Fix error check

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: <stable@vger.kernel.org>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
0a0a7e66fa269de78975ea8d4e825a66d92b8d70 26-May-2013 Baruch Siach <baruch@tkos.co.il> clocksource: dw_apb: Remove unused header

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 <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jamie Iles <jamie@jamieiles.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
[tweaked commit message and header]
Signed-off-by: John Stultz <john.stultz@linaro.org>
55a68c23e0a675b2b8ac2656fd6edbf98b78e4c6 07-May-2013 Pavel Machek <pavel@denx.de> dw_apb_timer_of.c: Remove parts that were picoxcell-specific

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 <pavel@denx.de>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
6bb27d7349db51b50c40534710fe164ca0d58902 08-Nov-2012 Stephen Warren <swarren@nvidia.com> ARM: delete struct sys_timer

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 <robert.jarzmik@free.fr>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
cfda590178a16e2b5edb09e131460b3e64819807 11-Jul-2012 Dinh Nguyen <dinguyen@altera.com> clocksource: dw_apb_timer: Add common DTS glue for dw_apb_timer

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 <pavel@denx.de>
Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>