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