irq.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (C) 2006 Atmark Techno, Inc.
  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. #ifndef _ASM_MICROBLAZE_IRQ_H
  9. #define _ASM_MICROBLAZE_IRQ_H
  10. /*
  11. * Linux IRQ# is currently offset by one to map to the hardware
  12. * irq number. So hardware IRQ0 maps to Linux irq 1.
  13. */
  14. #define NO_IRQ_OFFSET 1
  15. #define IRQ_OFFSET NO_IRQ_OFFSET
  16. #define NR_IRQS (32 + IRQ_OFFSET)
  17. #include <asm-generic/irq.h>
  18. /* This type is the placeholder for a hardware interrupt number. It has to
  19. * be big enough to enclose whatever representation is used by a given
  20. * platform.
  21. */
  22. typedef unsigned long irq_hw_number_t;
  23. extern unsigned int nr_irq;
  24. struct pt_regs;
  25. extern void do_IRQ(struct pt_regs *regs);
  26. /** FIXME - not implement
  27. * irq_dispose_mapping - Unmap an interrupt
  28. * @virq: linux virq number of the interrupt to unmap
  29. */
  30. static inline void irq_dispose_mapping(unsigned int virq)
  31. {
  32. return;
  33. }
  34. struct irq_host;
  35. /**
  36. * irq_create_mapping - Map a hardware interrupt into linux virq space
  37. * @host: host owning this hardware interrupt or NULL for default host
  38. * @hwirq: hardware irq number in that host space
  39. *
  40. * Only one mapping per hardware interrupt is permitted. Returns a linux
  41. * virq number.
  42. * If the sense/trigger is to be specified, set_irq_type() should be called
  43. * on the number returned from that call.
  44. */
  45. extern unsigned int irq_create_mapping(struct irq_host *host,
  46. irq_hw_number_t hwirq);
  47. #endif /* _ASM_MICROBLAZE_IRQ_H */