2002-11-18 00:14:45 +00:00
|
|
|
/*
|
2011-04-13 09:43:26 +00:00
|
|
|
* (C) Copyright 2008-2011
|
|
|
|
* Graeme Russ, <graeme.russ@gmail.com>
|
|
|
|
*
|
2002-11-18 00:14:45 +00:00
|
|
|
* (C) Copyright 2002
|
2011-08-04 16:45:45 +00:00
|
|
|
* Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
|
2003-06-27 21:31:46 +00:00
|
|
|
*
|
2002-11-18 00:14:45 +00:00
|
|
|
* (C) Copyright 2002
|
2011-04-13 09:43:26 +00:00
|
|
|
* Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
|
2003-06-27 21:31:46 +00:00
|
|
|
*
|
2002-11-18 00:14:45 +00:00
|
|
|
* (C) Copyright 2002
|
|
|
|
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
|
|
|
* Marius Groeger <mgroeger@sysgo.de>
|
|
|
|
*
|
|
|
|
* See file CREDITS for list of people who contributed to this
|
|
|
|
* project.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <watchdog.h>
|
|
|
|
#include <command.h>
|
2009-05-16 10:14:54 +00:00
|
|
|
#include <stdio_dev.h>
|
2002-11-18 00:14:45 +00:00
|
|
|
#include <version.h>
|
|
|
|
#include <malloc.h>
|
|
|
|
#include <net.h>
|
|
|
|
#include <ide.h>
|
2010-04-23 14:05:47 +00:00
|
|
|
#include <serial.h>
|
2011-04-13 09:43:28 +00:00
|
|
|
#include <asm/u-boot-x86.h>
|
2011-12-31 11:58:15 +00:00
|
|
|
#include <asm/processor.h>
|
2002-11-18 00:14:45 +00:00
|
|
|
|
2009-10-10 10:42:21 +00:00
|
|
|
#ifdef CONFIG_BITBANGMII
|
|
|
|
#include <miiphy.h>
|
|
|
|
#endif
|
|
|
|
|
2002-11-18 00:14:45 +00:00
|
|
|
/************************************************************************
|
|
|
|
* Init Utilities *
|
|
|
|
************************************************************************
|
|
|
|
* Some of this code should be moved into the core functions,
|
|
|
|
* or dropped completely,
|
|
|
|
* but let's get it working (again) first...
|
|
|
|
*/
|
2011-11-08 02:33:15 +00:00
|
|
|
static int init_baudrate(void)
|
2002-11-18 00:14:45 +00:00
|
|
|
{
|
2011-10-13 14:43:14 +00:00
|
|
|
gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE);
|
|
|
|
return 0;
|
2002-11-18 00:14:45 +00:00
|
|
|
}
|
|
|
|
|
2011-11-08 02:33:15 +00:00
|
|
|
static int display_banner(void)
|
2002-11-18 00:14:45 +00:00
|
|
|
{
|
|
|
|
|
2011-11-08 02:33:15 +00:00
|
|
|
printf("\n\n%s\n\n", version_string);
|
2002-11-18 00:14:45 +00:00
|
|
|
|
2011-11-08 02:33:15 +00:00
|
|
|
return 0;
|
2002-11-18 00:14:45 +00:00
|
|
|
}
|
|
|
|
|
2011-11-08 02:33:15 +00:00
|
|
|
static int display_dram_config(void)
|
2002-11-18 00:14:45 +00:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2011-11-08 02:33:15 +00:00
|
|
|
puts("DRAM Configuration:\n");
|
2002-11-18 00:14:45 +00:00
|
|
|
|
2011-11-08 02:33:15 +00:00
|
|
|
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
|
|
|
|
printf("Bank #%d: %08lx ", i, gd->bd->bi_dram[i].start);
|
|
|
|
print_size(gd->bd->bi_dram[i].size, "\n");
|
2002-11-18 00:14:45 +00:00
|
|
|
}
|
2003-06-27 21:31:46 +00:00
|
|
|
|
2011-11-08 02:33:15 +00:00
|
|
|
return 0;
|
2002-11-18 00:14:45 +00:00
|
|
|
}
|
|
|
|
|
2011-11-08 02:33:20 +00:00
|
|
|
#ifndef CONFIG_SYS_NO_FLASH
|
2011-11-08 02:33:15 +00:00
|
|
|
static void display_flash_config(ulong size)
|
2002-11-18 00:14:45 +00:00
|
|
|
{
|
2011-11-08 02:33:15 +00:00
|
|
|
puts("Flash: ");
|
|
|
|
print_size(size, "\n");
|
2002-11-18 00:14:45 +00:00
|
|
|
}
|
2011-11-08 02:33:20 +00:00
|
|
|
#endif
|
2002-11-18 00:14:45 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Breath some life into the board...
|
|
|
|
*
|
|
|
|
* Initialize an SMC for serial comms, and carry out some hardware
|
|
|
|
* tests.
|
|
|
|
*
|
|
|
|
* The first part of initialization is running from Flash memory;
|
|
|
|
* its main purpose is to initialize the RAM so that we
|
|
|
|
* can relocate the monitor code to RAM.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* All attempts to come up with a "common" initialization sequence
|
|
|
|
* that works for all boards and architectures failed: some of the
|
|
|
|
* requirements are just _too_ different. To get rid of the resulting
|
|
|
|
* mess of board dependend #ifdef'ed code we now make the whole
|
|
|
|
* initialization sequence configurable to the user.
|
|
|
|
*
|
|
|
|
* The requirements for any new initalization function is simple: it
|
|
|
|
* receives a pointer to the "global data" structure as it's only
|
|
|
|
* argument, and returns an integer return code, where 0 means
|
|
|
|
* "continue" and != 0 means "fatal error, hang the system".
|
|
|
|
*/
|
|
|
|
typedef int (init_fnc_t) (void);
|
|
|
|
|
2011-02-12 04:12:10 +00:00
|
|
|
static int calculate_relocation_address(void);
|
2011-12-31 11:58:15 +00:00
|
|
|
static int copy_gd_to_ram(void);
|
2011-02-12 04:12:10 +00:00
|
|
|
|
|
|
|
init_fnc_t *init_sequence_f[] = {
|
|
|
|
cpu_init_f,
|
|
|
|
board_early_init_f,
|
|
|
|
env_init,
|
|
|
|
init_baudrate,
|
|
|
|
serial_init,
|
|
|
|
console_init_f,
|
|
|
|
dram_init_f,
|
|
|
|
calculate_relocation_address,
|
|
|
|
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
init_fnc_t *init_sequence_r[] = {
|
2009-11-24 09:04:21 +00:00
|
|
|
cpu_init_r, /* basic cpu dependent setup */
|
|
|
|
board_early_init_r, /* basic board dependent setup */
|
2002-11-18 00:14:45 +00:00
|
|
|
dram_init, /* configure available RAM banks */
|
|
|
|
interrupt_init, /* set up exceptions */
|
2003-06-27 21:31:46 +00:00
|
|
|
timer_init,
|
2002-11-18 00:14:45 +00:00
|
|
|
display_banner,
|
|
|
|
display_dram_config,
|
|
|
|
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2011-02-12 04:12:06 +00:00
|
|
|
static int calculate_relocation_address(void)
|
2009-11-24 09:04:21 +00:00
|
|
|
{
|
2011-11-08 02:33:21 +00:00
|
|
|
ulong text_start = (ulong)&__text_start;
|
|
|
|
ulong bss_end = (ulong)&__bss_end;
|
|
|
|
ulong dest_addr;
|
|
|
|
|
|
|
|
/*
|
2012-01-01 04:57:02 +00:00
|
|
|
* NOTE: All destination address are rounded down to 16-byte
|
|
|
|
* boundary to satisfy various worst-case alignment
|
|
|
|
* requirements
|
2011-11-08 02:33:21 +00:00
|
|
|
*/
|
|
|
|
|
2011-12-31 11:58:15 +00:00
|
|
|
/* Global Data is at top of available memory */
|
2012-01-01 04:57:02 +00:00
|
|
|
dest_addr = gd->ram_size;
|
2011-12-31 11:58:15 +00:00
|
|
|
dest_addr -= GENERATED_GBL_DATA_SIZE;
|
|
|
|
dest_addr &= ~15;
|
|
|
|
gd->new_gd_addr = dest_addr;
|
|
|
|
|
|
|
|
/* GDT is below Global Data */
|
|
|
|
dest_addr -= X86_GDT_SIZE;
|
|
|
|
dest_addr &= ~15;
|
|
|
|
gd->gdt_addr = dest_addr;
|
|
|
|
|
|
|
|
/* Stack is below GDT */
|
2012-01-01 04:57:02 +00:00
|
|
|
gd->start_addr_sp = dest_addr;
|
2011-02-12 04:12:06 +00:00
|
|
|
|
2012-01-01 04:57:02 +00:00
|
|
|
/* U-Boot is below the stack */
|
|
|
|
dest_addr -= CONFIG_SYS_STACK_SIZE;
|
|
|
|
dest_addr -= (bss_end - text_start);
|
|
|
|
dest_addr &= ~15;
|
2011-11-08 02:33:21 +00:00
|
|
|
gd->relocaddr = dest_addr;
|
2012-01-01 04:57:02 +00:00
|
|
|
gd->reloc_off = (dest_addr - text_start);
|
2011-02-12 04:12:06 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-04-13 09:43:26 +00:00
|
|
|
/* Load U-Boot into RAM, initialize BSS, perform relocation adjustments */
|
2011-02-12 04:12:06 +00:00
|
|
|
void board_init_f(ulong boot_flags)
|
|
|
|
{
|
2011-02-12 04:12:10 +00:00
|
|
|
init_fnc_t **init_fnc_ptr;
|
2010-10-07 09:03:33 +00:00
|
|
|
|
2011-04-13 09:43:26 +00:00
|
|
|
gd->flags = boot_flags;
|
|
|
|
|
2011-02-12 04:12:10 +00:00
|
|
|
for (init_fnc_ptr = init_sequence_f; *init_fnc_ptr; ++init_fnc_ptr) {
|
|
|
|
if ((*init_fnc_ptr)() != 0)
|
|
|
|
hang();
|
|
|
|
}
|
2009-11-24 09:04:21 +00:00
|
|
|
|
2012-01-01 04:06:39 +00:00
|
|
|
/*
|
|
|
|
* SDRAM is now initialised, U-Boot has been copied into SDRAM,
|
|
|
|
* the BSS has been cleared etc. The final stack can now be setup
|
|
|
|
* in SDRAM. Code execution will continue (momentarily) in Flash,
|
|
|
|
* but with the stack in SDRAM and Global Data in temporary memory
|
|
|
|
* (CPU cache)
|
|
|
|
*/
|
|
|
|
board_init_f_r_trampoline(gd->start_addr_sp);
|
|
|
|
|
|
|
|
/* NOTREACHED - board_init_f_r_trampoline() does not return */
|
|
|
|
while (1)
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
|
|
|
void board_init_f_r(void)
|
|
|
|
{
|
2011-12-27 11:46:42 +00:00
|
|
|
if (copy_gd_to_ram() != 0)
|
|
|
|
hang();
|
|
|
|
|
|
|
|
if (init_cache() != 0)
|
|
|
|
hang();
|
|
|
|
|
2011-12-23 04:57:58 +00:00
|
|
|
relocate_code(0, gd, 0);
|
2010-10-07 09:03:29 +00:00
|
|
|
|
2011-12-23 04:57:58 +00:00
|
|
|
/* NOTREACHED - relocate_code() does not return */
|
2011-11-08 02:33:15 +00:00
|
|
|
while (1)
|
|
|
|
;
|
2009-11-24 09:04:21 +00:00
|
|
|
}
|
|
|
|
|
2011-12-31 11:58:15 +00:00
|
|
|
static int copy_gd_to_ram(void)
|
|
|
|
{
|
|
|
|
gd_t *ram_gd;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Global data is still in temporary memory (the CPU cache).
|
|
|
|
* calculate_relocation_address() has set gd->new_gd_addr to
|
|
|
|
* where the global data lives in RAM but getting it there
|
|
|
|
* safely is a bit tricky due to the 'F-Segment Hack' that
|
|
|
|
* we need to use for x86
|
|
|
|
*/
|
|
|
|
ram_gd = (gd_t *)gd->new_gd_addr;
|
|
|
|
memcpy((void *)ram_gd, gd, sizeof(gd_t));
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Reload the Global Descriptor Table so FS points to the
|
|
|
|
* in-RAM copy of Global Data (calculate_relocation_address()
|
|
|
|
* has already calculated the in-RAM location of the GDT)
|
|
|
|
*/
|
|
|
|
ram_gd->gd_addr = (ulong)ram_gd;
|
|
|
|
init_gd(ram_gd, (u64 *)gd->gdt_addr);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2010-04-23 14:05:44 +00:00
|
|
|
void board_init_r(gd_t *id, ulong dest_addr)
|
2002-11-18 00:14:45 +00:00
|
|
|
{
|
2011-11-08 02:33:20 +00:00
|
|
|
#if defined(CONFIG_CMD_NET)
|
2002-11-18 00:14:45 +00:00
|
|
|
char *s;
|
2011-11-08 02:33:20 +00:00
|
|
|
#endif
|
|
|
|
#ifndef CONFIG_SYS_NO_FLASH
|
2002-11-18 00:14:45 +00:00
|
|
|
ulong size;
|
2011-11-08 02:33:20 +00:00
|
|
|
#endif
|
2002-11-18 00:14:45 +00:00
|
|
|
static bd_t bd_data;
|
|
|
|
init_fnc_t **init_fnc_ptr;
|
2003-06-27 21:31:46 +00:00
|
|
|
|
2002-11-18 00:14:45 +00:00
|
|
|
show_boot_progress(0x21);
|
|
|
|
|
2004-07-01 20:28:03 +00:00
|
|
|
/* compiler optimization barrier needed for GCC >= 3.4 */
|
2011-11-08 02:33:15 +00:00
|
|
|
__asm__ __volatile__("" : : : "memory");
|
2003-06-27 21:31:46 +00:00
|
|
|
|
2012-01-01 04:49:43 +00:00
|
|
|
gd->flags |= GD_FLG_RELOC;
|
|
|
|
|
2002-11-18 00:14:45 +00:00
|
|
|
gd->bd = &bd_data;
|
2011-11-08 02:33:15 +00:00
|
|
|
memset(gd->bd, 0, sizeof(bd_t));
|
2002-11-18 00:14:45 +00:00
|
|
|
show_boot_progress(0x22);
|
|
|
|
|
2003-05-31 18:35:21 +00:00
|
|
|
gd->baudrate = CONFIG_BAUDRATE;
|
2003-06-27 21:31:46 +00:00
|
|
|
|
2010-04-23 14:05:44 +00:00
|
|
|
mem_malloc_init((((ulong)dest_addr - CONFIG_SYS_MALLOC_LEN)+3)&~3,
|
2009-11-24 09:04:21 +00:00
|
|
|
CONFIG_SYS_MALLOC_LEN);
|
|
|
|
|
2011-02-12 04:12:10 +00:00
|
|
|
for (init_fnc_ptr = init_sequence_r; *init_fnc_ptr; ++init_fnc_ptr) {
|
|
|
|
if ((*init_fnc_ptr)() != 0)
|
2011-11-08 02:33:15 +00:00
|
|
|
hang();
|
2002-11-18 00:14:45 +00:00
|
|
|
}
|
|
|
|
show_boot_progress(0x23);
|
|
|
|
|
2010-04-23 14:05:47 +00:00
|
|
|
#ifdef CONFIG_SERIAL_MULTI
|
|
|
|
serial_initialize();
|
|
|
|
#endif
|
2011-11-08 02:33:20 +00:00
|
|
|
|
|
|
|
#ifndef CONFIG_SYS_NO_FLASH
|
2002-11-18 00:14:45 +00:00
|
|
|
/* configure available FLASH banks */
|
|
|
|
size = flash_init();
|
|
|
|
display_flash_config(size);
|
|
|
|
show_boot_progress(0x24);
|
2011-11-08 02:33:20 +00:00
|
|
|
#endif
|
2002-11-18 00:14:45 +00:00
|
|
|
|
|
|
|
show_boot_progress(0x25);
|
|
|
|
|
|
|
|
/* initialize environment */
|
2011-11-08 02:33:15 +00:00
|
|
|
env_relocate();
|
2002-11-18 00:14:45 +00:00
|
|
|
show_boot_progress(0x26);
|
|
|
|
|
|
|
|
|
2010-04-23 14:05:36 +00:00
|
|
|
#ifdef CONFIG_CMD_NET
|
2002-11-18 00:14:45 +00:00
|
|
|
/* IP Address */
|
2011-11-08 02:33:15 +00:00
|
|
|
bd_data.bi_ip_addr = getenv_IPaddr("ipaddr");
|
2010-04-23 14:05:36 +00:00
|
|
|
#endif
|
2002-11-18 00:14:45 +00:00
|
|
|
|
|
|
|
#if defined(CONFIG_PCI)
|
|
|
|
/*
|
|
|
|
* Do pci configuration
|
|
|
|
*/
|
|
|
|
pci_init();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
show_boot_progress(0x27);
|
|
|
|
|
|
|
|
|
2011-11-08 02:33:15 +00:00
|
|
|
stdio_init();
|
2002-11-18 00:14:45 +00:00
|
|
|
|
2011-11-08 02:33:15 +00:00
|
|
|
jumptable_init();
|
2003-06-27 21:31:46 +00:00
|
|
|
|
2002-11-18 00:14:45 +00:00
|
|
|
/* Initialize the console (after the relocation and devices init) */
|
|
|
|
console_init_r();
|
|
|
|
|
|
|
|
#ifdef CONFIG_MISC_INIT_R
|
|
|
|
/* miscellaneous platform dependent initialisations */
|
|
|
|
misc_init_r();
|
|
|
|
#endif
|
|
|
|
|
2007-07-09 23:05:38 +00:00
|
|
|
#if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_CMD_IDE)
|
2002-11-18 00:14:45 +00:00
|
|
|
WATCHDOG_RESET();
|
2011-11-08 02:33:15 +00:00
|
|
|
puts("PCMCIA:");
|
2002-11-18 00:14:45 +00:00
|
|
|
pcmcia_init();
|
|
|
|
#endif
|
|
|
|
|
2007-07-09 23:05:38 +00:00
|
|
|
#if defined(CONFIG_CMD_KGDB)
|
2002-11-18 00:14:45 +00:00
|
|
|
WATCHDOG_RESET();
|
|
|
|
puts("KGDB: ");
|
|
|
|
kgdb_init();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* enable exceptions */
|
2003-05-31 18:35:21 +00:00
|
|
|
enable_interrupts();
|
2002-11-18 00:14:45 +00:00
|
|
|
show_boot_progress(0x28);
|
|
|
|
|
|
|
|
#ifdef CONFIG_STATUS_LED
|
2011-11-08 02:33:15 +00:00
|
|
|
status_led_set(STATUS_LED_BOOT, STATUS_LED_BLINKING);
|
2002-11-18 00:14:45 +00:00
|
|
|
#endif
|
|
|
|
|
2003-05-31 18:35:21 +00:00
|
|
|
udelay(20);
|
2002-11-18 00:14:45 +00:00
|
|
|
|
|
|
|
/* Initialize from environment */
|
2011-10-13 14:43:14 +00:00
|
|
|
load_addr = getenv_ulong("loadaddr", 16, load_addr);
|
2007-07-09 23:05:38 +00:00
|
|
|
#if defined(CONFIG_CMD_NET)
|
2011-11-08 02:33:15 +00:00
|
|
|
s = getenv("bootfile");
|
|
|
|
|
|
|
|
if (s != NULL)
|
|
|
|
copy_filename(BootFile, s, sizeof(BootFile));
|
2007-07-10 16:19:50 +00:00
|
|
|
#endif
|
2002-11-18 00:14:45 +00:00
|
|
|
|
|
|
|
WATCHDOG_RESET();
|
|
|
|
|
2007-07-09 23:05:38 +00:00
|
|
|
#if defined(CONFIG_CMD_IDE)
|
2002-11-18 00:14:45 +00:00
|
|
|
WATCHDOG_RESET();
|
|
|
|
puts("IDE: ");
|
|
|
|
ide_init();
|
2007-07-10 16:19:50 +00:00
|
|
|
#endif
|
2002-11-18 00:14:45 +00:00
|
|
|
|
2007-07-09 23:05:38 +00:00
|
|
|
#if defined(CONFIG_CMD_SCSI)
|
2002-11-18 00:14:45 +00:00
|
|
|
WATCHDOG_RESET();
|
|
|
|
puts("SCSI: ");
|
|
|
|
scsi_init();
|
|
|
|
#endif
|
|
|
|
|
2007-07-09 23:05:38 +00:00
|
|
|
#if defined(CONFIG_CMD_DOC)
|
2002-11-18 00:14:45 +00:00
|
|
|
WATCHDOG_RESET();
|
2003-05-31 18:35:21 +00:00
|
|
|
puts("DOC: ");
|
2002-11-18 00:14:45 +00:00
|
|
|
doc_init();
|
|
|
|
#endif
|
|
|
|
|
2009-10-10 10:42:21 +00:00
|
|
|
#ifdef CONFIG_BITBANGMII
|
|
|
|
bb_miiphy_init();
|
|
|
|
#endif
|
2007-07-09 23:05:38 +00:00
|
|
|
#if defined(CONFIG_CMD_NET)
|
2002-11-18 00:14:45 +00:00
|
|
|
WATCHDOG_RESET();
|
|
|
|
puts("Net: ");
|
|
|
|
eth_initialize(gd->bd);
|
|
|
|
#endif
|
|
|
|
|
2011-11-08 02:33:15 +00:00
|
|
|
#if (defined(CONFIG_CMD_NET)) && (0)
|
2005-10-28 20:30:33 +00:00
|
|
|
WATCHDOG_RESET();
|
|
|
|
# ifdef DEBUG
|
2011-11-08 02:33:15 +00:00
|
|
|
puts("Reset Ethernet PHY\n");
|
2005-10-28 20:30:33 +00:00
|
|
|
# endif
|
|
|
|
reset_phy();
|
|
|
|
#endif
|
|
|
|
|
2002-11-18 00:14:45 +00:00
|
|
|
#ifdef CONFIG_LAST_STAGE_INIT
|
|
|
|
WATCHDOG_RESET();
|
|
|
|
/*
|
|
|
|
* Some parts can be only initialized if all others (like
|
|
|
|
* Interrupts) are up and running (i.e. the PC-style ISA
|
|
|
|
* keyboard).
|
|
|
|
*/
|
|
|
|
last_stage_init();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_POST
|
2011-11-08 02:33:15 +00:00
|
|
|
post_run(NULL, POST_RAM | post_bootmode_get(0));
|
2002-11-18 00:14:45 +00:00
|
|
|
#endif
|
2003-06-27 21:31:46 +00:00
|
|
|
|
2002-11-18 00:14:45 +00:00
|
|
|
show_boot_progress(0x29);
|
2003-06-27 21:31:46 +00:00
|
|
|
|
2002-11-18 00:14:45 +00:00
|
|
|
/* main_loop() can return to retry autoboot, if so just run it again. */
|
2011-11-08 02:33:15 +00:00
|
|
|
for (;;)
|
2003-05-31 18:35:21 +00:00
|
|
|
main_loop();
|
2002-11-18 00:14:45 +00:00
|
|
|
|
|
|
|
/* NOTREACHED - no way out of command loop except booting */
|
|
|
|
}
|
|
|
|
|
2011-11-08 02:33:15 +00:00
|
|
|
void hang(void)
|
2002-11-18 00:14:45 +00:00
|
|
|
{
|
2011-11-08 02:33:15 +00:00
|
|
|
puts("### ERROR ### Please RESET the board ###\n");
|
|
|
|
for (;;)
|
|
|
|
;
|
2002-11-18 00:14:45 +00:00
|
|
|
}
|