2 * linux/arch/arm/mach-xscale/irq.c
4 * Author: Deepak Saxena
5 * Copyright: (C) 2001 MontaVista Software Inc.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * Based on IOP80310 code. Currently there's nothing more than the
12 * 80200 on chip interrupts. That'll change once the hardware adds
13 * support for PCI though.
15 #include <linux/init.h>
16 #include <linux/interrupt.h>
18 #include <asm/mach/irq.h>
20 #include <asm/hardware.h>
22 static void xs80200_irq_mask (unsigned int irq)
25 asm ("mrc p13, 0, %0, c0, c0, 0" : "=r" (INTCTL));
27 case IRQ_XS80200_BCU: INTCTL &= ~(1<<3); break;
28 case IRQ_XS80200_PMU: INTCTL &= ~(1<<2); break;
29 case IRQ_XS80200_EXTIRQ: INTCTL &= ~(1<<1); break;
30 case IRQ_XS80200_EXTFIQ: INTCTL &= ~(1<<0); break;
32 asm ("mcr p13, 0, %0, c0, c0, 0" : : "r" (INTCTL));
35 static void xs80200_irq_unmask (unsigned int irq)
38 asm ("mrc p13, 0, %0, c0, c0, 0" : "=r" (INTCTL));
40 case IRQ_XS80200_BCU: INTCTL |= (1<<3); break;
41 case IRQ_XS80200_PMU: INTCTL |= (1<<2); break;
42 case IRQ_XS80200_EXTIRQ: INTCTL |= (1<<1); break;
43 case IRQ_XS80200_EXTFIQ: INTCTL |= (1<<0); break;
45 asm ("mcr p13, 0, %0, c0, c0, 0" : : "r" (INTCTL));
48 void __init adifcc_init_irq(void)
52 for (i = 0; i < NR_XS80200_IRQS; i++) {
53 irq_desc[i].valid = 1;
54 irq_desc[i].probe_ok = 0;
55 irq_desc[i].mask_ack = xs80200_irq_mask;
56 irq_desc[i].mask = xs80200_irq_mask;
57 irq_desc[i].unmask = xs80200_irq_unmask;