localtimer.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * arch/arm/include/asm/localtimer.h
  3. *
  4. * Copyright (C) 2004-2005 ARM Ltd.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __ASM_ARM_LOCALTIMER_H
  11. #define __ASM_ARM_LOCALTIMER_H
  12. #include <linux/errno.h>
  13. #include <linux/interrupt.h>
  14. struct clock_event_device;
  15. /*
  16. * Setup a per-cpu timer, whether it be a local timer or dummy broadcast
  17. */
  18. void percpu_timer_setup(void);
  19. #ifdef CONFIG_LOCAL_TIMERS
  20. #ifdef CONFIG_HAVE_ARM_TWD
  21. #include "smp_twd.h"
  22. #define local_timer_stop(c) twd_timer_stop((c))
  23. #else
  24. /*
  25. * Stop the local timer
  26. */
  27. void local_timer_stop(struct clock_event_device *);
  28. #endif
  29. /*
  30. * Setup a local timer interrupt for a CPU.
  31. */
  32. int local_timer_setup(struct clock_event_device *);
  33. #else
  34. static inline int local_timer_setup(struct clock_event_device *evt)
  35. {
  36. return -ENXIO;
  37. }
  38. static inline void local_timer_stop(struct clock_event_device *evt)
  39. {
  40. }
  41. #endif
  42. #endif