aboutsummaryrefslogtreecommitdiff
path: root/drivers/clocksource/timer-atmel-st.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156Thomas Gleixner1-14/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 59 temple place suite 330 boston ma 02111 1307 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1334 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Richard Fontana <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-06-14clocksource/drivers: Rename CLOCKSOURCE_OF_DECLARE to TIMER_OF_DECLAREDaniel Lezcano1-1/+1
The CLOCKSOURCE_OF_DECLARE macro is used widely for the timers to declare the clocksource at early stage. However, this macro is also used to initialize the clockevent if any, or the clockevent only. It was originally suggested to declare another macro to initialize a clockevent, so in order to separate the two entities even they belong to the same IP. This was not accepted because of the impact on the DT where splitting a clocksource/clockevent definition does not make sense as it is a Linux concept not a hardware description. On the other side, the clocksource has not interrupt declared while the clockevent has, so it is easy from the driver to know if the description is for a clockevent or a clocksource, IOW it could be implemented at the driver level. So instead of dealing with a named clocksource macro, let's use a more generic one: TIMER_OF_DECLARE. The patch has not functional changes. Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Heiko Stuebner <[email protected]> Acked-by: Neil Armstrong <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Matthias Brugger <[email protected]> Reviewed-by: Linus Walleij <[email protected]>
2016-12-25clocksource: Use a plain u64 instead of cycle_tThomas Gleixner1-1/+1
There is no point in having an extra type for extra confusion. u64 is unambiguous. Conversion was done with the following coccinelle script: @rem@ @@ -typedef u64 cycle_t; @fix@ typedef cycle_t; @@ -cycle_t +u64 Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: John Stultz <[email protected]>
2016-06-28clocksources: Switch back to the clksrc tableDaniel Lezcano1-1/+1
All the clocksource drivers's init function are now converted to return an error code. CLOCKSOURCE_OF_DECLARE is no longer used as well as the clksrc-of table. Let's convert back the names: - CLOCKSOURCE_OF_DECLARE_RET => CLOCKSOURCE_OF_DECLARE - clksrc-of-ret => clksrc-of Signed-off-by: Daniel Lezcano <[email protected]> For exynos_mct and samsung_pwm_timer: Acked-by: Krzysztof Kozlowski <[email protected]> For arch/arc: Acked-by: Vineet Gupta <[email protected]> For mediatek driver: Acked-by: Matthias Brugger <[email protected]> For the Rockchip-part Acked-by: Heiko Stuebner <[email protected]> For STi : Acked-by: Patrice Chotard <[email protected]> For the mps2-timer.c and versatile.c changes: Acked-by: Liviu Dudau <[email protected]> For the OXNAS part : Acked-by: Neil Armstrong <[email protected]> For LPC32xx driver: Acked-by: Sylvain Lemieux <[email protected]> For Broadcom Kona timer change: Acked-by: Ray Jui <[email protected]> For Sun4i and Sun5i: Acked-by: Chen-Yu Tsai <[email protected]> For Meson6: Acked-by: Carlo Caione <[email protected]> For Keystone: Acked-by: Santosh Shilimkar <[email protected]> For NPS: Acked-by: Noam Camus <[email protected]> For bcm2835: Acked-by: Eric Anholt <[email protected]>
2016-06-28clocksource/drivers/atmel-st: Convert init function to return errorDaniel Lezcano1-16/+28
The init functions do not return any error. They behave as the following: - panic, thus leading to a kernel crash while another timer may work and make the system boot up correctly or - print an error and let the caller unaware if the state of the system Change that by converting the init functions to return an error conforming to the CLOCKSOURCE_OF_RET prototype. Proper error handling (rollback, errno value) will be changed later case by case, thus this change just return back an error or success in the init function. Signed-off-by: Daniel Lezcano <[email protected]>
2015-10-06clocksource: atmel-st: get and use slow clockAlexandre Belloni1-9/+22
The current slow clock rate is hardcoded. Properly get the slow clock and use its rate. Signed-off-by: Alexandre Belloni <[email protected]> Acked-by: Daniel Lezcano <[email protected]>
2015-08-10clockevents/drivers/atmel-st: Migrate to new 'set-state' interfaceViresh Kumar1-27/+42
Migrate atmel-st driver to the new 'set-state' interface provided by clockevents core, the earlier 'set-mode' interface is marked obsolete now. This also enables us to implement callbacks for new states of clockevent devices, for example: ONESHOT_STOPPED. Cc: Nicolas Ferre <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: Jean-Christophe Plagniol-Villard <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Tested-by: Alexandre Belloni <[email protected]>
2015-03-16clocksource: atmel-st: remove mach/hardware dependencyAlexandre Belloni1-14/+9
Remove the mach/hardware dependency to prepare the driver for multiplatform support. Also switch from setup_irq() to request_irq() Signed-off-by: Alexandre Belloni <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]>
2015-03-16clocksource: atmel-st: use syscon/regmapAlexandre Belloni1-59/+35
The register range from the system timer is also used by the watchdog driver. Use a regmap to handle concurrent accesses. Signed-off-by: Alexandre Belloni <[email protected]> Acked-by: Boris Brezillon <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]>
2015-03-16ARM: at91: time: move the system timer driver to drivers/clocksourceAlexandre Belloni1-0/+253
Import at91rm9200_time.c from mach-at91 as timer-atmel-st.c. Further cleanup is required to get rid of the mach-at91 headers. Signed-off-by: Alexandre Belloni <[email protected]> Acked-by: Boris Brezillon <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]>