blob: a5b41f31a1c256afa3bb1017ebd840aa95399a52 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Sudeep Holla0b7402d2015-05-18 16:29:40 +01002#ifndef __CLKSOURCE_TIMER_SP804_H
3#define __CLKSOURCE_TIMER_SP804_H
4
Rob Herring7a0eca72013-03-25 11:23:52 -05005struct clk;
6
Daniel Lezcano2ef25382016-06-06 23:28:01 +02007int __sp804_clocksource_and_sched_clock_init(void __iomem *,
8 const char *, struct clk *, int);
9int __sp804_clockevents_init(void __iomem *, unsigned int,
10 struct clk *, const char *);
Sudeep Holla1e5f0512015-05-18 16:29:04 +010011void sp804_timer_disable(void __iomem *);
Rob Herringa7bf6162011-12-12 15:29:08 -060012
13static inline void sp804_clocksource_init(void __iomem *base, const char *name)
14{
Rob Herring7a0eca72013-03-25 11:23:52 -050015 __sp804_clocksource_and_sched_clock_init(base, name, NULL, 0);
Rob Herringa7bf6162011-12-12 15:29:08 -060016}
17
18static inline void sp804_clocksource_and_sched_clock_init(void __iomem *base,
19 const char *name)
20{
Rob Herring7a0eca72013-03-25 11:23:52 -050021 __sp804_clocksource_and_sched_clock_init(base, name, NULL, 1);
Rob Herringa7bf6162011-12-12 15:29:08 -060022}
23
Rob Herring7a0eca72013-03-25 11:23:52 -050024static 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 Holla0b7402d2015-05-18 16:29:40 +010029#endif