irq.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. #define NR_IRQS_LEGACY 8 /* Legacy external IRQ0-7 */
  11. /*
  12. * Convert back and forth between INTEVT and IRQ values.
  13. */
  14. #ifdef CONFIG_CPU_HAS_INTEVT
  15. #define evt2irq(evt) (((evt) >> 5) - 16)
  16. #define irq2evt(irq) (((irq) + 16) << 5)
  17. #else
  18. #define evt2irq(evt) (evt)
  19. #define irq2evt(irq) (irq)
  20. #endif
  21. /*
  22. * Simple Mask Register Support
  23. */
  24. extern void make_maskreg_irq(unsigned int irq);
  25. extern unsigned short *irq_mask_register;
  26. /*
  27. * PINT IRQs
  28. */
  29. void init_IRQ_pint(void);
  30. void make_imask_irq(unsigned int irq);
  31. static inline int generic_irq_demux(int irq)
  32. {
  33. return irq;
  34. }
  35. #define irq_demux(irq) sh_mv.mv_irq_demux(irq)
  36. void init_IRQ(void);
  37. asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs);
  38. #ifdef CONFIG_IRQSTACKS
  39. extern void irq_ctx_init(int cpu);
  40. extern void irq_ctx_exit(int cpu);
  41. # define __ARCH_HAS_DO_SOFTIRQ
  42. #else
  43. # define irq_ctx_init(cpu) do { } while (0)
  44. # define irq_ctx_exit(cpu) do { } while (0)
  45. #endif
  46. #include <asm-generic/irq.h>
  47. #ifdef CONFIG_CPU_SH5
  48. #include <cpu/irq.h>
  49. #endif
  50. #endif /* __ASM_SH_IRQ_H */