Linux 2.6.20.13
[linux/fpc-iii.git] / include / asm-arm / arch-pxa / irqs.h
blob67ed43674c635a66a3a947accb3a757810fdd260
1 /*
2 * linux/include/asm-arm/arch-pxa/irqs.h
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
14 #ifdef CONFIG_PXA27x
15 #define PXA_IRQ_SKIP 0
16 #else
17 #define PXA_IRQ_SKIP 7
18 #endif
20 #define PXA_IRQ(x) ((x) - PXA_IRQ_SKIP)
22 #define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */
23 #define IRQ_MSL PXA_IRQ(1) /* MSL Interface interrupt */
24 #define IRQ_USBH2 PXA_IRQ(2) /* USB Host interrupt 1 (OHCI) */
25 #define IRQ_USBH1 PXA_IRQ(3) /* USB Host interrupt 2 (non-OHCI) */
26 #define IRQ_KEYPAD PXA_IRQ(4) /* Key pad controller */
27 #define IRQ_MEMSTK PXA_IRQ(5) /* Memory Stick interrupt */
28 #define IRQ_PWRI2C PXA_IRQ(6) /* Power I2C interrupt */
29 #define IRQ_HWUART PXA_IRQ(7) /* HWUART Transmit/Receive/Error (PXA26x) */
30 #define IRQ_OST_4_11 PXA_IRQ(7) /* OS timer 4-11 matches (PXA27x) */
31 #define IRQ_GPIO0 PXA_IRQ(8) /* GPIO0 Edge Detect */
32 #define IRQ_GPIO1 PXA_IRQ(9) /* GPIO1 Edge Detect */
33 #define IRQ_GPIO_2_x PXA_IRQ(10) /* GPIO[2-x] Edge Detect */
34 #define IRQ_USB PXA_IRQ(11) /* USB Service */
35 #define IRQ_PMU PXA_IRQ(12) /* Performance Monitoring Unit */
36 #define IRQ_I2S PXA_IRQ(13) /* I2S Interrupt */
37 #define IRQ_AC97 PXA_IRQ(14) /* AC97 Interrupt */
38 #define IRQ_ASSP PXA_IRQ(15) /* Audio SSP Service Request (PXA25x) */
39 #define IRQ_USIM PXA_IRQ(15) /* Smart Card interface interrupt (PXA27x) */
40 #define IRQ_NSSP PXA_IRQ(16) /* Network SSP Service Request (PXA25x) */
41 #define IRQ_SSP2 PXA_IRQ(16) /* SSP2 interrupt (PXA27x) */
42 #define IRQ_LCD PXA_IRQ(17) /* LCD Controller Service Request */
43 #define IRQ_I2C PXA_IRQ(18) /* I2C Service Request */
44 #define IRQ_ICP PXA_IRQ(19) /* ICP Transmit/Receive/Error */
45 #define IRQ_STUART PXA_IRQ(20) /* STUART Transmit/Receive/Error */
46 #define IRQ_BTUART PXA_IRQ(21) /* BTUART Transmit/Receive/Error */
47 #define IRQ_FFUART PXA_IRQ(22) /* FFUART Transmit/Receive/Error*/
48 #define IRQ_MMC PXA_IRQ(23) /* MMC Status/Error Detection */
49 #define IRQ_SSP PXA_IRQ(24) /* SSP Service Request */
50 #define IRQ_DMA PXA_IRQ(25) /* DMA Channel Service Request */
51 #define IRQ_OST0 PXA_IRQ(26) /* OS Timer match 0 */
52 #define IRQ_OST1 PXA_IRQ(27) /* OS Timer match 1 */
53 #define IRQ_OST2 PXA_IRQ(28) /* OS Timer match 2 */
54 #define IRQ_OST3 PXA_IRQ(29) /* OS Timer match 3 */
55 #define IRQ_RTC1Hz PXA_IRQ(30) /* RTC HZ Clock Tick */
56 #define IRQ_RTCAlrm PXA_IRQ(31) /* RTC Alarm */
58 #ifdef CONFIG_PXA27x
59 #define IRQ_TPM PXA_IRQ(32) /* TPM interrupt */
60 #define IRQ_CAMERA PXA_IRQ(33) /* Camera Interface */
62 #define PXA_INTERNAL_IRQS 34
63 #else
64 #define PXA_INTERNAL_IRQS 32
65 #endif
67 #define GPIO_2_x_TO_IRQ(x) \
68 PXA_IRQ((x) - 2 + PXA_INTERNAL_IRQS)
69 #define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x))
71 #define IRQ_TO_GPIO_2_x(i) \
72 ((i) - IRQ_GPIO(2) + 2)
73 #define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i))
75 #if defined(CONFIG_PXA25x)
76 #define PXA_LAST_GPIO 84
77 #elif defined(CONFIG_PXA27x)
78 #define PXA_LAST_GPIO 127
79 #endif
82 * The next 16 interrupts are for board specific purposes. Since
83 * the kernel can only run on one machine at a time, we can re-use
84 * these. If you need more, increase IRQ_BOARD_END, but keep it
85 * within sensible limits.
87 #define IRQ_BOARD_START (IRQ_GPIO(PXA_LAST_GPIO) + 1)
88 #define IRQ_BOARD_END (IRQ_BOARD_START + 16)
90 #define IRQ_SA1111_START (IRQ_BOARD_END)
91 #define IRQ_GPAIN0 (IRQ_BOARD_END + 0)
92 #define IRQ_GPAIN1 (IRQ_BOARD_END + 1)
93 #define IRQ_GPAIN2 (IRQ_BOARD_END + 2)
94 #define IRQ_GPAIN3 (IRQ_BOARD_END + 3)
95 #define IRQ_GPBIN0 (IRQ_BOARD_END + 4)
96 #define IRQ_GPBIN1 (IRQ_BOARD_END + 5)
97 #define IRQ_GPBIN2 (IRQ_BOARD_END + 6)
98 #define IRQ_GPBIN3 (IRQ_BOARD_END + 7)
99 #define IRQ_GPBIN4 (IRQ_BOARD_END + 8)
100 #define IRQ_GPBIN5 (IRQ_BOARD_END + 9)
101 #define IRQ_GPCIN0 (IRQ_BOARD_END + 10)
102 #define IRQ_GPCIN1 (IRQ_BOARD_END + 11)
103 #define IRQ_GPCIN2 (IRQ_BOARD_END + 12)
104 #define IRQ_GPCIN3 (IRQ_BOARD_END + 13)
105 #define IRQ_GPCIN4 (IRQ_BOARD_END + 14)
106 #define IRQ_GPCIN5 (IRQ_BOARD_END + 15)
107 #define IRQ_GPCIN6 (IRQ_BOARD_END + 16)
108 #define IRQ_GPCIN7 (IRQ_BOARD_END + 17)
109 #define IRQ_MSTXINT (IRQ_BOARD_END + 18)
110 #define IRQ_MSRXINT (IRQ_BOARD_END + 19)
111 #define IRQ_MSSTOPERRINT (IRQ_BOARD_END + 20)
112 #define IRQ_TPTXINT (IRQ_BOARD_END + 21)
113 #define IRQ_TPRXINT (IRQ_BOARD_END + 22)
114 #define IRQ_TPSTOPERRINT (IRQ_BOARD_END + 23)
115 #define SSPXMTINT (IRQ_BOARD_END + 24)
116 #define SSPRCVINT (IRQ_BOARD_END + 25)
117 #define SSPROR (IRQ_BOARD_END + 26)
118 #define AUDXMTDMADONEA (IRQ_BOARD_END + 32)
119 #define AUDRCVDMADONEA (IRQ_BOARD_END + 33)
120 #define AUDXMTDMADONEB (IRQ_BOARD_END + 34)
121 #define AUDRCVDMADONEB (IRQ_BOARD_END + 35)
122 #define AUDTFSR (IRQ_BOARD_END + 36)
123 #define AUDRFSR (IRQ_BOARD_END + 37)
124 #define AUDTUR (IRQ_BOARD_END + 38)
125 #define AUDROR (IRQ_BOARD_END + 39)
126 #define AUDDTS (IRQ_BOARD_END + 40)
127 #define AUDRDD (IRQ_BOARD_END + 41)
128 #define AUDSTO (IRQ_BOARD_END + 42)
129 #define IRQ_USBPWR (IRQ_BOARD_END + 43)
130 #define IRQ_HCIM (IRQ_BOARD_END + 44)
131 #define IRQ_HCIBUFFACC (IRQ_BOARD_END + 45)
132 #define IRQ_HCIRMTWKP (IRQ_BOARD_END + 46)
133 #define IRQ_NHCIMFCIR (IRQ_BOARD_END + 47)
134 #define IRQ_USB_PORT_RESUME (IRQ_BOARD_END + 48)
135 #define IRQ_S0_READY_NINT (IRQ_BOARD_END + 49)
136 #define IRQ_S1_READY_NINT (IRQ_BOARD_END + 50)
137 #define IRQ_S0_CD_VALID (IRQ_BOARD_END + 51)
138 #define IRQ_S1_CD_VALID (IRQ_BOARD_END + 52)
139 #define IRQ_S0_BVD1_STSCHG (IRQ_BOARD_END + 53)
140 #define IRQ_S1_BVD1_STSCHG (IRQ_BOARD_END + 54)
142 #define IRQ_LOCOMO_START (IRQ_BOARD_END)
143 #define IRQ_LOCOMO_KEY (IRQ_BOARD_END + 0)
144 #define IRQ_LOCOMO_GPIO0 (IRQ_BOARD_END + 1)
145 #define IRQ_LOCOMO_GPIO1 (IRQ_BOARD_END + 2)
146 #define IRQ_LOCOMO_GPIO2 (IRQ_BOARD_END + 3)
147 #define IRQ_LOCOMO_GPIO3 (IRQ_BOARD_END + 4)
148 #define IRQ_LOCOMO_GPIO4 (IRQ_BOARD_END + 5)
149 #define IRQ_LOCOMO_GPIO5 (IRQ_BOARD_END + 6)
150 #define IRQ_LOCOMO_GPIO6 (IRQ_BOARD_END + 7)
151 #define IRQ_LOCOMO_GPIO7 (IRQ_BOARD_END + 8)
152 #define IRQ_LOCOMO_GPIO8 (IRQ_BOARD_END + 9)
153 #define IRQ_LOCOMO_GPIO9 (IRQ_BOARD_END + 10)
154 #define IRQ_LOCOMO_GPIO10 (IRQ_BOARD_END + 11)
155 #define IRQ_LOCOMO_GPIO11 (IRQ_BOARD_END + 12)
156 #define IRQ_LOCOMO_GPIO12 (IRQ_BOARD_END + 13)
157 #define IRQ_LOCOMO_GPIO13 (IRQ_BOARD_END + 14)
158 #define IRQ_LOCOMO_GPIO14 (IRQ_BOARD_END + 15)
159 #define IRQ_LOCOMO_GPIO15 (IRQ_BOARD_END + 16)
160 #define IRQ_LOCOMO_LT (IRQ_BOARD_END + 17)
161 #define IRQ_LOCOMO_SPI_RFR (IRQ_BOARD_END + 18)
162 #define IRQ_LOCOMO_SPI_RFW (IRQ_BOARD_END + 19)
163 #define IRQ_LOCOMO_SPI_OVRN (IRQ_BOARD_END + 20)
164 #define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21)
167 * Figure out the MAX IRQ number.
169 * If we have an SA1111, the max IRQ is S1_BVD1_STSCHG+1.
170 * If we have an LoCoMo, the max IRQ is IRQ_LOCOMO_SPI_TEND+1
171 * Otherwise, we have the standard IRQs only.
173 #ifdef CONFIG_SA1111
174 #define NR_IRQS (IRQ_S1_BVD1_STSCHG + 1)
175 #elif defined(CONFIG_SHARP_LOCOMO)
176 #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1)
177 #elif defined(CONFIG_ARCH_LUBBOCK) || \
178 defined(CONFIG_MACH_LOGICPD_PXA270) || \
179 defined(CONFIG_MACH_MAINSTONE)
180 #define NR_IRQS (IRQ_BOARD_END)
181 #else
182 #define NR_IRQS (IRQ_BOARD_START)
183 #endif
186 * Board specific IRQs. Define them here.
187 * Do not surround them with ifdefs.
189 #define LUBBOCK_IRQ(x) (IRQ_BOARD_START + (x))
190 #define LUBBOCK_SD_IRQ LUBBOCK_IRQ(0)
191 #define LUBBOCK_SA1111_IRQ LUBBOCK_IRQ(1)
192 #define LUBBOCK_USB_IRQ LUBBOCK_IRQ(2) /* usb connect */
193 #define LUBBOCK_ETH_IRQ LUBBOCK_IRQ(3)
194 #define LUBBOCK_UCB1400_IRQ LUBBOCK_IRQ(4)
195 #define LUBBOCK_BB_IRQ LUBBOCK_IRQ(5)
196 #define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */
197 #define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6)
199 #define LPD270_IRQ(x) (IRQ_BOARD_START + (x))
200 #define LPD270_USBC_IRQ LPD270_IRQ(2)
201 #define LPD270_ETHERNET_IRQ LPD270_IRQ(3)
202 #define LPD270_AC97_IRQ LPD270_IRQ(4)
204 #define MAINSTONE_IRQ(x) (IRQ_BOARD_START + (x))
205 #define MAINSTONE_MMC_IRQ MAINSTONE_IRQ(0)
206 #define MAINSTONE_USIM_IRQ MAINSTONE_IRQ(1)
207 #define MAINSTONE_USBC_IRQ MAINSTONE_IRQ(2)
208 #define MAINSTONE_ETHERNET_IRQ MAINSTONE_IRQ(3)
209 #define MAINSTONE_AC97_IRQ MAINSTONE_IRQ(4)
210 #define MAINSTONE_PEN_IRQ MAINSTONE_IRQ(5)
211 #define MAINSTONE_MSINS_IRQ MAINSTONE_IRQ(6)
212 #define MAINSTONE_EXBRD_IRQ MAINSTONE_IRQ(7)
213 #define MAINSTONE_S0_CD_IRQ MAINSTONE_IRQ(9)
214 #define MAINSTONE_S0_STSCHG_IRQ MAINSTONE_IRQ(10)
215 #define MAINSTONE_S0_IRQ MAINSTONE_IRQ(11)
216 #define MAINSTONE_S1_CD_IRQ MAINSTONE_IRQ(13)
217 #define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14)
218 #define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15)
220 /* LoCoMo Interrupts (CONFIG_SHARP_LOCOMO) */
221 #define IRQ_LOCOMO_KEY_BASE (IRQ_BOARD_START + 0)
222 #define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1)
223 #define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2)
224 #define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3)