summaryrefslogtreecommitdiff
path: root/drivers/clocksource/timer-keystone.c
AgeCommit message (Collapse)AuthorFilesLines
2015-09-29clocksource/drivers/keystone: Fix bad NO_IRQ usageDaniel Lezcano1-1/+1
The current code assumes the 'irq_of_parse_and_map' will return NO_IRQ in case of failure. Unfortunately, the NO_IRQ is not consistent across the different architectures and we must not rely on it. NO_IRQ is equal to '-1' on ARM and 'irq_of_parse_and_map' returns '0' in case of an error. Hence, the latter won't be detected and will lead to a crash. Fix this by just checking 'irq' is different from zero. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-08-10clockevents/drivers/keystone: Migrate to new 'set-state' interfaceViresh Kumar1-28/+16
Migrate keystone 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. Also pass the mode-mask to keystone_timer_config() instead of the mode as mode macro's aren't valid anymore. Cc: Santosh Shilimkar <ssantosh@kernel.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2014-03-12clocksource: timer-keystone: Delete unnecessary variableMatthias Brugger1-4/+1
Commit 438e0bff5257 added the timer-keystone device driver but make use of an unnecessary variable in the init function. This patch deletes this variable. Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2014-03-12clocksource: timer-keystone: introduce clocksource driver for KeystoneIvan Khoronzhuk1-0/+244
Add broadcast clock-event device for the Keystone arch. The timer can be configured as a general-purpose 64-bit timer, dual general-purpose 32-bit timers. When configured as dual 32-bit timers, each half can operate in conjunction (chain mode) or independently (unchained mode) of each other. Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Santosh shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>