irq.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * linux/include/asm-arm/mach/irq.h
  3. *
  4. * Copyright (C) 1995-2000 Russell King.
  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_MACH_IRQ_H
  11. #define __ASM_ARM_MACH_IRQ_H
  12. #include <linux/irq.h>
  13. struct seq_file;
  14. /*
  15. * This is internal. Do not use it.
  16. */
  17. extern void (*init_arch_irq)(void);
  18. extern void init_FIQ(void);
  19. extern int show_fiq_list(struct seq_file *, void *);
  20. /*
  21. * Function wrappers
  22. */
  23. #define set_irq_chipdata(irq, d) set_irq_chip_data(irq, d)
  24. #define get_irq_chipdata(irq) get_irq_chip_data(irq)
  25. /*
  26. * Obsolete inline function for calling irq descriptor handlers.
  27. */
  28. static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc,
  29. struct pt_regs *regs)
  30. {
  31. desc->handle_irq(irq, desc, regs);
  32. }
  33. void set_irq_flags(unsigned int irq, unsigned int flags);
  34. #define IRQF_VALID (1 << 0)
  35. #define IRQF_PROBE (1 << 1)
  36. #define IRQF_NOAUTOEN (1 << 2)
  37. /*
  38. * This is for easy migration, but should be changed in the source
  39. */
  40. #define do_level_IRQ handle_level_irq
  41. #define do_edge_IRQ handle_edge_irq
  42. #define do_simple_IRQ handle_simple_irq
  43. #define irqdesc irq_desc
  44. #define irqchip irq_chip
  45. #define do_bad_IRQ(irq,desc,regs) \
  46. do { \
  47. spin_lock(&desc->lock); \
  48. handle_bad_irq(irq, desc, regs); \
  49. spin_unlock(&desc->lock); \
  50. } while(0)
  51. extern unsigned long irq_err_count;
  52. static inline void ack_bad_irq(int irq)
  53. {
  54. irq_err_count++;
  55. }
  56. #endif