irqs.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. #define IRQ_SPI2 (IRQ_SHPI_START + 6)
  21. #define IRQ_SPI0 (IRQ_SHPI_START + 8)
  22. #define IRQ_UART0 (IRQ_SHPI_START + 11)
  23. #define IRQ_I2C3 (IRQ_SHPI_START + 12)
  24. #define IRQ_SSP0 (IRQ_SHPI_START + 14)
  25. #define IRQ_MTU1 (IRQ_SHPI_START + 17)
  26. #define IRQ_RTC_RTT (IRQ_SHPI_START + 18)
  27. #define IRQ_UART1 (IRQ_SHPI_START + 19)
  28. #define IRQ_I2C0 (IRQ_SHPI_START + 21)
  29. #define IRQ_I2C1 (IRQ_SHPI_START + 22)
  30. #define IRQ_USBOTG (IRQ_SHPI_START + 23)
  31. #define IRQ_DMA (IRQ_SHPI_START + 25)
  32. #define IRQ_UART2 (IRQ_SHPI_START + 26)
  33. #define IRQ_HSIR_EXCEP (IRQ_SHPI_START + 29)
  34. #define IRQ_MSP0 (IRQ_SHPI_START + 31)
  35. #define IRQ_HSIR_CH0_OVRRUN (IRQ_SHPI_START + 32)
  36. #define IRQ_HSIR_CH1_OVRRUN (IRQ_SHPI_START + 33)
  37. #define IRQ_HSIR_CH2_OVRRUN (IRQ_SHPI_START + 34)
  38. #define IRQ_HSIR_CH3_OVRRUN (IRQ_SHPI_START + 35)
  39. #define IRQ_AB8500 (IRQ_SHPI_START + 40)
  40. #define IRQ_PRCMU (IRQ_SHPI_START + 47)
  41. #define IRQ_DISP (IRQ_SHPI_START + 48)
  42. #define IRQ_SiPI3 (IRQ_SHPI_START + 49)
  43. #define IRQ_I2C4 (IRQ_SHPI_START + 51)
  44. #define IRQ_SSP1 (IRQ_SHPI_START + 52)
  45. #define IRQ_I2C2 (IRQ_SHPI_START + 55)
  46. #define IRQ_SDMMC0 (IRQ_SHPI_START + 60)
  47. #define IRQ_MSP1 (IRQ_SHPI_START + 62)
  48. #define IRQ_SPI1 (IRQ_SHPI_START + 96)
  49. #define IRQ_MSP2 (IRQ_SHPI_START + 98)
  50. #define IRQ_SDMMC4 (IRQ_SHPI_START + 99)
  51. #define IRQ_HSIRD0 (IRQ_SHPI_START + 104)
  52. #define IRQ_HSIRD1 (IRQ_SHPI_START + 105)
  53. #define IRQ_HSITD0 (IRQ_SHPI_START + 106)
  54. #define IRQ_HSITD1 (IRQ_SHPI_START + 107)
  55. #define IRQ_GPIO0 (IRQ_SHPI_START + 119)
  56. #define IRQ_GPIO1 (IRQ_SHPI_START + 120)
  57. #define IRQ_GPIO2 (IRQ_SHPI_START + 121)
  58. #define IRQ_GPIO3 (IRQ_SHPI_START + 122)
  59. #define IRQ_GPIO4 (IRQ_SHPI_START + 123)
  60. #define IRQ_GPIO5 (IRQ_SHPI_START + 124)
  61. #define IRQ_GPIO6 (IRQ_SHPI_START + 125)
  62. #define IRQ_GPIO7 (IRQ_SHPI_START + 126)
  63. #define IRQ_GPIO8 (IRQ_SHPI_START + 127)
  64. /* There are 128 shared peripheral interrupts assigned to
  65. * INTID[160:32]. The first 32 interrupts are reserved.
  66. */
  67. #define DBX500_NR_INTERNAL_IRQS 161
  68. /* After chip-specific IRQ numbers we have the GPIO ones */
  69. #define NOMADIK_NR_GPIO 288
  70. #define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + DBX500_NR_INTERNAL_IRQS)
  71. #define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - DBX500_NR_INTERNAL_IRQS)
  72. #define IRQ_BOARD_START NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO)
  73. /* This will be overridden by board-specific irq headers */
  74. #define IRQ_BOARD_END IRQ_BOARD_START
  75. #ifdef CONFIG_MACH_U8500_MOP
  76. #include <mach/irqs-board-mop500.h>
  77. #endif
  78. /*
  79. * After the board specific IRQ:s we reserve a range of IRQ:s in which virtual
  80. * IRQ:s representing modem IRQ:s can be allocated
  81. */
  82. #define IRQ_MODEM_EVENTS_BASE (IRQ_BOARD_END + 1)
  83. #define IRQ_MODEM_EVENTS_NBR 72
  84. #define IRQ_MODEM_EVENTS_END (IRQ_MODEM_EVENTS_BASE + IRQ_MODEM_EVENTS_NBR)
  85. /* List of virtual IRQ:s that are allocated from the range above */
  86. #define MBOX_PAIR0_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 43)
  87. #define MBOX_PAIR1_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 45)
  88. #define MBOX_PAIR2_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 41)
  89. #define NR_IRQS IRQ_MODEM_EVENTS_END
  90. #endif /* ASM_ARCH_IRQS_H */