Sudeep Holla | 0b7402d | 2015-05-18 16:29:40 +0100 | [diff] [blame] | 1 | #ifndef __CLKSOURCE_TIMER_SP804_H |
| 2 | #define __CLKSOURCE_TIMER_SP804_H |
| 3 | |
Rob Herring | 7a0eca7 | 2013-03-25 11:23:52 -0500 | [diff] [blame] | 4 | struct clk; |
| 5 | |
Daniel Lezcano | 2ef2538 | 2016-06-06 23:28:01 +0200 | [diff] [blame] | 6 | int __sp804_clocksource_and_sched_clock_init(void __iomem *, |
| 7 | const char *, struct clk *, int); |
| 8 | int __sp804_clockevents_init(void __iomem *, unsigned int, |
| 9 | struct clk *, const char *); |
Sudeep Holla | 1e5f051 | 2015-05-18 16:29:04 +0100 | [diff] [blame] | 10 | void sp804_timer_disable(void __iomem *); |
Rob Herring | a7bf616 | 2011-12-12 15:29:08 -0600 | [diff] [blame] | 11 | |
| 12 | static inline void sp804_clocksource_init(void __iomem *base, const char *name) |
| 13 | { |
Rob Herring | 7a0eca7 | 2013-03-25 11:23:52 -0500 | [diff] [blame] | 14 | __sp804_clocksource_and_sched_clock_init(base, name, NULL, 0); |
Rob Herring | a7bf616 | 2011-12-12 15:29:08 -0600 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | static inline void sp804_clocksource_and_sched_clock_init(void __iomem *base, |
| 18 | const char *name) |
| 19 | { |
Rob Herring | 7a0eca7 | 2013-03-25 11:23:52 -0500 | [diff] [blame] | 20 | __sp804_clocksource_and_sched_clock_init(base, name, NULL, 1); |
Rob Herring | a7bf616 | 2011-12-12 15:29:08 -0600 | [diff] [blame] | 21 | } |
| 22 | |
Rob Herring | 7a0eca7 | 2013-03-25 11:23:52 -0500 | [diff] [blame] | 23 | static inline void sp804_clockevents_init(void __iomem *base, unsigned int irq, const char *name) |
| 24 | { |
| 25 | __sp804_clockevents_init(base, irq, NULL, name); |
| 26 | |
| 27 | } |
Sudeep Holla | 0b7402d | 2015-05-18 16:29:40 +0100 | [diff] [blame] | 28 | #endif |