blob: 5ce063990938855ab1e0dd9a7e453d7c2f1327ce [file] [log] [blame]
wdenk4e5ca3e2003-12-08 01:34:36 +00001/*
2 * (C) Copyright 2000-2003
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA
22 */
23
24#include <common.h>
25#include <watchdog.h>
26#include <command.h>
27#ifdef CONFIG_M5272
28#include <asm/m5272.h>
29#endif
30#ifdef CONFIG_M5282
31#include <asm/m5282.h>
32#endif
33#include <asm/cache.h>
34
35int do_reset (cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[])
36{
37 return 0;
38}
39
40unsigned long get_tbclk (void)
41{
42 return CFG_HZ;
43}
44
45int checkcpu (void)
46{
47#ifdef CONFIG_M5272
48 puts ("MOTOROLA Coldfire MCF5272\n");
49#endif
50#ifdef CONFIG_M5282
51 puts ("MOTOROLA Coldfire MCF5282\n");
52#endif
53 return 0;
54}
55
56void do_exception (void)
57{
58 printf ("\n\n*** Unexpected exception ... Reset Board! ***\n");
59 for (;;);
60}
61
62void do_buserror (void)
63{
64 printf ("\n\n*** Bus error ... Reset Board! ***\n");
65 for (;;);
66}
67
68void do_addresserror (void)
69{
70 printf ("\n\n*** Address error ... Reset Board! ***\n");
71 for (;;);
72}
73
74void trap_init (ulong value)
75{
76 extern void buserror_handler (void);
77 extern void addresserror_handler (void);
78 extern void exception_handler (void);
79 unsigned long *vec = 0;
80 int i;
81
82 vec[2] = buserror_handler;
83 vec[3] = addresserror_handler;
84 for (i = 4; i < 256; i++) {
85 vec[i] = exception_handler;
86 }
87}