1 /***************************************************************************/
4 * linux/arch/m68knommu/platform/5307/vectors.c
6 * Copyright (C) 1999-2003, Greg Ungerer <gerg@snapgear.com>
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>
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);
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)
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++)
71 for (i = 33; (i <= 63); i++)
73 for (i = 24; (i <= 31); i++)
74 _ramvec[i] = inthandler;
75 for (i = 64; (i < 255); i++)
76 _ramvec[i] = inthandler;
80 _ramvec[32] = system_call;
82 #ifdef TRAP_DBG_INTERRUPT
83 _ramvec[12] = dbginterrupt;
87 /***************************************************************************/
89 void coldfire_reset(void)
94 /***************************************************************************/