allow coexistance of N build and AC build.
[tomato.git] / release / src-rt-6.x / linux / linux-2.6 / arch / m68knommu / platform / 5307 / vectors.c
blob2a8b0d044ce50a356fba376f0c5bcb2b8b393bc4
1 /***************************************************************************/
3 /*
4 * linux/arch/m68knommu/platform/5307/vectors.c
6 * Copyright (C) 1999-2003, Greg Ungerer <gerg@snapgear.com>
7 */
9 /***************************************************************************/
11 #include <linux/kernel.h>
12 #include <linux/sched.h>
13 #include <linux/param.h>
14 #include <linux/init.h>
15 #include <linux/unistd.h>
16 #include <linux/delay.h>
17 #include <asm/irq.h>
18 #include <asm/dma.h>
19 #include <asm/traps.h>
20 #include <asm/machdep.h>
21 #include <asm/coldfire.h>
22 #include <asm/mcftimer.h>
23 #include <asm/mcfsim.h>
24 #include <asm/mcfdma.h>
25 #include <asm/mcfwdebug.h>
27 /***************************************************************************/
29 #ifdef TRAP_DBG_INTERRUPT
31 asmlinkage void dbginterrupt_c(struct frame *fp)
33 extern void dump(struct pt_regs *fp);
34 printk(KERN_DEBUG "%s(%d): BUS ERROR TRAP\n", __FILE__, __LINE__);
35 dump((struct pt_regs *) fp);
36 asm("halt");
39 #endif
41 /***************************************************************************/
43 extern e_vector *_ramvec;
45 void set_evector(int vecnum, void (*handler)(void))
47 if (vecnum >= 0 && vecnum <= 255)
48 _ramvec[vecnum] = handler;
51 /***************************************************************************/
53 /* Assembler routines */
54 asmlinkage void buserr(void);
55 asmlinkage void trap(void);
56 asmlinkage void system_call(void);
57 asmlinkage void inthandler(void);
59 void __init coldfire_trap_init(void)
61 int i;
64 * There is a common trap handler and common interrupt
65 * handler that handle almost every vector. We treat
66 * the system call and bus error special, they get their
67 * own first level handlers.
69 for (i = 3; (i <= 23); i++)
70 _ramvec[i] = trap;
71 for (i = 33; (i <= 63); i++)
72 _ramvec[i] = trap;
73 for (i = 24; (i <= 31); i++)
74 _ramvec[i] = inthandler;
75 for (i = 64; (i < 255); i++)
76 _ramvec[i] = inthandler;
77 _ramvec[255] = 0;
79 _ramvec[2] = buserr;
80 _ramvec[32] = system_call;
82 #ifdef TRAP_DBG_INTERRUPT
83 _ramvec[12] = dbginterrupt;
84 #endif
87 /***************************************************************************/
89 void coldfire_reset(void)
91 HARD_RESET_NOW();
94 /***************************************************************************/