aboutsummaryrefslogtreecommitdiff
path: root/drivers/clocksource/timer-atmel-pit.c
AgeCommit message (Collapse)AuthorFilesLines
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-09-12clocksource/drivers/timer-atmel-pit: Simplify IRQ handlerAlexandre Belloni1-8/+3
Because the PIT is also a proper clocksource, the timekeeping code is already able to handle lost ticks. Reported-by: Thomas Gleixner <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2016-09-12clocksource/drivers/timer-atmel-pit: Remove uselesss WARN_ON_ONCEAlexandre Belloni1-6/+0
IRQ handlers are running with IRQ disabled for a while, remove wrong comment and useless test. Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2016-09-12clocksource/drivers/timer-atmel-pit: Drop at91sam926x_pit_common_initAlexandre Belloni1-45/+34
Merge at91sam926x_pit_common_init in at91sam926x_pit_dt_init as this is the only initialization method now. Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2016-08-29clocksource/drivers/atmel-pit: Fix compilation errorDaniel Lezcano1-0/+1
The previous fix introduced a check against the ret variable which is not defined, hence producing a compilation error: linux/drivers/clocksource/timer-atmel-pit.c: In function ‘at91sam926x_pit_dt_init’: linux/drivers/clocksource/timer-atmel-pit.c:264:2: error: ‘ret’ undeclared (first use in this function) ret = clk_prepare_enable(data->mck); ^ linux/drivers/clocksource/timer-atmel-pit.c:264:2: note: each undeclared identifier is reported only once for each function it appears in Add the missing the variable 'ret'. Fixes: 504f34c9e45c "clocksource/drivers/atmel-pit: Convert init function to return error" Signed-off-by: Daniel Lezcano <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2016-08-26clocksource/drivers/timer-atmel-pit: Enable mck clockAlexandre Belloni1-0/+6
mck is needed to get the PIT working. Explicitly prepare_enable it instead of assuming it is enabled. This solves an issue where the system is freezing when the ETM/ETB drivers are enabled. Reported-by: Olivier Schonken <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Signed-off-by: Daniel Lezcano <[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-pit: Convert init function to return errorDaniel Lezcano1-14/+29
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-08-10clockevents/drivers/timer-atmel-pit: Fix typo in structure initializationDaniel Lezcano1-2/+2
Reported-by: Peter Mamonov <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2015-08-10clockevents/drivers/atmel: Migrate to new 'set-state' interfaceViresh Kumar1-23/+18
Migrate atmel 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]>
2015-03-31clocksource/drivers/at91: Fix IO endiannessBen Dooks1-2/+2
Fix the use of __raw IO accessor with the readl/writel_relaxed() versions to allow the code to be used on a system running in big endian mode. Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Cc: Andrew Victor <[email protected]> Cc: Jean-Christophe Plagniol-Villard <[email protected]> Cc: Linux ARM Kernel <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2014-12-03ARM: at91/clocksource: remove !DT PIT initializationsArnd Bergmann1-32/+0
As AT91 !DT code is now removed, cleanup the PIT clocksource driver. Signed-off-by: Arnd Bergmann <[email protected]> [[email protected]: split patch] Signed-off-by: Nicolas Ferre <[email protected]> Acked-by: Maxime Ripard <[email protected]> Cc: Boris BREZILLON <[email protected]> Cc: Daniel Lezcano <[email protected]>
2014-09-15ARM: at91: PIT: Move the driver to drivers/clocksourceMaxime Ripard1-0/+296
Now that we don't depend on anyting in the mach-at91 directory, we can just move the driver to where it belongs. Signed-off-by: Maxime Ripard <[email protected]> Acked-by: Boris BREZILLON <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]> Conflicts: arch/arm/mach-at91/Kconfig arch/arm/mach-at91/Makefile