2 * linux/arch/arm/mach-integrator/irq.c
4 * Copyright (C) 1999 ARM Limited
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; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #include <linux/init.h>
21 #include <linux/stddef.h>
22 #include <linux/list.h>
23 #include <linux/timer.h>
25 #include <asm/hardware.h>
29 #include <asm/mach/irq.h>
32 * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx
35 * Setup a VA for the Integrator interrupt controller (for header #0,
38 #define VA_IC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE)
39 #define VA_CMIC_BASE IO_ADDRESS(INTEGRATOR_HDR_BASE) + INTEGRATOR_HDR_IC_OFFSET
41 #define ALLPCI ( (1 << IRQ_PCIINT0) | (1 << IRQ_PCIINT1) | (1 << IRQ_PCIINT2) | (1 << IRQ_PCIINT3) )
43 static void sc_mask_irq(unsigned int irq)
45 __raw_writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_CLEAR);
48 static void sc_unmask_irq(unsigned int irq)
50 __raw_writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_SET);
53 void __init integrator_init_irq(void)
57 for (i = 0; i < NR_IRQS; i++) {
58 if (((1 << i) & INTEGRATOR_SC_VALID_INT) != 0) {
59 irq_desc[i].valid = 1;
60 irq_desc[i].probe_ok = 1;
61 irq_desc[i].mask_ack = sc_mask_irq;
62 irq_desc[i].mask = sc_mask_irq;
63 irq_desc[i].unmask = sc_unmask_irq;
67 /* Disable all interrupts initially. */
68 /* Do the core module ones */
69 __raw_writel(-1, VA_CMIC_BASE + IRQ_ENABLE_CLEAR);
71 /* do the header card stuff next */
72 __raw_writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR);
73 __raw_writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR);