blob: 1053f694cb47867092f24d53dac58381e3b5fb05 [file] [log] [blame]
Wolfgang Denk6cb142f2006-03-12 02:12:27 +01001/*
2 * U-boot - board.c First C file to be called contains init routines
3 *
Mike Frysingerd5bffeb2008-02-19 00:54:20 -05004 * Copyright (c) 2005-2008 Analog Devices Inc.
Wolfgang Denk6cb142f2006-03-12 02:12:27 +01005 *
6 * (C) Copyright 2000-2004
7 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
8 *
Mike Frysingerd5bffeb2008-02-19 00:54:20 -05009 * Licensed under the GPL-2 or later.
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010010 */
11
12#include <common.h>
13#include <command.h>
Jean-Christophe PLAGNIOL-VILLARD52cb4d42009-05-16 12:14:54 +020014#include <stdio_dev.h>
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010015#include <environment.h>
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050016#include <malloc.h>
17#include <net.h>
Peter Tyser561858e2008-11-03 09:30:59 -060018#include <timestamp.h>
Mike Frysinger01815c22008-10-06 03:52:24 -040019#include <status_led.h>
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050020#include <version.h>
21
Aubrey.Li3f0606a2007-03-09 13:38:44 +080022#include <asm/cplb.h>
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050023#include <asm/mach-common/bits/mpu.h>
24
25#ifdef CONFIG_CMD_NAND
26#include <nand.h> /* cannot even include nand.h if it isnt configured */
27#endif
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010028
Mike Frysinger9171fc82008-03-30 15:46:13 -040029#if defined(CONFIG_POST)
Aubrey.Li3f0606a2007-03-09 13:38:44 +080030#include <post.h>
31int post_flag;
32#endif
Wolfgang Denkd87080b2006-03-31 18:32:53 +020033
Wolfgang Denk1218abf2007-09-15 20:48:41 +020034DECLARE_GLOBAL_DATA_PTR;
35
Peter Tyser561858e2008-11-03 09:30:59 -060036const char version_string[] = U_BOOT_VERSION " ("U_BOOT_DATE" - "U_BOOT_TIME")";
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010037
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050038__attribute__((always_inline))
39static inline void serial_early_puts(const char *s)
40{
41#ifdef CONFIG_DEBUG_EARLY_SERIAL
42 serial_puts("Early: ");
43 serial_puts(s);
44#endif
45}
46
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010047static int display_banner(void)
48{
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050049 printf("\n\n%s\n\n", version_string);
Mike Frysingerfc68f9f2009-01-06 06:16:19 -050050 printf("CPU: ADSP " MK_STR(CONFIG_BFIN_CPU) " "
51 "(Detected Rev: 0.%d) "
52 "(%s boot)\n",
53 bfin_revid(),
54 get_bfin_boot_mode(CONFIG_BFIN_BOOT_MODE));
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050055 return 0;
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010056}
57
58static int init_baudrate(void)
59{
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050060 char baudrate[15];
61 int i = getenv_r("baudrate", baudrate, sizeof(baudrate));
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010062 gd->bd->bi_baudrate = gd->baudrate = (i > 0)
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050063 ? simple_strtoul(baudrate, NULL, 10)
Aubrey.Li3f0606a2007-03-09 13:38:44 +080064 : CONFIG_BAUDRATE;
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050065 return 0;
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010066}
67
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010068static void display_global_data(void)
69{
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050070#ifdef CONFIG_DEBUG_EARLY_SERIAL
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010071 bd_t *bd;
72 bd = gd->bd;
Mike Frysingerf541e1d2009-08-24 19:03:18 -040073 printf(" gd: %p\n", gd);
74 printf(" |-flags: %lx\n", gd->flags);
75 printf(" |-board_type: %lx\n", gd->board_type);
76 printf(" |-baudrate: %lu\n", gd->baudrate);
77 printf(" |-have_console: %lx\n", gd->have_console);
78 printf(" |-ram_size: %lx\n", gd->ram_size);
79 printf(" |-reloc_off: %lx\n", gd->reloc_off);
80 printf(" |-env_addr: %lx\n", gd->env_addr);
81 printf(" |-env_valid: %lx\n", gd->env_valid);
82 printf(" |-jt(%p): %p\n", gd->jt, *(gd->jt));
83 printf(" \\-bd: %p\n", gd->bd);
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050084 printf(" |-bi_baudrate: %x\n", bd->bi_baudrate);
Mike Frysingerf541e1d2009-08-24 19:03:18 -040085 printf(" |-bi_ip_addr: %lx\n", bd->bi_ip_addr);
86 printf(" |-bi_boot_params: %lx\n", bd->bi_boot_params);
87 printf(" |-bi_memstart: %lx\n", bd->bi_memstart);
88 printf(" |-bi_memsize: %lx\n", bd->bi_memsize);
89 printf(" |-bi_flashstart: %lx\n", bd->bi_flashstart);
90 printf(" |-bi_flashsize: %lx\n", bd->bi_flashsize);
91 printf(" \\-bi_flashoffset: %lx\n", bd->bi_flashoffset);
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010092#endif
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050093}
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010094
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050095#define CPLB_PAGE_SIZE (4 * 1024 * 1024)
96#define CPLB_PAGE_MASK (~(CPLB_PAGE_SIZE - 1))
Aubrey.Li3f0606a2007-03-09 13:38:44 +080097void init_cplbtables(void)
98{
Mike Frysingerd5bffeb2008-02-19 00:54:20 -050099 volatile uint32_t *ICPLB_ADDR, *ICPLB_DATA;
100 volatile uint32_t *DCPLB_ADDR, *DCPLB_DATA;
101 uint32_t extern_memory;
102 size_t i;
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800103
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500104 void icplb_add(uint32_t addr, uint32_t data)
105 {
106 *(ICPLB_ADDR + i) = addr;
107 *(ICPLB_DATA + i) = data;
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800108 }
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500109 void dcplb_add(uint32_t addr, uint32_t data)
110 {
111 *(DCPLB_ADDR + i) = addr;
112 *(DCPLB_DATA + i) = data;
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800113 }
114
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500115 /* populate a few common entries ... we'll let
116 * the memory map and cplb exception handler do
117 * the rest of the work.
118 */
119 i = 0;
120 ICPLB_ADDR = (uint32_t *)ICPLB_ADDR0;
121 ICPLB_DATA = (uint32_t *)ICPLB_DATA0;
122 DCPLB_ADDR = (uint32_t *)DCPLB_ADDR0;
123 DCPLB_DATA = (uint32_t *)DCPLB_DATA0;
124
125 icplb_add(0xFFA00000, L1_IMEMORY);
126 dcplb_add(0xFF800000, L1_DMEMORY);
127 ++i;
128
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200129 icplb_add(CONFIG_SYS_MONITOR_BASE & CPLB_PAGE_MASK, SDRAM_IKERNEL);
130 dcplb_add(CONFIG_SYS_MONITOR_BASE & CPLB_PAGE_MASK, SDRAM_DKERNEL);
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500131 ++i;
132
133 /* If the monitor crosses a 4 meg boundary, we'll need
134 * to lock two entries for it.
135 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200136 if ((CONFIG_SYS_MONITOR_BASE & CPLB_PAGE_MASK) != ((CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) & CPLB_PAGE_MASK)) {
137 icplb_add((CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) & CPLB_PAGE_MASK, SDRAM_IKERNEL);
138 dcplb_add((CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) & CPLB_PAGE_MASK, SDRAM_DKERNEL);
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500139 ++i;
140 }
141
142 icplb_add(0x20000000, SDRAM_INON_CHBL);
143 dcplb_add(0x20000000, SDRAM_EBIU);
144 ++i;
145
146 /* Add entries for the rest of external RAM up to the bootrom */
147 extern_memory = 0;
148
149#ifdef CONFIG_DEBUG_NULL_PTR
150 icplb_add(extern_memory, (SDRAM_IKERNEL & ~PAGE_SIZE_MASK) | PAGE_SIZE_1KB);
151 dcplb_add(extern_memory, (SDRAM_DKERNEL & ~PAGE_SIZE_MASK) | PAGE_SIZE_1KB);
152 ++i;
153 icplb_add(extern_memory, SDRAM_IKERNEL);
154 dcplb_add(extern_memory, SDRAM_DKERNEL);
155 extern_memory += CPLB_PAGE_SIZE;
156 ++i;
157#endif
158
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200159 while (i < 16 && extern_memory < (CONFIG_SYS_MONITOR_BASE & CPLB_PAGE_MASK)) {
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500160 icplb_add(extern_memory, SDRAM_IGENERIC);
161 dcplb_add(extern_memory, SDRAM_DGENERIC);
162 extern_memory += CPLB_PAGE_SIZE;
163 ++i;
164 }
165 while (i < 16) {
166 icplb_add(0, 0);
167 dcplb_add(0, 0);
168 ++i;
169 }
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800170}
171
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100172/*
173 * All attempts to come up with a "common" initialization sequence
174 * that works for all boards and architectures failed: some of the
175 * requirements are just _too_ different. To get rid of the resulting
176 * mess of board dependend #ifdef'ed code we now make the whole
177 * initialization sequence configurable to the user.
178 *
179 * The requirements for any new initalization function is simple: it
180 * receives a pointer to the "global data" structure as it's only
181 * argument, and returns an integer return code, where 0 means
182 * "continue" and != 0 means "fatal error, hang the system".
183 */
184
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500185extern int exception_init(void);
186extern int irq_init(void);
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500187extern int timer_init(void);
188
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100189void board_init_f(ulong bootflag)
190{
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100191 ulong addr;
192 bd_t *bd;
Mike Frysinger6dadc912008-10-20 16:15:04 -0400193 char buf[32];
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800194
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500195#ifdef CONFIG_BOARD_EARLY_INIT_F
196 serial_early_puts("Board early init flash\n");
197 board_early_init_f();
198#endif
199
200 serial_early_puts("Init CPLB tables\n");
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800201 init_cplbtables();
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100202
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500203 serial_early_puts("Exceptions setup\n");
204 exception_init();
205
206#ifndef CONFIG_ICACHE_OFF
207 serial_early_puts("Turn on ICACHE\n");
208 icache_enable();
209#endif
210#ifndef CONFIG_DCACHE_OFF
211 serial_early_puts("Turn on DCACHE\n");
212 dcache_enable();
213#endif
214
Mike Frysinger78a0ba72008-10-06 03:57:39 -0400215#ifdef DEBUG
216 if (CONFIG_SYS_GBL_DATA_SIZE < sizeof(*gd))
217 hang();
218#endif
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500219 serial_early_puts("Init global data\n");
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200220 gd = (gd_t *) (CONFIG_SYS_GBL_DATA_ADDR);
Mike Frysinger78a0ba72008-10-06 03:57:39 -0400221 memset((void *)gd, 0, CONFIG_SYS_GBL_DATA_SIZE);
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100222
223 /* Board data initialization */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200224 addr = (CONFIG_SYS_GBL_DATA_ADDR + sizeof(gd_t));
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100225
226 /* Align to 4 byte boundary */
Wolfgang Denk8e7b7032006-03-12 02:55:22 +0100227 addr &= ~(4 - 1);
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800228 bd = (bd_t *) addr;
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100229 gd->bd = bd;
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800230 memset((void *)bd, 0, sizeof(bd_t));
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100231
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500232 bd->bi_r_version = version_string;
233 bd->bi_cpu = MK_STR(CONFIG_BFIN_CPU);
234 bd->bi_board_name = BFIN_BOARD_NAME;
235 bd->bi_vco = get_vco();
236 bd->bi_cclk = get_cclk();
237 bd->bi_sclk = get_sclk();
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800238
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500239 /* Initialize */
240 serial_early_puts("IRQ init\n");
241 irq_init();
242 serial_early_puts("Environment init\n");
243 env_init();
244 serial_early_puts("Baudrate init\n");
245 init_baudrate();
246 serial_early_puts("Serial init\n");
247 serial_init();
248 serial_early_puts("Console init flash\n");
249 console_init_f();
250 serial_early_puts("End of early debugging\n");
251 display_banner();
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800252
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100253 checkboard();
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100254 timer_init();
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500255
Mike Frysinger6dadc912008-10-20 16:15:04 -0400256 printf("Clock: VCO: %s MHz, ", strmhz(buf, get_vco()));
257 printf("Core: %s MHz, ", strmhz(buf, get_cclk()));
258 printf("System: %s MHz\n", strmhz(buf, get_sclk()));
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500259
260 printf("RAM: ");
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100261 print_size(initdram(0), "\n");
Mike Frysinger9171fc82008-03-30 15:46:13 -0400262#if defined(CONFIG_POST)
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800263 post_init_f();
264 post_bootmode_init();
265 post_run(NULL, POST_ROM | post_bootmode_get(0));
266#endif
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500267
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100268 board_init_r((gd_t *) gd, 0x20000010);
269}
270
Mike Frysinger8996d162009-02-22 16:02:27 -0500271static void board_net_init_r(bd_t *bd)
272{
273#ifdef CONFIG_CMD_NET
274 uchar enetaddr[6];
275 char *s;
276
277 if ((s = getenv("bootfile")) != NULL)
278 copy_filename(BootFile, s, sizeof(BootFile));
279
280 bd->bi_ip_addr = getenv_IPaddr("ipaddr");
281
282 printf("Net: ");
283 eth_initialize(gd->bd);
284
285 eth_getenv_enetaddr("ethaddr", enetaddr);
286 printf("MAC: %pM\n", enetaddr);
287#endif
288}
289
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100290void board_init_r(gd_t * id, ulong dest_addr)
291{
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100292 extern void malloc_bin_reloc(void);
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500293 char *s;
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100294 bd_t *bd;
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100295 gd = id;
296 gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
297 bd = gd->bd;
298
Mike Frysinger9171fc82008-03-30 15:46:13 -0400299#if defined(CONFIG_POST)
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800300 post_output_backlog();
301 post_reloc();
302#endif
303
Stefan Roesec790b042009-05-11 15:50:12 +0200304 /* initialize malloc() area */
Peter Tysera483a162009-08-21 23:05:20 -0500305 mem_malloc_init(CONFIG_SYS_MALLOC_BASE, CONFIG_SYS_MALLOC_LEN);
Stefan Roesec790b042009-05-11 15:50:12 +0200306 malloc_bin_reloc();
307
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200308#if !defined(CONFIG_SYS_NO_FLASH)
Mike Frysingerb6edc712008-10-06 04:00:07 -0400309 /* Initialize the flash and protect u-boot by default */
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500310 extern flash_info_t flash_info[];
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500311 puts("Flash: ");
Mike Frysinger45c48952008-10-06 04:01:26 -0400312 ulong size = flash_init();
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500313 print_size(size, "\n");
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200314 flash_protect(FLAG_PROTECT_SET, CONFIG_SYS_FLASH_BASE,
Mike Frysingerb6edc712008-10-06 04:00:07 -0400315 CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN - 1,
316 &flash_info[0]);
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200317 bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100318 bd->bi_flashsize = size;
319 bd->bi_flashoffset = 0;
320#else
321 bd->bi_flashstart = 0;
322 bd->bi_flashsize = 0;
323 bd->bi_flashoffset = 0;
324#endif
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100325
Mike Frysinger39782722008-10-06 03:55:25 -0400326#ifdef CONFIG_CMD_NAND
327 puts("NAND: ");
328 nand_init(); /* go init the NAND */
329#endif
330
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100331 /* relocate environment function pointers etc. */
332 env_relocate();
333
Jean-Christophe PLAGNIOL-VILLARD52cb4d42009-05-16 12:14:54 +0200334 /* Initialize stdio devices */
335 stdio_init();
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100336 jumptable_init();
337
338 /* Initialize the console (after the relocation and devices init) */
339 console_init_r();
340
Mike Frysinger01815c22008-10-06 03:52:24 -0400341#ifdef CONFIG_STATUS_LED
342 status_led_set(STATUS_LED_BOOT, STATUS_LED_BLINKING);
343 status_led_set(STATUS_LED_CRASH, STATUS_LED_OFF);
344#endif
345
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100346 /* Initialize from environment */
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500347 if ((s = getenv("loadaddr")) != NULL)
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100348 load_addr = simple_strtoul(s, NULL, 16);
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800349
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100350#if defined(CONFIG_MISC_INIT_R)
351 /* miscellaneous platform dependent initialisations */
352 misc_init_r();
353#endif
354
Mike Frysinger8996d162009-02-22 16:02:27 -0500355 board_net_init_r(bd);
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800356
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800357 display_global_data();
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800358
Mike Frysinger9171fc82008-03-30 15:46:13 -0400359#if defined(CONFIG_POST)
Aubrey.Li3f0606a2007-03-09 13:38:44 +0800360 if (post_flag)
361 post_run(NULL, POST_RAM | post_bootmode_get(0));
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100362#endif
363
Mike Frysinger909878f2009-07-09 01:15:05 -0400364 if (bfin_os_log_check()) {
365 puts("\nLog buffer from operating system:\n");
366 bfin_os_log_dump();
367 puts("\n");
368 }
369
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100370 /* main_loop() can return to retry autoboot, if so just run it again. */
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500371 for (;;)
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100372 main_loop();
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100373}
374
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100375void hang(void)
376{
Mike Frysinger01815c22008-10-06 03:52:24 -0400377#ifdef CONFIG_STATUS_LED
378 status_led_set(STATUS_LED_BOOT, STATUS_LED_OFF);
379 status_led_set(STATUS_LED_CRASH, STATUS_LED_BLINKING);
380#endif
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100381 puts("### ERROR ### Please RESET the board ###\n");
Mike Frysingerd5bffeb2008-02-19 00:54:20 -0500382 while (1)
383 /* If a JTAG emulator is hooked up, we'll automatically trigger
384 * a breakpoint in it. If one isn't, this is just a NOP.
385 */
386 asm("emuexcpt;");
Wolfgang Denk6cb142f2006-03-12 02:12:27 +0100387}