[PATCH vfs-2.6 1/6] vfs: replace parent == dentry->d_parent by IS_ROOT()
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / m68knommu / platform / 68360 / ints.c
blobc36781157e097016fd2822c82dd300c1c08d62e5
1 /*
2 * linux/arch/$(ARCH)/platform/$(PLATFORM)/ints.c
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file COPYING in the main directory of this archive
6 * for more details.
8 * Copyright (c) 2000 Michael Leslie <mleslie@lineo.com>
9 * Copyright (c) 1996 Roman Zippel
10 * Copyright (c) 1999 D. Jeff Dionne <jeff@uclinux.org>
13 #include <linux/types.h>
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/interrupt.h>
17 #include <linux/irq.h>
18 #include <asm/traps.h>
19 #include <asm/machdep.h>
20 #include <asm/m68360.h>
22 /* from quicc/commproc.c: */
23 extern QUICC *pquicc;
24 extern void cpm_interrupt_init(void);
26 #define INTERNAL_IRQS (96)
28 /* assembler routines */
29 asmlinkage void system_call(void);
30 asmlinkage void buserr(void);
31 asmlinkage void trap(void);
32 asmlinkage void bad_interrupt(void);
33 asmlinkage void inthandler(void);
35 extern void *_ramvec[];
37 /* The number of spurious interrupts */
38 volatile unsigned int num_spurious;
41 * This function should be called during kernel startup to initialize
42 * the vector table.
44 void init_vectors(void)
46 int i;
47 int vba = (CPM_VECTOR_BASE<<4);
49 /* set up the vectors */
50 _ramvec[2] = buserr;
51 _ramvec[3] = trap;
52 _ramvec[4] = trap;
53 _ramvec[5] = trap;
54 _ramvec[6] = trap;
55 _ramvec[7] = trap;
56 _ramvec[8] = trap;
57 _ramvec[9] = trap;
58 _ramvec[10] = trap;
59 _ramvec[11] = trap;
60 _ramvec[12] = trap;
61 _ramvec[13] = trap;
62 _ramvec[14] = trap;
63 _ramvec[15] = trap;
65 _ramvec[32] = system_call;
66 _ramvec[33] = trap;
68 cpm_interrupt_init();
70 /* set up CICR for vector base address and irq level */
71 /* irl = 4, hp = 1f - see MC68360UM p 7-377 */
72 pquicc->intr_cicr = 0x00e49f00 | vba;
74 /* CPM interrupt vectors: (p 7-376) */
75 _ramvec[vba+CPMVEC_ERROR] = bad_interrupt; /* Error */
76 _ramvec[vba+CPMVEC_PIO_PC11] = inthandler; /* pio - pc11 */
77 _ramvec[vba+CPMVEC_PIO_PC10] = inthandler; /* pio - pc10 */
78 _ramvec[vba+CPMVEC_SMC2] = inthandler; /* smc2/pip */
79 _ramvec[vba+CPMVEC_SMC1] = inthandler; /* smc1 */
80 _ramvec[vba+CPMVEC_SPI] = inthandler; /* spi */
81 _ramvec[vba+CPMVEC_PIO_PC9] = inthandler; /* pio - pc9 */
82 _ramvec[vba+CPMVEC_TIMER4] = inthandler; /* timer 4 */
83 _ramvec[vba+CPMVEC_RESERVED1] = inthandler; /* reserved */
84 _ramvec[vba+CPMVEC_PIO_PC8] = inthandler; /* pio - pc8 */
85 _ramvec[vba+CPMVEC_PIO_PC7] = inthandler; /* pio - pc7 */
86 _ramvec[vba+CPMVEC_PIO_PC6] = inthandler; /* pio - pc6 */
87 _ramvec[vba+CPMVEC_TIMER3] = inthandler; /* timer 3 */
88 _ramvec[vba+CPMVEC_RISCTIMER] = inthandler; /* reserved */
89 _ramvec[vba+CPMVEC_PIO_PC5] = inthandler; /* pio - pc5 */
90 _ramvec[vba+CPMVEC_PIO_PC4] = inthandler; /* pio - pc4 */
91 _ramvec[vba+CPMVEC_RESERVED2] = inthandler; /* reserved */
92 _ramvec[vba+CPMVEC_RISCTIMER] = inthandler; /* timer table */
93 _ramvec[vba+CPMVEC_TIMER2] = inthandler; /* timer 2 */
94 _ramvec[vba+CPMVEC_RESERVED3] = inthandler; /* reserved */
95 _ramvec[vba+CPMVEC_IDMA2] = inthandler; /* idma 2 */
96 _ramvec[vba+CPMVEC_IDMA1] = inthandler; /* idma 1 */
97 _ramvec[vba+CPMVEC_SDMA_CB_ERR] = inthandler; /* sdma channel bus error */
98 _ramvec[vba+CPMVEC_PIO_PC3] = inthandler; /* pio - pc3 */
99 _ramvec[vba+CPMVEC_PIO_PC2] = inthandler; /* pio - pc2 */
100 /* _ramvec[vba+CPMVEC_TIMER1] = cpm_isr_timer1; */ /* timer 1 */
101 _ramvec[vba+CPMVEC_TIMER1] = inthandler; /* timer 1 */
102 _ramvec[vba+CPMVEC_PIO_PC1] = inthandler; /* pio - pc1 */
103 _ramvec[vba+CPMVEC_SCC4] = inthandler; /* scc 4 */
104 _ramvec[vba+CPMVEC_SCC3] = inthandler; /* scc 3 */
105 _ramvec[vba+CPMVEC_SCC2] = inthandler; /* scc 2 */
106 _ramvec[vba+CPMVEC_SCC1] = inthandler; /* scc 1 */
107 _ramvec[vba+CPMVEC_PIO_PC0] = inthandler; /* pio - pc0 */
110 /* turn off all CPM interrupts */
111 pquicc->intr_cimr = 0x00000000;
114 void enable_vector(unsigned int irq)
116 pquicc->intr_cimr |= (1 << irq);
119 void disable_vector(unsigned int irq)
121 pquicc->intr_cimr &= ~(1 << irq);
124 void ack_vector(unsigned int irq)
126 pquicc->intr_cisr = (1 << irq);