irq.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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)
  29. #if VARIANT_NR_IRQS == 0
  30. static inline void variant_init_irq(void) { }
  31. #else
  32. void variant_init_irq(void) __init;
  33. #endif
  34. static __inline__ int irq_canonicalize(int irq)
  35. {
  36. return (irq);
  37. }
  38. struct irqaction;
  39. #endif /* _XTENSA_IRQ_H */