irq.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * include/asm-xtensa/irq.h
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 2001 - 2005 Tensilica Inc.
  9. */
  10. #ifndef _XTENSA_IRQ_H
  11. #define _XTENSA_IRQ_H
  12. #include <linux/init.h>
  13. #include <platform/hardware.h>
  14. #include <variant/core.h>
  15. #ifdef CONFIG_VARIANT_IRQ_SWITCH
  16. #include <variant/irq.h>
  17. #else
  18. static inline void variant_irq_enable(unsigned int irq) { }
  19. static inline void variant_irq_disable(unsigned int irq) { }
  20. #endif
  21. #ifndef VARIANT_NR_IRQS
  22. # define VARIANT_NR_IRQS 0
  23. #endif
  24. #ifndef PLATFORM_NR_IRQS
  25. # define PLATFORM_NR_IRQS 0
  26. #endif
  27. #define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS
  28. #define NR_IRQS (XTENSA_NR_IRQS + VARIANT_NR_IRQS + PLATFORM_NR_IRQS + 1)
  29. #define XTENSA_PIC_LINUX_IRQ(hwirq) ((hwirq) + 1)
  30. #if VARIANT_NR_IRQS == 0
  31. static inline void variant_init_irq(void) { }
  32. #else
  33. void variant_init_irq(void) __init;
  34. #endif
  35. static __inline__ int irq_canonicalize(int irq)
  36. {
  37. return (irq);
  38. }
  39. struct irqaction;
  40. struct irq_domain;
  41. void migrate_irqs(void);
  42. int xtensa_irq_domain_xlate(const u32 *intspec, unsigned int intsize,
  43. unsigned long int_irq, unsigned long ext_irq,
  44. unsigned long *out_hwirq, unsigned int *out_type);
  45. int xtensa_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw);
  46. unsigned xtensa_map_ext_irq(unsigned ext_irq);
  47. unsigned xtensa_get_ext_irq_no(unsigned irq);
  48. #endif /* _XTENSA_IRQ_H */