irqs.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (C) 2008 STMicroelectronics
  3. * Copyright (C) 2009 ST-Ericsson.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. */
  10. #ifndef ASM_ARCH_IRQS_H
  11. #define ASM_ARCH_IRQS_H
  12. #include <mach/irqs-db5500.h>
  13. #include <mach/irqs-db8500.h>
  14. #define IRQ_LOCALTIMER 29
  15. #define IRQ_LOCALWDOG 30
  16. /* Shared Peripheral Interrupt (SHPI) */
  17. #define IRQ_SHPI_START 32
  18. /* Interrupt numbers generic for shared peripheral */
  19. #define IRQ_MTU0 (IRQ_SHPI_START + 4)
  20. /* There are 128 shared peripheral interrupts assigned to
  21. * INTID[160:32]. The first 32 interrupts are reserved.
  22. */
  23. #define DBX500_NR_INTERNAL_IRQS 161
  24. /* After chip-specific IRQ numbers we have the GPIO ones */
  25. #define NOMADIK_NR_GPIO 288
  26. #define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + DBX500_NR_INTERNAL_IRQS)
  27. #define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - DBX500_NR_INTERNAL_IRQS)
  28. #define IRQ_BOARD_START NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO)
  29. /* This will be overridden by board-specific irq headers */
  30. #define IRQ_BOARD_END IRQ_BOARD_START
  31. #ifdef CONFIG_MACH_U8500
  32. #include <mach/irqs-board-mop500.h>
  33. #endif
  34. /*
  35. * After the board specific IRQ:s we reserve a range of IRQ:s in which virtual
  36. * IRQ:s representing modem IRQ:s can be allocated
  37. */
  38. #define IRQ_MODEM_EVENTS_BASE (IRQ_BOARD_END + 1)
  39. #define IRQ_MODEM_EVENTS_NBR 72
  40. #define IRQ_MODEM_EVENTS_END (IRQ_MODEM_EVENTS_BASE + IRQ_MODEM_EVENTS_NBR)
  41. /* List of virtual IRQ:s that are allocated from the range above */
  42. #define MBOX_PAIR0_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 43)
  43. #define MBOX_PAIR1_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 45)
  44. #define MBOX_PAIR2_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 41)
  45. #define NR_IRQS IRQ_MODEM_EVENTS_END
  46. #endif /* ASM_ARCH_IRQS_H */