diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-07-06 12:09:19 +0200 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2015-08-10 11:40:55 +0200 |
commit | daea72831d3a18c561f028258ca5fb65ac3c8947 (patch) | |
tree | 51e673a12c05b4c7d295fd2590d69512873f74b1 /Documentation/volatile-considered-harmful.txt | |
parent | clockevents/drivers/timer-imx-gpt: Migrate to new 'set-state' interface (diff) | |
download | linux-daea72831d3a18c561f028258ca5fb65ac3c8947.tar.xz linux-daea72831d3a18c561f028258ca5fb65ac3c8947.zip |
clockevents/drivers/timer-sp804: Migrate to new 'set-state' interface
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 <daniel.lezcano@linaro.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Olof Johansson <olof@lixom.net>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'Documentation/volatile-considered-harmful.txt')
0 files changed, 0 insertions, 0 deletions