irq.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * include/asm-parisc/irq.h
  3. *
  4. * Copyright 2005 Matthew Wilcox <matthew@wil.cx>
  5. */
  6. #ifndef _ASM_PARISC_IRQ_H
  7. #define _ASM_PARISC_IRQ_H
  8. #include <linux/config.h>
  9. #include <asm/types.h>
  10. #define NO_IRQ (-1)
  11. #ifdef CONFIG_GSC
  12. #define GSC_IRQ_BASE 16
  13. #define GSC_IRQ_MAX 63
  14. #define CPU_IRQ_BASE 64
  15. #else
  16. #define CPU_IRQ_BASE 16
  17. #endif
  18. #define TIMER_IRQ (CPU_IRQ_BASE + 0)
  19. #define IPI_IRQ (CPU_IRQ_BASE + 1)
  20. #define CPU_IRQ_MAX (CPU_IRQ_BASE + (BITS_PER_LONG - 1))
  21. #define NR_IRQS (CPU_IRQ_MAX + 1)
  22. /*
  23. * IRQ line status macro IRQ_PER_CPU is used
  24. */
  25. #define ARCH_HAS_IRQ_PER_CPU
  26. static __inline__ int irq_canonicalize(int irq)
  27. {
  28. return (irq == 2) ? 9 : irq;
  29. }
  30. struct hw_interrupt_type;
  31. /*
  32. * Some useful "we don't have to do anything here" handlers. Should
  33. * probably be provided by the generic code.
  34. */
  35. void no_ack_irq(unsigned int irq);
  36. void no_end_irq(unsigned int irq);
  37. extern int txn_alloc_irq(unsigned int nbits);
  38. extern int txn_claim_irq(int);
  39. extern unsigned int txn_alloc_data(unsigned int);
  40. extern unsigned long txn_alloc_addr(unsigned int);
  41. extern int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *, void *);
  42. extern int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *, void *);
  43. /* soft power switch support (power.c) */
  44. extern struct tasklet_struct power_tasklet;
  45. #endif /* _ASM_PARISC_IRQ_H */