diff options
author | Magnus Damm <damm@opensource.se> | 2010-02-08 22:35:53 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-02-09 04:01:44 -0500 |
commit | 6673be73809c8aa1ca5255c83f4fc85c43fdbfab (patch) | |
tree | 85efd6a908c5b7f8723a49dd1b33be72613ee9db /arch/arm/mach-shmobile/intc-sh7377.c | |
parent | f8eef1305b33438dd7a3a01e43b94e57ca87fc9b (diff) |
ARM: mach-shmobile: sh7377 INTCA support
Add support for the sh7377 INTCA hardware block.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/intc-sh7377.c')
-rw-r--r-- | arch/arm/mach-shmobile/intc-sh7377.c | 350 |
1 files changed, 350 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/intc-sh7377.c b/arch/arm/mach-shmobile/intc-sh7377.c new file mode 100644 index 000000000000..125021cfba5c --- /dev/null +++ b/arch/arm/mach-shmobile/intc-sh7377.c | |||
@@ -0,0 +1,350 @@ | |||
1 | /* | ||
2 | * sh7377 processor support - INTC hardware block | ||
3 | * | ||
4 | * Copyright (C) 2010 Magnus Damm | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/sh_intc.h> | ||
25 | #include <asm/mach-types.h> | ||
26 | #include <asm/mach/arch.h> | ||
27 | |||
28 | enum { | ||
29 | UNUSED_INTCA = 0, | ||
30 | |||
31 | /* interrupt sources INTCA */ | ||
32 | IRQ0A, IRQ1A, IRQ2A, IRQ3A, IRQ4A, IRQ5A, IRQ6A, IRQ7A, | ||
33 | IRQ8A, IRQ9A, IRQ10A, IRQ11A, IRQ12A, IRQ13A, IRQ14A, IRQ15A, | ||
34 | IRQ16A, IRQ17A, IRQ18A, IRQ19A, IRQ20A, IRQ21A, IRQ22A, IRQ23A, | ||
35 | IRQ24A, IRQ25A, IRQ26A, IRQ27A, IRQ28A, IRQ29A, IRQ30A, IRQ31A, | ||
36 | DIRC, | ||
37 | _2DG, | ||
38 | CRYPT_STD, | ||
39 | IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1, | ||
40 | AP_ARM_IRQPMU, AP_ARM_COMMTX, AP_ARM_COMMRX, | ||
41 | MFI_MFIM, MFI_MFIS, | ||
42 | BBIF1, BBIF2, | ||
43 | USBDMAC_USHDMI, | ||
44 | USBHS_USHI0, USBHS_USHI1, | ||
45 | _3DG_SGX540, | ||
46 | CMT1_CMT10, CMT1_CMT11, CMT1_CMT12, CMT1_CMT13, CMT2, CMT3, | ||
47 | KEYSC_KEY, | ||
48 | SCIFA0, SCIFA1, SCIFA2, SCIFA3, | ||
49 | MSIOF2, MSIOF1, | ||
50 | SCIFA4, SCIFA5, SCIFB, | ||
51 | FLCTL_FLSTEI, FLCTL_FLTENDI, FLCTL_FLTREQ0I, FLCTL_FLTREQ1I, | ||
52 | SDHI0_SDHI0I0, SDHI0_SDHI0I1, SDHI0_SDHI0I2, SDHI0_SDHI0I3, | ||
53 | SDHI1_SDHI1I0, SDHI1_SDHI1I1, SDHI1_SDHI1I2, SDHI1_SDHI1I3, | ||
54 | MSU_MSU, MSU_MSU2, | ||
55 | IRREM, | ||
56 | MSUG, | ||
57 | IRDA, | ||
58 | TPU0, TPU1, TPU2, TPU3, TPU4, | ||
59 | LCRC, | ||
60 | PINTCA_PINT1, PINTCA_PINT2, | ||
61 | TTI20, | ||
62 | MISTY, | ||
63 | DDM, | ||
64 | RWDT0, RWDT1, | ||
65 | DMAC_1_DEI0, DMAC_1_DEI1, DMAC_1_DEI2, DMAC_1_DEI3, | ||
66 | DMAC_2_DEI4, DMAC_2_DEI5, DMAC_2_DADERR, | ||
67 | DMAC2_1_DEI0, DMAC2_1_DEI1, DMAC2_1_DEI2, DMAC2_1_DEI3, | ||
68 | DMAC2_2_DEI4, DMAC2_2_DEI5, DMAC2_2_DADERR, | ||
69 | DMAC3_1_DEI0, DMAC3_1_DEI1, DMAC3_1_DEI2, DMAC3_1_DEI3, | ||
70 | DMAC3_2_DEI4, DMAC3_2_DEI5, DMAC3_2_DADERR, | ||
71 | SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM, | ||
72 | ICUSB_ICUSB0, ICUSB_ICUSB1, | ||
73 | ICUDMC_ICUDMC1, ICUDMC_ICUDMC2, | ||
74 | SPU2_SPU0, SPU2_SPU1, | ||
75 | FSI, | ||
76 | FMSI, | ||
77 | SCUV, | ||
78 | IPMMU_IPMMUB, | ||
79 | AP_ARM_CTIIRQ, AP_ARM_DMAEXTERRIRQ, AP_ARM_DMAIRQ, AP_ARM_DMASIRQ, | ||
80 | MFIS2, | ||
81 | CPORTR2S, | ||
82 | CMT14, CMT15, | ||
83 | SCIFA6, | ||
84 | |||
85 | /* interrupt groups INTCA */ | ||
86 | DMAC_1, DMAC_2, DMAC2_1, DMAC2_2, DMAC3_1, DMAC3_2, SHWYSTAT, | ||
87 | AP_ARM1, AP_ARM2, USBHS, SPU2, FLCTL, IIC1, SDHI0, SDHI1, | ||
88 | ICUSB, ICUDMC | ||
89 | }; | ||
90 | |||
91 | static struct intc_vect intca_vectors[] = { | ||
92 | INTC_VECT(IRQ0A, 0x0200), INTC_VECT(IRQ1A, 0x0220), | ||
93 | INTC_VECT(IRQ2A, 0x0240), INTC_VECT(IRQ3A, 0x0260), | ||
94 | INTC_VECT(IRQ4A, 0x0280), INTC_VECT(IRQ5A, 0x02a0), | ||
95 | INTC_VECT(IRQ6A, 0x02c0), INTC_VECT(IRQ7A, 0x02e0), | ||
96 | INTC_VECT(IRQ8A, 0x0300), INTC_VECT(IRQ9A, 0x0320), | ||
97 | INTC_VECT(IRQ10A, 0x0340), INTC_VECT(IRQ11A, 0x0360), | ||
98 | INTC_VECT(IRQ12A, 0x0380), INTC_VECT(IRQ13A, 0x03a0), | ||
99 | INTC_VECT(IRQ14A, 0x03c0), INTC_VECT(IRQ15A, 0x03e0), | ||
100 | INTC_VECT(IRQ16A, 0x3200), INTC_VECT(IRQ17A, 0x3220), | ||
101 | INTC_VECT(IRQ18A, 0x3240), INTC_VECT(IRQ19A, 0x3260), | ||
102 | INTC_VECT(IRQ20A, 0x3280), INTC_VECT(IRQ31A, 0x32a0), | ||
103 | INTC_VECT(IRQ22A, 0x32c0), INTC_VECT(IRQ23A, 0x32e0), | ||
104 | INTC_VECT(IRQ24A, 0x3300), INTC_VECT(IRQ25A, 0x3320), | ||
105 | INTC_VECT(IRQ26A, 0x3340), INTC_VECT(IRQ27A, 0x3360), | ||
106 | INTC_VECT(IRQ28A, 0x3380), INTC_VECT(IRQ29A, 0x33a0), | ||
107 | INTC_VECT(IRQ30A, 0x33c0), INTC_VECT(IRQ31A, 0x33e0), | ||
108 | INTC_VECT(DIRC, 0x0560), | ||
109 | INTC_VECT(_2DG, 0x05e0), | ||
110 | INTC_VECT(CRYPT_STD, 0x0700), | ||
111 | INTC_VECT(IIC1_ALI1, 0x0780), INTC_VECT(IIC1_TACKI1, 0x07a0), | ||
112 | INTC_VECT(IIC1_WAITI1, 0x07c0), INTC_VECT(IIC1_DTEI1, 0x07e0), | ||
113 | INTC_VECT(AP_ARM_IRQPMU, 0x0800), INTC_VECT(AP_ARM_COMMTX, 0x0840), | ||
114 | INTC_VECT(AP_ARM_COMMRX, 0x0860), | ||
115 | INTC_VECT(MFI_MFIM, 0x0900), INTC_VECT(MFI_MFIS, 0x0920), | ||
116 | INTC_VECT(BBIF1, 0x0940), INTC_VECT(BBIF2, 0x0960), | ||
117 | INTC_VECT(USBDMAC_USHDMI, 0x0a00), | ||
118 | INTC_VECT(USBHS_USHI0, 0x0a20), INTC_VECT(USBHS_USHI1, 0x0a40), | ||
119 | INTC_VECT(_3DG_SGX540, 0x0a60), | ||
120 | INTC_VECT(CMT1_CMT10, 0x0b00), INTC_VECT(CMT1_CMT11, 0x0b20), | ||
121 | INTC_VECT(CMT1_CMT12, 0x0b40), INTC_VECT(CMT1_CMT13, 0x0b60), | ||
122 | INTC_VECT(CMT2, 0x0b80), INTC_VECT(CMT3, 0x0ba0), | ||
123 | INTC_VECT(KEYSC_KEY, 0x0be0), | ||
124 | INTC_VECT(SCIFA0, 0x0c00), INTC_VECT(SCIFA1, 0x0c20), | ||
125 | INTC_VECT(SCIFA2, 0x0c40), INTC_VECT(SCIFA3, 0x0c60), | ||
126 | INTC_VECT(MSIOF2, 0x0c80), INTC_VECT(MSIOF1, 0x0d00), | ||
127 | INTC_VECT(SCIFA4, 0x0d20), INTC_VECT(SCIFA5, 0x0d40), | ||
128 | INTC_VECT(SCIFB, 0x0d60), | ||
129 | INTC_VECT(FLCTL_FLSTEI, 0x0d80), INTC_VECT(FLCTL_FLTENDI, 0x0da0), | ||
130 | INTC_VECT(FLCTL_FLTREQ0I, 0x0dc0), INTC_VECT(FLCTL_FLTREQ1I, 0x0de0), | ||
131 | INTC_VECT(SDHI0_SDHI0I0, 0x0e00), INTC_VECT(SDHI0_SDHI0I1, 0x0e20), | ||
132 | INTC_VECT(SDHI0_SDHI0I2, 0x0e40), INTC_VECT(SDHI0_SDHI0I3, 0x0e60), | ||
133 | INTC_VECT(SDHI1_SDHI1I0, 0x0e80), INTC_VECT(SDHI1_SDHI1I1, 0x0ea0), | ||
134 | INTC_VECT(SDHI1_SDHI1I2, 0x0ec0), INTC_VECT(SDHI1_SDHI1I3, 0x0ee0), | ||
135 | INTC_VECT(MSU_MSU, 0x0f20), INTC_VECT(MSU_MSU2, 0x0f40), | ||
136 | INTC_VECT(IRREM, 0x0f60), | ||
137 | INTC_VECT(MSUG, 0x0fa0), | ||
138 | INTC_VECT(IRDA, 0x0480), | ||
139 | INTC_VECT(TPU0, 0x04a0), INTC_VECT(TPU1, 0x04c0), | ||
140 | INTC_VECT(TPU2, 0x04e0), INTC_VECT(TPU3, 0x0500), | ||
141 | INTC_VECT(TPU4, 0x0520), | ||
142 | INTC_VECT(LCRC, 0x0540), | ||
143 | INTC_VECT(PINTCA_PINT1, 0x1000), INTC_VECT(PINTCA_PINT2, 0x1020), | ||
144 | INTC_VECT(TTI20, 0x1100), | ||
145 | INTC_VECT(MISTY, 0x1120), | ||
146 | INTC_VECT(DDM, 0x1140), | ||
147 | INTC_VECT(RWDT0, 0x1280), INTC_VECT(RWDT1, 0x12a0), | ||
148 | INTC_VECT(DMAC_1_DEI0, 0x2000), INTC_VECT(DMAC_1_DEI1, 0x2020), | ||
149 | INTC_VECT(DMAC_1_DEI2, 0x2040), INTC_VECT(DMAC_1_DEI3, 0x2060), | ||
150 | INTC_VECT(DMAC_2_DEI4, 0x2080), INTC_VECT(DMAC_2_DEI5, 0x20a0), | ||
151 | INTC_VECT(DMAC_2_DADERR, 0x20c0), | ||
152 | INTC_VECT(DMAC2_1_DEI0, 0x2100), INTC_VECT(DMAC2_1_DEI1, 0x2120), | ||
153 | INTC_VECT(DMAC2_1_DEI2, 0x2140), INTC_VECT(DMAC2_1_DEI3, 0x2160), | ||
154 | INTC_VECT(DMAC2_2_DEI4, 0x2180), INTC_VECT(DMAC2_2_DEI5, 0x21a0), | ||
155 | INTC_VECT(DMAC2_2_DADERR, 0x21c0), | ||
156 | INTC_VECT(DMAC3_1_DEI0, 0x2200), INTC_VECT(DMAC3_1_DEI1, 0x2220), | ||
157 | INTC_VECT(DMAC3_1_DEI2, 0x2240), INTC_VECT(DMAC3_1_DEI3, 0x2260), | ||
158 | INTC_VECT(DMAC3_2_DEI4, 0x2280), INTC_VECT(DMAC3_2_DEI5, 0x22a0), | ||
159 | INTC_VECT(DMAC3_2_DADERR, 0x22c0), | ||
160 | INTC_VECT(SHWYSTAT_RT, 0x1300), INTC_VECT(SHWYSTAT_HS, 0x1d20), | ||
161 | INTC_VECT(SHWYSTAT_COM, 0x1340), | ||
162 | INTC_VECT(ICUSB_ICUSB0, 0x1700), INTC_VECT(ICUSB_ICUSB1, 0x1720), | ||
163 | INTC_VECT(ICUDMC_ICUDMC1, 0x1780), INTC_VECT(ICUDMC_ICUDMC2, 0x17a0), | ||
164 | INTC_VECT(SPU2_SPU0, 0x1800), INTC_VECT(SPU2_SPU1, 0x1820), | ||
165 | INTC_VECT(FSI, 0x1840), | ||
166 | INTC_VECT(FMSI, 0x1860), | ||
167 | INTC_VECT(SCUV, 0x1880), | ||
168 | INTC_VECT(IPMMU_IPMMUB, 0x1900), | ||
169 | INTC_VECT(AP_ARM_CTIIRQ, 0x1980), | ||
170 | INTC_VECT(AP_ARM_DMAEXTERRIRQ, 0x19a0), | ||
171 | INTC_VECT(AP_ARM_DMAIRQ, 0x19c0), | ||
172 | INTC_VECT(AP_ARM_DMASIRQ, 0x19e0), | ||
173 | INTC_VECT(MFIS2, 0x1a00), | ||
174 | INTC_VECT(CPORTR2S, 0x1a20), | ||
175 | INTC_VECT(CMT14, 0x1a40), INTC_VECT(CMT15, 0x1a60), | ||
176 | INTC_VECT(SCIFA6, 0x1a80), | ||
177 | }; | ||
178 | |||
179 | static struct intc_group intca_groups[] __initdata = { | ||
180 | INTC_GROUP(DMAC_1, DMAC_1_DEI0, | ||
181 | DMAC_1_DEI1, DMAC_1_DEI2, DMAC_1_DEI3), | ||
182 | INTC_GROUP(DMAC_2, DMAC_2_DEI4, | ||
183 | DMAC_2_DEI5, DMAC_2_DADERR), | ||
184 | INTC_GROUP(DMAC2_1, DMAC2_1_DEI0, | ||
185 | DMAC2_1_DEI1, DMAC2_1_DEI2, DMAC2_1_DEI3), | ||
186 | INTC_GROUP(DMAC2_2, DMAC2_2_DEI4, | ||
187 | DMAC2_2_DEI5, DMAC2_2_DADERR), | ||
188 | INTC_GROUP(DMAC3_1, DMAC3_1_DEI0, | ||
189 | DMAC3_1_DEI1, DMAC3_1_DEI2, DMAC3_1_DEI3), | ||
190 | INTC_GROUP(DMAC3_2, DMAC3_2_DEI4, | ||
191 | DMAC3_2_DEI5, DMAC3_2_DADERR), | ||
192 | INTC_GROUP(AP_ARM1, AP_ARM_IRQPMU, AP_ARM_COMMTX, AP_ARM_COMMTX), | ||
193 | INTC_GROUP(USBHS, USBHS_USHI0, USBHS_USHI1), | ||
194 | INTC_GROUP(SPU2, SPU2_SPU0, SPU2_SPU1), | ||
195 | INTC_GROUP(FLCTL, FLCTL_FLSTEI, FLCTL_FLTENDI, | ||
196 | FLCTL_FLTREQ0I, FLCTL_FLTREQ1I), | ||
197 | INTC_GROUP(IIC1, IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1), | ||
198 | INTC_GROUP(SDHI0, SDHI0_SDHI0I0, SDHI0_SDHI0I1, | ||
199 | SDHI0_SDHI0I2, SDHI0_SDHI0I3), | ||
200 | INTC_GROUP(SDHI1, SDHI1_SDHI1I0, SDHI1_SDHI1I1, | ||
201 | SDHI1_SDHI1I2, SDHI1_SDHI1I3), | ||
202 | INTC_GROUP(SHWYSTAT, SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM), | ||
203 | INTC_GROUP(ICUSB, ICUSB_ICUSB0, ICUSB_ICUSB1), | ||
204 | INTC_GROUP(ICUDMC, ICUDMC_ICUDMC1, ICUDMC_ICUDMC2), | ||
205 | }; | ||
206 | |||
207 | static struct intc_mask_reg intca_mask_registers[] = { | ||
208 | { 0xe6900040, 0xe6900060, 8, /* INTMSK00A / INTMSKCLR00A */ | ||
209 | { IRQ0A, IRQ1A, IRQ2A, IRQ3A, IRQ4A, IRQ5A, IRQ6A, IRQ7A } }, | ||
210 | { 0xe6900044, 0xe6900064, 8, /* INTMSK10A / INTMSKCLR10A */ | ||
211 | { IRQ8A, IRQ9A, IRQ10A, IRQ11A, IRQ12A, IRQ13A, IRQ14A, IRQ15A } }, | ||
212 | { 0xe6900048, 0xe6900068, 8, /* INTMSK20A / INTMSKCLR20A */ | ||
213 | { IRQ16A, IRQ17A, IRQ18A, IRQ19A, IRQ20A, IRQ21A, IRQ22A, IRQ23A } }, | ||
214 | { 0xe690004c, 0xe690006c, 8, /* INTMSK30A / INTMSKCLR30A */ | ||
215 | { IRQ24A, IRQ25A, IRQ26A, IRQ27A, IRQ28A, IRQ29A, IRQ30A, IRQ31A } }, | ||
216 | |||
217 | { 0xe6940080, 0xe69400c0, 8, /* IMR0A / IMCR0A */ | ||
218 | { DMAC2_1_DEI3, DMAC2_1_DEI2, DMAC2_1_DEI1, DMAC2_1_DEI0, | ||
219 | AP_ARM_IRQPMU, 0, AP_ARM_COMMTX, AP_ARM_COMMRX } }, | ||
220 | { 0xe6940084, 0xe69400c4, 8, /* IMR1A / IMCR1A */ | ||
221 | { _2DG, CRYPT_STD, DIRC, 0, | ||
222 | DMAC_1_DEI3, DMAC_1_DEI2, DMAC_1_DEI1, DMAC_1_DEI0 } }, | ||
223 | { 0xe6940088, 0xe69400c8, 8, /* IMR2A / IMCR2A */ | ||
224 | { PINTCA_PINT1, PINTCA_PINT2, 0, 0, | ||
225 | BBIF1, BBIF2, MFI_MFIS, MFI_MFIM } }, | ||
226 | { 0xe694008c, 0xe69400cc, 8, /* IMR3A / IMCR3A */ | ||
227 | { DMAC3_1_DEI3, DMAC3_1_DEI2, DMAC3_1_DEI1, DMAC3_1_DEI0, | ||
228 | DMAC3_2_DADERR, DMAC3_2_DEI5, DMAC3_2_DEI4, IRDA } }, | ||
229 | { 0xe6940090, 0xe69400d0, 8, /* IMR4A / IMCR4A */ | ||
230 | { DDM, 0, 0, 0, | ||
231 | 0, 0, 0, 0 } }, | ||
232 | { 0xe6940094, 0xe69400d4, 8, /* IMR5A / IMCR5A */ | ||
233 | { KEYSC_KEY, DMAC_2_DADERR, DMAC_2_DEI5, DMAC_2_DEI4, | ||
234 | SCIFA3, SCIFA2, SCIFA1, SCIFA0 } }, | ||
235 | { 0xe6940098, 0xe69400d8, 8, /* IMR6A / IMCR6A */ | ||
236 | { SCIFB, SCIFA5, SCIFA4, MSIOF1, | ||
237 | 0, 0, MSIOF2, 0 } }, | ||
238 | { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */ | ||
239 | { SDHI0_SDHI0I3, SDHI0_SDHI0I2, SDHI0_SDHI0I1, SDHI0_SDHI0I0, | ||
240 | FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } }, | ||
241 | { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */ | ||
242 | { SDHI1_SDHI1I3, SDHI1_SDHI1I2, SDHI1_SDHI1I1, SDHI1_SDHI1I0, | ||
243 | TTI20, USBDMAC_USHDMI, 0, MSUG } }, | ||
244 | { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */ | ||
245 | { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10, | ||
246 | CMT2, USBHS_USHI1, USBHS_USHI0, _3DG_SGX540 } }, | ||
247 | { 0xe69400a8, 0xe69400e8, 8, /* IMR10A / IMCR10A */ | ||
248 | { 0, DMAC2_2_DADERR, DMAC2_2_DEI5, DMAC2_2_DEI4, | ||
249 | 0, 0, 0, 0 } }, | ||
250 | { 0xe69400ac, 0xe69400ec, 8, /* IMR11A / IMCR11A */ | ||
251 | { IIC1_DTEI1, IIC1_WAITI1, IIC1_TACKI1, IIC1_ALI1, | ||
252 | LCRC, MSU_MSU2, IRREM, MSU_MSU } }, | ||
253 | { 0xe69400b0, 0xe69400f0, 8, /* IMR12A / IMCR12A */ | ||
254 | { 0, 0, TPU0, TPU1, | ||
255 | TPU2, TPU3, TPU4, 0 } }, | ||
256 | { 0xe69400b4, 0xe69400f4, 8, /* IMR13A / IMCR13A */ | ||
257 | { 0, 0, 0, 0, | ||
258 | MISTY, CMT3, RWDT1, RWDT0 } }, | ||
259 | { 0xe6950080, 0xe69500c0, 8, /* IMR0A3 / IMCR0A3 */ | ||
260 | { SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM, 0, | ||
261 | 0, 0, 0, 0 } }, | ||
262 | { 0xe6950090, 0xe69500d0, 8, /* IMR4A3 / IMCR4A3 */ | ||
263 | { ICUSB_ICUSB0, ICUSB_ICUSB1, 0, 0, | ||
264 | ICUDMC_ICUDMC1, ICUDMC_ICUDMC2, 0, 0 } }, | ||
265 | { 0xe6950094, 0xe69500d4, 8, /* IMR5A3 / IMCR5A3 */ | ||
266 | { SPU2_SPU0, SPU2_SPU1, FSI, FMSI, | ||
267 | SCUV, 0, 0, 0 } }, | ||
268 | { 0xe6950098, 0xe69500d8, 8, /* IMR6A3 / IMCR6A3 */ | ||
269 | { IPMMU_IPMMUB, 0, 0, 0, | ||
270 | AP_ARM_CTIIRQ, AP_ARM_DMAEXTERRIRQ, | ||
271 | AP_ARM_DMAIRQ, AP_ARM_DMASIRQ } }, | ||
272 | { 0xe695009c, 0xe69500dc, 8, /* IMR7A3 / IMCR7A3 */ | ||
273 | { MFIS2, CPORTR2S, CMT14, CMT15, | ||
274 | SCIFA6, 0, 0, 0 } }, | ||
275 | }; | ||
276 | |||
277 | static struct intc_prio_reg intca_prio_registers[] = { | ||
278 | { 0xe6900010, 0, 32, 4, /* INTPRI00A */ | ||
279 | { IRQ0A, IRQ1A, IRQ2A, IRQ3A, IRQ4A, IRQ5A, IRQ6A, IRQ7A } }, | ||
280 | { 0xe6900014, 0, 32, 4, /* INTPRI10A */ | ||
281 | { IRQ8A, IRQ9A, IRQ10A, IRQ11A, IRQ12A, IRQ13A, IRQ14A, IRQ15A } }, | ||
282 | { 0xe6900018, 0, 32, 4, /* INTPRI10A */ | ||
283 | { IRQ16A, IRQ17A, IRQ18A, IRQ19A, IRQ20A, IRQ21A, IRQ22A, IRQ23A } }, | ||
284 | { 0xe690001c, 0, 32, 4, /* INTPRI30A */ | ||
285 | { IRQ24A, IRQ25A, IRQ26A, IRQ27A, IRQ28A, IRQ29A, IRQ30A, IRQ31A } }, | ||
286 | |||
287 | { 0xe6940000, 0, 16, 4, /* IPRAA */ { DMAC3_1, DMAC3_2, CMT2, LCRC } }, | ||
288 | { 0xe6940004, 0, 16, 4, /* IPRBA */ { IRDA, 0, BBIF1, BBIF2 } }, | ||
289 | { 0xe6940008, 0, 16, 4, /* IPRCA */ { _2DG, CRYPT_STD, | ||
290 | CMT1_CMT11, AP_ARM1 } }, | ||
291 | { 0xe694000c, 0, 16, 4, /* IPRDA */ { PINTCA_PINT1, PINTCA_PINT2, | ||
292 | CMT1_CMT12, TPU4 } }, | ||
293 | { 0xe6940010, 0, 16, 4, /* IPREA */ { DMAC_1, MFI_MFIS, | ||
294 | MFI_MFIM, USBHS } }, | ||
295 | { 0xe6940014, 0, 16, 4, /* IPRFA */ { KEYSC_KEY, DMAC_2, | ||
296 | _3DG_SGX540, CMT1_CMT10 } }, | ||
297 | { 0xe6940018, 0, 16, 4, /* IPRGA */ { SCIFA0, SCIFA1, | ||
298 | SCIFA2, SCIFA3 } }, | ||
299 | { 0xe694001c, 0, 16, 4, /* IPRGH */ { MSIOF2, USBDMAC_USHDMI, | ||
300 | FLCTL, SDHI0 } }, | ||
301 | { 0xe6940020, 0, 16, 4, /* IPRIA */ { MSIOF1, SCIFA4, MSU_MSU, IIC1 } }, | ||
302 | { 0xe6940024, 0, 16, 4, /* IPRJA */ { DMAC2_1, DMAC2_2, MSUG, TTI20 } }, | ||
303 | { 0xe6940028, 0, 16, 4, /* IPRKA */ { 0, CMT1_CMT13, IRREM, SDHI1 } }, | ||
304 | { 0xe694002c, 0, 16, 4, /* IPRLA */ { TPU0, TPU1, TPU2, TPU3 } }, | ||
305 | { 0xe6940030, 0, 16, 4, /* IPRMA */ { MISTY, CMT3, RWDT1, RWDT0 } }, | ||
306 | { 0xe6940034, 0, 16, 4, /* IPRNA */ { SCIFB, SCIFA5, 0, DDM } }, | ||
307 | { 0xe6940038, 0, 16, 4, /* IPROA */ { 0, 0, DIRC, 0 } }, | ||
308 | { 0xe6950000, 0, 16, 4, /* IPRAA3 */ { SHWYSTAT, 0, 0, 0 } }, | ||
309 | { 0xe6950020, 0, 16, 4, /* IPRIA3 */ { ICUSB, 0, 0, 0 } }, | ||
310 | { 0xe6950024, 0, 16, 4, /* IPRJA3 */ { ICUDMC, 0, 0, 0 } }, | ||
311 | { 0xe6950028, 0, 16, 4, /* IPRKA3 */ { SPU2, 0, FSI, FMSI } }, | ||
312 | { 0xe695002c, 0, 16, 4, /* IPRLA3 */ { SCUV, 0, 0, 0 } }, | ||
313 | { 0xe6950030, 0, 16, 4, /* IPRMA3 */ { IPMMU_IPMMUB, 0, 0, 0 } }, | ||
314 | { 0xe6950034, 0, 16, 4, /* IPRNA3 */ { AP_ARM2, 0, 0, 0 } }, | ||
315 | { 0xe6950038, 0, 16, 4, /* IPROA3 */ { MFIS2, CPORTR2S, | ||
316 | CMT14, CMT15 } }, | ||
317 | { 0xe694003c, 0, 16, 4, /* IPRPA3 */ { SCIFA6, 0, 0, 0 } }, | ||
318 | }; | ||
319 | |||
320 | static struct intc_sense_reg intca_sense_registers[] __initdata = { | ||
321 | { 0xe6900000, 16, 2, /* ICR1A */ | ||
322 | { IRQ0A, IRQ1A, IRQ2A, IRQ3A, IRQ4A, IRQ5A, IRQ6A, IRQ7A } }, | ||
323 | { 0xe6900004, 16, 2, /* ICR2A */ | ||
324 | { IRQ8A, IRQ9A, IRQ10A, IRQ11A, IRQ12A, IRQ13A, IRQ14A, IRQ15A } }, | ||
325 | { 0xe6900008, 16, 2, /* ICR3A */ | ||
326 | { IRQ16A, IRQ17A, IRQ18A, IRQ19A, IRQ20A, IRQ21A, IRQ22A, IRQ23A } }, | ||
327 | { 0xe690000c, 16, 2, /* ICR4A */ | ||
328 | { IRQ24A, IRQ25A, IRQ26A, IRQ27A, IRQ28A, IRQ29A, IRQ30A, IRQ31A } }, | ||
329 | }; | ||
330 | |||
331 | static struct intc_mask_reg intca_ack_registers[] __initdata = { | ||
332 | { 0xe6900020, 0, 8, /* INTREQ00A */ | ||
333 | { IRQ0A, IRQ1A, IRQ2A, IRQ3A, IRQ4A, IRQ5A, IRQ6A, IRQ7A } }, | ||
334 | { 0xe6900024, 0, 8, /* INTREQ10A */ | ||
335 | { IRQ8A, IRQ9A, IRQ10A, IRQ11A, IRQ12A, IRQ13A, IRQ14A, IRQ15A } }, | ||
336 | { 0xe6900028, 0, 8, /* INTREQ20A */ | ||
337 | { IRQ16A, IRQ17A, IRQ18A, IRQ19A, IRQ20A, IRQ21A, IRQ22A, IRQ23A } }, | ||
338 | { 0xe690002c, 0, 8, /* INTREQ30A */ | ||
339 | { IRQ24A, IRQ25A, IRQ26A, IRQ27A, IRQ28A, IRQ29A, IRQ30A, IRQ31A } }, | ||
340 | }; | ||
341 | |||
342 | static DECLARE_INTC_DESC_ACK(intca_desc, "sh7377-intca", | ||
343 | intca_vectors, intca_groups, | ||
344 | intca_mask_registers, intca_prio_registers, | ||
345 | intca_sense_registers, intca_ack_registers); | ||
346 | |||
347 | void __init sh7377_init_irq(void) | ||
348 | { | ||
349 | register_intc_controller(&intca_desc); | ||
350 | } | ||