Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright (c) 2003-2005 Simtec Electronics
0004  *   Ben Dooks <ben@simtec.co.uk>
0005  */
0006 
0007 
0008 #ifndef __ASM_ARCH_IRQS_H
0009 #define __ASM_ARCH_IRQS_H __FILE__
0010 
0011 /* we keep the first set of CPU IRQs out of the range of
0012  * the ISA space, so that the PC104 has them to itself
0013  * and we don't end up having to do horrible things to the
0014  * standard ISA drivers....
0015  */
0016 
0017 #define S3C2410_CPUIRQ_OFFSET    (16)
0018 
0019 #define S3C2410_IRQ(x) ((x) + S3C2410_CPUIRQ_OFFSET)
0020 
0021 /* main cpu interrupts */
0022 #define IRQ_EINT0      S3C2410_IRQ(0)       /* 16 */
0023 #define IRQ_EINT1      S3C2410_IRQ(1)
0024 #define IRQ_EINT2      S3C2410_IRQ(2)
0025 #define IRQ_EINT3      S3C2410_IRQ(3)
0026 #define IRQ_EINT4t7    S3C2410_IRQ(4)       /* 20 */
0027 #define IRQ_EINT8t23   S3C2410_IRQ(5)
0028 #define IRQ_RESERVED6  S3C2410_IRQ(6)       /* for s3c2410 */
0029 #define IRQ_CAM        S3C2410_IRQ(6)       /* for s3c2440,s3c2443 */
0030 #define IRQ_BATT_FLT   S3C2410_IRQ(7)
0031 #define IRQ_TICK       S3C2410_IRQ(8)       /* 24 */
0032 #define IRQ_WDT        S3C2410_IRQ(9)       /* WDT/AC97 for s3c2443 */
0033 #define IRQ_TIMER0     S3C2410_IRQ(10)
0034 #define IRQ_TIMER1     S3C2410_IRQ(11)
0035 #define IRQ_TIMER2     S3C2410_IRQ(12)
0036 #define IRQ_TIMER3     S3C2410_IRQ(13)
0037 #define IRQ_TIMER4     S3C2410_IRQ(14)
0038 #define IRQ_UART2      S3C2410_IRQ(15)
0039 #define IRQ_LCD        S3C2410_IRQ(16)      /* 32 */
0040 #define IRQ_DMA0       S3C2410_IRQ(17)      /* IRQ_DMA for s3c2443 */
0041 #define IRQ_DMA1       S3C2410_IRQ(18)
0042 #define IRQ_DMA2       S3C2410_IRQ(19)
0043 #define IRQ_DMA3       S3C2410_IRQ(20)
0044 #define IRQ_SDI        S3C2410_IRQ(21)
0045 #define IRQ_SPI0       S3C2410_IRQ(22)
0046 #define IRQ_UART1      S3C2410_IRQ(23)
0047 #define IRQ_RESERVED24 S3C2410_IRQ(24)      /* 40 */
0048 #define IRQ_NFCON      S3C2410_IRQ(24)      /* for s3c2440 */
0049 #define IRQ_USBD       S3C2410_IRQ(25)
0050 #define IRQ_USBH       S3C2410_IRQ(26)
0051 #define IRQ_IIC        S3C2410_IRQ(27)
0052 #define IRQ_UART0      S3C2410_IRQ(28)      /* 44 */
0053 #define IRQ_SPI1       S3C2410_IRQ(29)
0054 #define IRQ_RTC        S3C2410_IRQ(30)
0055 #define IRQ_ADCPARENT  S3C2410_IRQ(31)
0056 
0057 /* interrupts generated from the external interrupts sources */
0058 #define IRQ_EINT0_2412 S3C2410_IRQ(32)
0059 #define IRQ_EINT1_2412 S3C2410_IRQ(33)
0060 #define IRQ_EINT2_2412 S3C2410_IRQ(34)
0061 #define IRQ_EINT3_2412 S3C2410_IRQ(35)
0062 #define IRQ_EINT4      S3C2410_IRQ(36)     /* 52 */
0063 #define IRQ_EINT5      S3C2410_IRQ(37)
0064 #define IRQ_EINT6      S3C2410_IRQ(38)
0065 #define IRQ_EINT7      S3C2410_IRQ(39)
0066 #define IRQ_EINT8      S3C2410_IRQ(40)
0067 #define IRQ_EINT9      S3C2410_IRQ(41)
0068 #define IRQ_EINT10     S3C2410_IRQ(42)
0069 #define IRQ_EINT11     S3C2410_IRQ(43)
0070 #define IRQ_EINT12     S3C2410_IRQ(44)
0071 #define IRQ_EINT13     S3C2410_IRQ(45)
0072 #define IRQ_EINT14     S3C2410_IRQ(46)
0073 #define IRQ_EINT15     S3C2410_IRQ(47)
0074 #define IRQ_EINT16     S3C2410_IRQ(48)
0075 #define IRQ_EINT17     S3C2410_IRQ(49)
0076 #define IRQ_EINT18     S3C2410_IRQ(50)
0077 #define IRQ_EINT19     S3C2410_IRQ(51)
0078 #define IRQ_EINT20     S3C2410_IRQ(52)     /* 68 */
0079 #define IRQ_EINT21     S3C2410_IRQ(53)
0080 #define IRQ_EINT22     S3C2410_IRQ(54)
0081 #define IRQ_EINT23     S3C2410_IRQ(55)
0082 
0083 #define IRQ_EINT_BIT(x) ((x) - IRQ_EINT4 + 4)
0084 #define IRQ_EINT(x)    (((x) >= 4) ? (IRQ_EINT4 + (x) - 4) : (IRQ_EINT0 + (x)))
0085 
0086 #define IRQ_LCD_FIFO   S3C2410_IRQ(56)
0087 #define IRQ_LCD_FRAME  S3C2410_IRQ(57)
0088 
0089 /* IRQs for the interal UARTs, and ADC
0090  * these need to be ordered in number of appearance in the
0091  * SUBSRC mask register
0092 */
0093 
0094 #define S3C2410_IRQSUB(x)   S3C2410_IRQ((x)+58)
0095 
0096 #define IRQ_S3CUART_RX0     S3C2410_IRQSUB(0)   /* 74 */
0097 #define IRQ_S3CUART_TX0     S3C2410_IRQSUB(1)
0098 #define IRQ_S3CUART_ERR0    S3C2410_IRQSUB(2)
0099 
0100 #define IRQ_S3CUART_RX1     S3C2410_IRQSUB(3)   /* 77 */
0101 #define IRQ_S3CUART_TX1     S3C2410_IRQSUB(4)
0102 #define IRQ_S3CUART_ERR1    S3C2410_IRQSUB(5)
0103 
0104 #define IRQ_S3CUART_RX2     S3C2410_IRQSUB(6)   /* 80 */
0105 #define IRQ_S3CUART_TX2     S3C2410_IRQSUB(7)
0106 #define IRQ_S3CUART_ERR2    S3C2410_IRQSUB(8)
0107 
0108 #define IRQ_TC          S3C2410_IRQSUB(9)
0109 #define IRQ_ADC         S3C2410_IRQSUB(10)
0110 
0111 #define NR_IRQS_S3C2410     (S3C2410_IRQSUB(10) + 1)
0112 
0113 /* extra irqs for s3c2412 */
0114 
0115 #define IRQ_S3C2412_CFSDI   S3C2410_IRQ(21)
0116 
0117 #define IRQ_S3C2412_SDI     S3C2410_IRQSUB(13)
0118 #define IRQ_S3C2412_CF      S3C2410_IRQSUB(14)
0119 
0120 #define NR_IRQS_S3C2412     (S3C2410_IRQSUB(14) + 1)
0121 
0122 #define IRQ_S3C2416_EINT8t15    S3C2410_IRQ(5)
0123 #define IRQ_S3C2416_DMA     S3C2410_IRQ(17)
0124 #define IRQ_S3C2416_UART3   S3C2410_IRQ(18)
0125 #define IRQ_S3C2416_SDI1    S3C2410_IRQ(20)
0126 #define IRQ_S3C2416_SDI0    S3C2410_IRQ(21)
0127 
0128 #define IRQ_S3C2416_LCD2    S3C2410_IRQSUB(15)
0129 #define IRQ_S3C2416_LCD3    S3C2410_IRQSUB(16)
0130 #define IRQ_S3C2416_LCD4    S3C2410_IRQSUB(17)
0131 #define IRQ_S3C2416_DMA0    S3C2410_IRQSUB(18)
0132 #define IRQ_S3C2416_DMA1    S3C2410_IRQSUB(19)
0133 #define IRQ_S3C2416_DMA2    S3C2410_IRQSUB(20)
0134 #define IRQ_S3C2416_DMA3    S3C2410_IRQSUB(21)
0135 #define IRQ_S3C2416_DMA4    S3C2410_IRQSUB(22)
0136 #define IRQ_S3C2416_DMA5    S3C2410_IRQSUB(23)
0137 #define IRQ_S32416_WDT      S3C2410_IRQSUB(27)
0138 #define IRQ_S32416_AC97     S3C2410_IRQSUB(28)
0139 
0140 /* second interrupt-register of s3c2416/s3c2450 */
0141 
0142 #define S3C2416_IRQ(x)      S3C2410_IRQ((x) + 58 + 29)
0143 #define IRQ_S3C2416_2D      S3C2416_IRQ(0)
0144 #define IRQ_S3C2416_IIC1    S3C2416_IRQ(1)
0145 #define IRQ_S3C2416_RESERVED2   S3C2416_IRQ(2)
0146 #define IRQ_S3C2416_RESERVED3   S3C2416_IRQ(3)
0147 #define IRQ_S3C2416_PCM0    S3C2416_IRQ(4)
0148 #define IRQ_S3C2416_PCM1    S3C2416_IRQ(5)
0149 #define IRQ_S3C2416_I2S0    S3C2416_IRQ(6)
0150 #define IRQ_S3C2416_I2S1    S3C2416_IRQ(7)
0151 
0152 #define NR_IRQS_S3C2416     (S3C2416_IRQ(7) + 1)
0153 
0154 /* extra irqs for s3c2440/s3c2442 */
0155 
0156 #define IRQ_S3C2440_CAM_C   S3C2410_IRQSUB(11)  /* S3C2443 too */
0157 #define IRQ_S3C2440_CAM_P   S3C2410_IRQSUB(12)  /* S3C2443 too */
0158 
0159 #define NR_IRQS_S3C2442     (S3C2410_IRQSUB(12) + 1)
0160 
0161 #define IRQ_S3C2440_WDT     S3C2410_IRQSUB(13)
0162 #define IRQ_S3C2440_AC97    S3C2410_IRQSUB(14)
0163 
0164 #define NR_IRQS_S3C2440     (S3C2410_IRQSUB(14) + 1)
0165 
0166 /* irqs for s3c2443 */
0167 
0168 #define IRQ_S3C2443_DMA     S3C2410_IRQ(17)     /* IRQ_DMA1 */
0169 #define IRQ_S3C2443_UART3   S3C2410_IRQ(18)     /* IRQ_DMA2 */
0170 #define IRQ_S3C2443_CFCON   S3C2410_IRQ(19)     /* IRQ_DMA3 */
0171 #define IRQ_S3C2443_HSMMC   S3C2410_IRQ(20)     /* IRQ_SDI */
0172 #define IRQ_S3C2443_NAND    S3C2410_IRQ(24)     /* reserved */
0173 
0174 #define IRQ_S3C2416_HSMMC0  S3C2410_IRQ(21)     /* S3C2416/S3C2450 */
0175 
0176 #define IRQ_HSMMC0      IRQ_S3C2416_HSMMC0
0177 #define IRQ_HSMMC1      IRQ_S3C2443_HSMMC
0178 
0179 #define IRQ_S3C2443_LCD1    S3C2410_IRQSUB(14)
0180 #define IRQ_S3C2443_LCD2    S3C2410_IRQSUB(15)
0181 #define IRQ_S3C2443_LCD3    S3C2410_IRQSUB(16)
0182 #define IRQ_S3C2443_LCD4    S3C2410_IRQSUB(17)
0183 
0184 #define IRQ_S3C2443_DMA0    S3C2410_IRQSUB(18)
0185 #define IRQ_S3C2443_DMA1    S3C2410_IRQSUB(19)
0186 #define IRQ_S3C2443_DMA2    S3C2410_IRQSUB(20)
0187 #define IRQ_S3C2443_DMA3    S3C2410_IRQSUB(21)
0188 #define IRQ_S3C2443_DMA4    S3C2410_IRQSUB(22)
0189 #define IRQ_S3C2443_DMA5    S3C2410_IRQSUB(23)
0190 
0191 /* UART3 */
0192 #define IRQ_S3C2443_RX3     S3C2410_IRQSUB(24)
0193 #define IRQ_S3C2443_TX3     S3C2410_IRQSUB(25)
0194 #define IRQ_S3C2443_ERR3    S3C2410_IRQSUB(26)
0195 
0196 #define IRQ_S3C2443_WDT     S3C2410_IRQSUB(27)
0197 #define IRQ_S3C2443_AC97    S3C2410_IRQSUB(28)
0198 
0199 #define NR_IRQS_S3C2443     (S3C2410_IRQSUB(28) + 1)
0200 
0201 /* compatibility define. */
0202 #define IRQ_UART3       IRQ_S3C2443_UART3
0203 #define IRQ_S3CUART_RX3     IRQ_S3C2443_RX3
0204 #define IRQ_S3CUART_TX3     IRQ_S3C2443_TX3
0205 #define IRQ_S3CUART_ERR3    IRQ_S3C2443_ERR3
0206 
0207 #define IRQ_LCD_VSYNC       IRQ_S3C2443_LCD3
0208 #define IRQ_LCD_SYSTEM      IRQ_S3C2443_LCD2
0209 
0210 #ifdef CONFIG_CPU_S3C2440
0211 #define IRQ_S3C244X_AC97 IRQ_S3C2440_AC97
0212 #else
0213 #define IRQ_S3C244X_AC97 IRQ_S3C2443_AC97
0214 #endif
0215 
0216 /* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */
0217 #define FIQ_START       IRQ_EINT0
0218 
0219 #endif /* __ASM_ARCH_IRQ_H */