28 Jun, 2016
2 commits
-
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-ofSigned-off-by: Daniel Lezcano
For exynos_mct and samsung_pwm_timer:
Acked-by: Krzysztof KozlowskiFor arch/arc:
Acked-by: Vineet GuptaFor mediatek driver:
Acked-by: Matthias BruggerFor the Rockchip-part
Acked-by: Heiko StuebnerFor STi :
Acked-by: Patrice ChotardFor the mps2-timer.c and versatile.c changes:
Acked-by: Liviu DudauFor the OXNAS part :
Acked-by: Neil ArmstrongFor LPC32xx driver:
Acked-by: Sylvain LemieuxFor Broadcom Kona timer change:
Acked-by: Ray JuiFor Sun4i and Sun5i:
Acked-by: Chen-Yu TsaiFor Meson6:
Acked-by: Carlo CaioneFor Keystone:
Acked-by: Santosh ShilimkarFor NPS:
Acked-by: Noam CamusFor bcm2835:
Acked-by: Eric Anholt -
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 correctlyor
- 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
10 Aug, 2015
1 commit
-
Migrate timer-sp 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.There are few more changes worth noticing:
- The clockevent device was disabled by writing: 'TIMER_CTRL_32BIT |
TIMER_CTRL_IE' to ctrl register earlier. i.e. by un-setting the
TIMER_CTRL_ENABLE bit. Its done by writing zero now and should have
the same effect.- For shutdown and resume we were writing the same value twice to the
register (to disable the timer), which is fixed now.- Switching to oneshot mode was divided into two parts earlier:
- Firstly set_mode() was writing:
'TIMER_CTRL_32BIT | TIMER_CTRL_IE | TIMER_CTRL_ONESHOT'
to ctrl register (device not enabled yet)
- Then sp804_set_next_event() was enabling the device by writing
'readl(ctrl) | TIMER_CTRL_ENABLE' to the ctrl register. This was
unnecessarily complicated.
- Change this to: Stop device on set_state_oneshot and configure it in
sp804_set_next_event().Cc: Daniel Lezcano
Cc: Russell King
Cc: Sudeep Holla
Cc: Arnd Bergmann
Cc: Catalin Marinas
Cc: Olof Johansson
Signed-off-by: Viresh Kumar
Signed-off-by: Daniel Lezcano
02 Jun, 2015
1 commit
-
The ARM Dual-Timer SP804 module is peripheral found not only on ARM32
platforms but also on ARM64 platforms.This patch moves the driver out of arch/arm to driver/clocksource
so that it can be used on ARM64 platforms also.Cc: Daniel Lezcano
Cc: Rob Herring
Cc: Arnd Bergmann
Cc: Catalin Marinas
Cc: Olof Johansson
Acked-by: Thomas Gleixner
Signed-off-by: Sudeep Holla
Signed-off-by: Russell King