fiq.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * arch/arm/include/asm/fiq.h
  3. *
  4. * Support for FIQ on ARM architectures.
  5. * Written by Philip Blundell <philb@gnu.org>, 1998
  6. * Re-written by Russell King
  7. *
  8. * NOTE: The FIQ mode registers are not magically preserved across
  9. * suspend/resume.
  10. *
  11. * Drivers which require these registers to be preserved across power
  12. * management operations must implement appropriate suspend/resume handlers to
  13. * save and restore them.
  14. */
  15. #ifndef __ASM_FIQ_H
  16. #define __ASM_FIQ_H
  17. #include <asm/ptrace.h>
  18. struct fiq_handler {
  19. struct fiq_handler *next;
  20. /* Name
  21. */
  22. const char *name;
  23. /* Called to ask driver to relinquish/
  24. * reacquire FIQ
  25. * return zero to accept, or -<errno>
  26. */
  27. int (*fiq_op)(void *, int relinquish);
  28. /* data for the relinquish/reacquire functions
  29. */
  30. void *dev_id;
  31. };
  32. extern int claim_fiq(struct fiq_handler *f);
  33. extern void release_fiq(struct fiq_handler *f);
  34. extern void set_fiq_handler(void *start, unsigned int length);
  35. extern void enable_fiq(int fiq);
  36. extern void disable_fiq(int fiq);
  37. /* helpers defined in fiqasm.S: */
  38. extern void __set_fiq_regs(unsigned long const *regs);
  39. extern void __get_fiq_regs(unsigned long *regs);
  40. static inline void set_fiq_regs(struct pt_regs const *regs)
  41. {
  42. __set_fiq_regs(&regs->ARM_r8);
  43. }
  44. static inline void get_fiq_regs(struct pt_regs *regs)
  45. {
  46. __get_fiq_regs(&regs->ARM_r8);
  47. }
  48. #endif