aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/vr41xx/common/icu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/vr41xx/common/icu.c')
-rw-r--r--arch/mips/vr41xx/common/icu.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c
index b9323302cc4e..7a5c31d58378 100644
--- a/arch/mips/vr41xx/common/icu.c
+++ b/arch/mips/vr41xx/common/icu.c
@@ -38,6 +38,7 @@
38 38
39#include <asm/cpu.h> 39#include <asm/cpu.h>
40#include <asm/io.h> 40#include <asm/io.h>
41#include <asm/vr41xx/irq.h>
41#include <asm/vr41xx/vr41xx.h> 42#include <asm/vr41xx/vr41xx.h>
42 43
43static void __iomem *icu1_base; 44static void __iomem *icu1_base;
@@ -152,7 +153,7 @@ static inline uint16_t icu2_clear(uint8_t offset, uint16_t clear)
152 153
153void vr41xx_enable_piuint(uint16_t mask) 154void vr41xx_enable_piuint(uint16_t mask)
154{ 155{
155 irq_desc_t *desc = irq_desc + PIU_IRQ; 156 struct irq_desc *desc = irq_desc + PIU_IRQ;
156 unsigned long flags; 157 unsigned long flags;
157 158
158 if (current_cpu_data.cputype == CPU_VR4111 || 159 if (current_cpu_data.cputype == CPU_VR4111 ||
@@ -167,7 +168,7 @@ EXPORT_SYMBOL(vr41xx_enable_piuint);
167 168
168void vr41xx_disable_piuint(uint16_t mask) 169void vr41xx_disable_piuint(uint16_t mask)
169{ 170{
170 irq_desc_t *desc = irq_desc + PIU_IRQ; 171 struct irq_desc *desc = irq_desc + PIU_IRQ;
171 unsigned long flags; 172 unsigned long flags;
172 173
173 if (current_cpu_data.cputype == CPU_VR4111 || 174 if (current_cpu_data.cputype == CPU_VR4111 ||
@@ -182,7 +183,7 @@ EXPORT_SYMBOL(vr41xx_disable_piuint);
182 183
183void vr41xx_enable_aiuint(uint16_t mask) 184void vr41xx_enable_aiuint(uint16_t mask)
184{ 185{
185 irq_desc_t *desc = irq_desc + AIU_IRQ; 186 struct irq_desc *desc = irq_desc + AIU_IRQ;
186 unsigned long flags; 187 unsigned long flags;
187 188
188 if (current_cpu_data.cputype == CPU_VR4111 || 189 if (current_cpu_data.cputype == CPU_VR4111 ||
@@ -197,7 +198,7 @@ EXPORT_SYMBOL(vr41xx_enable_aiuint);
197 198
198void vr41xx_disable_aiuint(uint16_t mask) 199void vr41xx_disable_aiuint(uint16_t mask)
199{ 200{
200 irq_desc_t *desc = irq_desc + AIU_IRQ; 201 struct irq_desc *desc = irq_desc + AIU_IRQ;
201 unsigned long flags; 202 unsigned long flags;
202 203
203 if (current_cpu_data.cputype == CPU_VR4111 || 204 if (current_cpu_data.cputype == CPU_VR4111 ||
@@ -212,7 +213,7 @@ EXPORT_SYMBOL(vr41xx_disable_aiuint);
212 213
213void vr41xx_enable_kiuint(uint16_t mask) 214void vr41xx_enable_kiuint(uint16_t mask)
214{ 215{
215 irq_desc_t *desc = irq_desc + KIU_IRQ; 216 struct irq_desc *desc = irq_desc + KIU_IRQ;
216 unsigned long flags; 217 unsigned long flags;
217 218
218 if (current_cpu_data.cputype == CPU_VR4111 || 219 if (current_cpu_data.cputype == CPU_VR4111 ||
@@ -227,7 +228,7 @@ EXPORT_SYMBOL(vr41xx_enable_kiuint);
227 228
228void vr41xx_disable_kiuint(uint16_t mask) 229void vr41xx_disable_kiuint(uint16_t mask)
229{ 230{
230 irq_desc_t *desc = irq_desc + KIU_IRQ; 231 struct irq_desc *desc = irq_desc + KIU_IRQ;
231 unsigned long flags; 232 unsigned long flags;
232 233
233 if (current_cpu_data.cputype == CPU_VR4111 || 234 if (current_cpu_data.cputype == CPU_VR4111 ||
@@ -242,7 +243,7 @@ EXPORT_SYMBOL(vr41xx_disable_kiuint);
242 243
243void vr41xx_enable_dsiuint(uint16_t mask) 244void vr41xx_enable_dsiuint(uint16_t mask)
244{ 245{
245 irq_desc_t *desc = irq_desc + DSIU_IRQ; 246 struct irq_desc *desc = irq_desc + DSIU_IRQ;
246 unsigned long flags; 247 unsigned long flags;
247 248
248 spin_lock_irqsave(&desc->lock, flags); 249 spin_lock_irqsave(&desc->lock, flags);
@@ -254,7 +255,7 @@ EXPORT_SYMBOL(vr41xx_enable_dsiuint);
254 255
255void vr41xx_disable_dsiuint(uint16_t mask) 256void vr41xx_disable_dsiuint(uint16_t mask)
256{ 257{
257 irq_desc_t *desc = irq_desc + DSIU_IRQ; 258 struct irq_desc *desc = irq_desc + DSIU_IRQ;
258 unsigned long flags; 259 unsigned long flags;
259 260
260 spin_lock_irqsave(&desc->lock, flags); 261 spin_lock_irqsave(&desc->lock, flags);
@@ -266,7 +267,7 @@ EXPORT_SYMBOL(vr41xx_disable_dsiuint);
266 267
267void vr41xx_enable_firint(uint16_t mask) 268void vr41xx_enable_firint(uint16_t mask)
268{ 269{
269 irq_desc_t *desc = irq_desc + FIR_IRQ; 270 struct irq_desc *desc = irq_desc + FIR_IRQ;
270 unsigned long flags; 271 unsigned long flags;
271 272
272 spin_lock_irqsave(&desc->lock, flags); 273 spin_lock_irqsave(&desc->lock, flags);
@@ -278,7 +279,7 @@ EXPORT_SYMBOL(vr41xx_enable_firint);
278 279
279void vr41xx_disable_firint(uint16_t mask) 280void vr41xx_disable_firint(uint16_t mask)
280{ 281{
281 irq_desc_t *desc = irq_desc + FIR_IRQ; 282 struct irq_desc *desc = irq_desc + FIR_IRQ;
282 unsigned long flags; 283 unsigned long flags;
283 284
284 spin_lock_irqsave(&desc->lock, flags); 285 spin_lock_irqsave(&desc->lock, flags);
@@ -290,7 +291,7 @@ EXPORT_SYMBOL(vr41xx_disable_firint);
290 291
291void vr41xx_enable_pciint(void) 292void vr41xx_enable_pciint(void)
292{ 293{
293 irq_desc_t *desc = irq_desc + PCI_IRQ; 294 struct irq_desc *desc = irq_desc + PCI_IRQ;
294 unsigned long flags; 295 unsigned long flags;
295 296
296 if (current_cpu_data.cputype == CPU_VR4122 || 297 if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -306,7 +307,7 @@ EXPORT_SYMBOL(vr41xx_enable_pciint);
306 307
307void vr41xx_disable_pciint(void) 308void vr41xx_disable_pciint(void)
308{ 309{
309 irq_desc_t *desc = irq_desc + PCI_IRQ; 310 struct irq_desc *desc = irq_desc + PCI_IRQ;
310 unsigned long flags; 311 unsigned long flags;
311 312
312 if (current_cpu_data.cputype == CPU_VR4122 || 313 if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -322,7 +323,7 @@ EXPORT_SYMBOL(vr41xx_disable_pciint);
322 323
323void vr41xx_enable_scuint(void) 324void vr41xx_enable_scuint(void)
324{ 325{
325 irq_desc_t *desc = irq_desc + SCU_IRQ; 326 struct irq_desc *desc = irq_desc + SCU_IRQ;
326 unsigned long flags; 327 unsigned long flags;
327 328
328 if (current_cpu_data.cputype == CPU_VR4122 || 329 if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -338,7 +339,7 @@ EXPORT_SYMBOL(vr41xx_enable_scuint);
338 339
339void vr41xx_disable_scuint(void) 340void vr41xx_disable_scuint(void)
340{ 341{
341 irq_desc_t *desc = irq_desc + SCU_IRQ; 342 struct irq_desc *desc = irq_desc + SCU_IRQ;
342 unsigned long flags; 343 unsigned long flags;
343 344
344 if (current_cpu_data.cputype == CPU_VR4122 || 345 if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -354,7 +355,7 @@ EXPORT_SYMBOL(vr41xx_disable_scuint);
354 355
355void vr41xx_enable_csiint(uint16_t mask) 356void vr41xx_enable_csiint(uint16_t mask)
356{ 357{
357 irq_desc_t *desc = irq_desc + CSI_IRQ; 358 struct irq_desc *desc = irq_desc + CSI_IRQ;
358 unsigned long flags; 359 unsigned long flags;
359 360
360 if (current_cpu_data.cputype == CPU_VR4122 || 361 if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -370,7 +371,7 @@ EXPORT_SYMBOL(vr41xx_enable_csiint);
370 371
371void vr41xx_disable_csiint(uint16_t mask) 372void vr41xx_disable_csiint(uint16_t mask)
372{ 373{
373 irq_desc_t *desc = irq_desc + CSI_IRQ; 374 struct irq_desc *desc = irq_desc + CSI_IRQ;
374 unsigned long flags; 375 unsigned long flags;
375 376
376 if (current_cpu_data.cputype == CPU_VR4122 || 377 if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -386,7 +387,7 @@ EXPORT_SYMBOL(vr41xx_disable_csiint);
386 387
387void vr41xx_enable_bcuint(void) 388void vr41xx_enable_bcuint(void)
388{ 389{
389 irq_desc_t *desc = irq_desc + BCU_IRQ; 390 struct irq_desc *desc = irq_desc + BCU_IRQ;
390 unsigned long flags; 391 unsigned long flags;
391 392
392 if (current_cpu_data.cputype == CPU_VR4122 || 393 if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -402,7 +403,7 @@ EXPORT_SYMBOL(vr41xx_enable_bcuint);
402 403
403void vr41xx_disable_bcuint(void) 404void vr41xx_disable_bcuint(void)
404{ 405{
405 irq_desc_t *desc = irq_desc + BCU_IRQ; 406 struct irq_desc *desc = irq_desc + BCU_IRQ;
406 unsigned long flags; 407 unsigned long flags;
407 408
408 if (current_cpu_data.cputype == CPU_VR4122 || 409 if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -442,7 +443,7 @@ static void end_sysint1_irq(unsigned int irq)
442 icu1_set(MSYSINT1REG, 1 << SYSINT1_IRQ_TO_PIN(irq)); 443 icu1_set(MSYSINT1REG, 1 << SYSINT1_IRQ_TO_PIN(irq));
443} 444}
444 445
445static struct hw_interrupt_type sysint1_irq_type = { 446static struct irq_chip sysint1_irq_type = {
446 .typename = "SYSINT1", 447 .typename = "SYSINT1",
447 .startup = startup_sysint1_irq, 448 .startup = startup_sysint1_irq,
448 .shutdown = shutdown_sysint1_irq, 449 .shutdown = shutdown_sysint1_irq,
@@ -478,7 +479,7 @@ static void end_sysint2_irq(unsigned int irq)
478 icu2_set(MSYSINT2REG, 1 << SYSINT2_IRQ_TO_PIN(irq)); 479 icu2_set(MSYSINT2REG, 1 << SYSINT2_IRQ_TO_PIN(irq));
479} 480}
480 481
481static struct hw_interrupt_type sysint2_irq_type = { 482static struct irq_chip sysint2_irq_type = {
482 .typename = "SYSINT2", 483 .typename = "SYSINT2",
483 .startup = startup_sysint2_irq, 484 .startup = startup_sysint2_irq,
484 .shutdown = shutdown_sysint2_irq, 485 .shutdown = shutdown_sysint2_irq,
@@ -490,7 +491,7 @@ static struct hw_interrupt_type sysint2_irq_type = {
490 491
491static inline int set_sysint1_assign(unsigned int irq, unsigned char assign) 492static inline int set_sysint1_assign(unsigned int irq, unsigned char assign)
492{ 493{
493 irq_desc_t *desc = irq_desc + irq; 494 struct irq_desc *desc = irq_desc + irq;
494 uint16_t intassign0, intassign1; 495 uint16_t intassign0, intassign1;
495 unsigned int pin; 496 unsigned int pin;
496 497
@@ -549,7 +550,7 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign)
549 550
550static inline int set_sysint2_assign(unsigned int irq, unsigned char assign) 551static inline int set_sysint2_assign(unsigned int irq, unsigned char assign)
551{ 552{
552 irq_desc_t *desc = irq_desc + irq; 553 struct irq_desc *desc = irq_desc + irq;
553 uint16_t intassign2, intassign3; 554 uint16_t intassign2, intassign3;
554 unsigned int pin; 555 unsigned int pin;
555 556