timer-sp804.h 848 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __CLKSOURCE_TIMER_SP804_H
  3. #define __CLKSOURCE_TIMER_SP804_H
  4. struct clk;
  5. int __sp804_clocksource_and_sched_clock_init(void __iomem *,
  6. const char *, struct clk *, int);
  7. int __sp804_clockevents_init(void __iomem *, unsigned int,
  8. struct clk *, const char *);
  9. void sp804_timer_disable(void __iomem *);
  10. static inline void sp804_clocksource_init(void __iomem *base, const char *name)
  11. {
  12. __sp804_clocksource_and_sched_clock_init(base, name, NULL, 0);
  13. }
  14. static inline void sp804_clocksource_and_sched_clock_init(void __iomem *base,
  15. const char *name)
  16. {
  17. __sp804_clocksource_and_sched_clock_init(base, name, NULL, 1);
  18. }
  19. static inline void sp804_clockevents_init(void __iomem *base, unsigned int irq, const char *name)
  20. {
  21. __sp804_clockevents_init(base, irq, NULL, name);
  22. }
  23. #endif