localtimer.h 1021 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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/interrupt.h>
  13. struct clock_event_device;
  14. /*
  15. * Setup a per-cpu timer, whether it be a local timer or dummy broadcast
  16. */
  17. void percpu_timer_setup(void);
  18. #ifdef CONFIG_LOCAL_TIMERS
  19. #ifdef CONFIG_HAVE_ARM_TWD
  20. #include "smp_twd.h"
  21. #define local_timer_stop(c) twd_timer_stop((c))
  22. #else
  23. /*
  24. * Stop the local timer
  25. */
  26. void local_timer_stop(struct clock_event_device *);
  27. #endif
  28. /*
  29. * Setup a local timer interrupt for a CPU.
  30. */
  31. int local_timer_setup(struct clock_event_device *);
  32. #else
  33. static inline int local_timer_setup(struct clock_event_device *evt)
  34. {
  35. return -ENXIO;
  36. }
  37. static inline void local_timer_stop(struct clock_event_device *evt)
  38. {
  39. }
  40. #endif
  41. #endif