blob: 7654d71243dd7104dc9f1d07647020500d5481b7 [file] [log] [blame]
Sudeep Holla0b7402d2015-05-18 16:29:40 +01001#ifndef __CLKSOURCE_TIMER_SP804_H
2#define __CLKSOURCE_TIMER_SP804_H
3
Rob Herring7a0eca72013-03-25 11:23:52 -05004struct clk;
5
Daniel Lezcano2ef25382016-06-06 23:28:01 +02006int __sp804_clocksource_and_sched_clock_init(void __iomem *,
7 const char *, struct clk *, int);
8int __sp804_clockevents_init(void __iomem *, unsigned int,
9 struct clk *, const char *);
Sudeep Holla1e5f0512015-05-18 16:29:04 +010010void sp804_timer_disable(void __iomem *);
Rob Herringa7bf6162011-12-12 15:29:08 -060011
12static inline void sp804_clocksource_init(void __iomem *base, const char *name)
13{
Rob Herring7a0eca72013-03-25 11:23:52 -050014 __sp804_clocksource_and_sched_clock_init(base, name, NULL, 0);
Rob Herringa7bf6162011-12-12 15:29:08 -060015}
16
17static inline void sp804_clocksource_and_sched_clock_init(void __iomem *base,
18 const char *name)
19{
Rob Herring7a0eca72013-03-25 11:23:52 -050020 __sp804_clocksource_and_sched_clock_init(base, name, NULL, 1);
Rob Herringa7bf6162011-12-12 15:29:08 -060021}
22
Rob Herring7a0eca72013-03-25 11:23:52 -050023static 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 Holla0b7402d2015-05-18 16:29:40 +010028#endif