irq.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * arch/arm/include/asm/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_FIQ(int);
  18. extern int show_fiq_list(struct seq_file *, int);
  19. /*
  20. * This is for easy migration, but should be changed in the source
  21. */
  22. #define do_bad_IRQ(irq,desc) \
  23. do { \
  24. raw_spin_lock(&desc->lock); \
  25. handle_bad_irq(irq, desc); \
  26. raw_spin_unlock(&desc->lock); \
  27. } while(0)
  28. #ifndef __ASSEMBLY__
  29. /*
  30. * Entry/exit functions for chained handlers where the primary IRQ chip
  31. * may implement either fasteoi or level-trigger flow control.
  32. */
  33. static inline void chained_irq_enter(struct irq_chip *chip,
  34. struct irq_desc *desc)
  35. {
  36. /* FastEOI controllers require no action on entry. */
  37. if (chip->irq_eoi)
  38. return;
  39. if (chip->irq_mask_ack) {
  40. chip->irq_mask_ack(&desc->irq_data);
  41. } else {
  42. chip->irq_mask(&desc->irq_data);
  43. if (chip->irq_ack)
  44. chip->irq_ack(&desc->irq_data);
  45. }
  46. }
  47. static inline void chained_irq_exit(struct irq_chip *chip,
  48. struct irq_desc *desc)
  49. {
  50. if (chip->irq_eoi)
  51. chip->irq_eoi(&desc->irq_data);
  52. else
  53. chip->irq_unmask(&desc->irq_data);
  54. }
  55. #endif
  56. #endif