irq.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef __ASM_SH_IRQ_H
  2. #define __ASM_SH_IRQ_H
  3. #include <asm/machvec.h>
  4. /*
  5. * A sane default based on a reasonable vector table size, platforms are
  6. * advised to cap this at the hard limit that they're interested in
  7. * through the machvec.
  8. */
  9. #define NR_IRQS 256
  10. /*
  11. * Convert back and forth between INTEVT and IRQ values.
  12. */
  13. #ifdef CONFIG_CPU_HAS_INTEVT
  14. #define evt2irq(evt) (((evt) >> 5) - 16)
  15. #define irq2evt(irq) (((irq) + 16) << 5)
  16. #else
  17. #define evt2irq(evt) (evt)
  18. #define irq2evt(irq) (irq)
  19. #endif
  20. /*
  21. * Simple Mask Register Support
  22. */
  23. extern void make_maskreg_irq(unsigned int irq);
  24. extern unsigned short *irq_mask_register;
  25. /*
  26. * PINT IRQs
  27. */
  28. void init_IRQ_pint(void);
  29. void make_imask_irq(unsigned int irq);
  30. static inline int generic_irq_demux(int irq)
  31. {
  32. return irq;
  33. }
  34. #define irq_canonicalize(irq) (irq)
  35. #define irq_demux(irq) sh_mv.mv_irq_demux(irq)
  36. #ifdef CONFIG_IRQSTACKS
  37. extern void irq_ctx_init(int cpu);
  38. extern void irq_ctx_exit(int cpu);
  39. # define __ARCH_HAS_DO_SOFTIRQ
  40. #else
  41. # define irq_ctx_init(cpu) do { } while (0)
  42. # define irq_ctx_exit(cpu) do { } while (0)
  43. #endif
  44. #ifdef CONFIG_CPU_SH5
  45. #include <cpu/irq.h>
  46. #endif
  47. #endif /* __ASM_SH_IRQ_H */