Newer
Older
WATCHDOG_RESET();
bedbug_init();
#if defined(CONFIG_PRAM) || defined(CONFIG_LOGBUFFER)
/*
* Export available size of memory for Linux,
* taking into account the protected RAM at top of memory
*/
{
ulong pram = 0;
#ifdef CONFIG_PRAM
pram = getenv_ulong("pram", 10, CONFIG_PRAM);
#endif
#ifdef CONFIG_LOGBUFFER
Yuri Tikhonov
committed
#ifndef CONFIG_ALT_LB_ADDR
/* Also take the logbuffer into account (pram is in kB) */
pram += (LOGBUFF_LEN + LOGBUFF_OVERHEAD) / 1024;
Yuri Tikhonov
committed
#endif
#endif
sprintf(memsz, "%ldk", (bd->bi_memsize / 1024) - pram);
setenv("mem", memsz);
#ifdef CONFIG_PS2KBD
puts("PS/2: ");
kbd_init();
#endif
{
extern int do_mdm_init;
do_mdm_init = gd->do_mdm_init;
}
/* Initialization complete - start the monitor */
/* main_loop() can return to retry autoboot, if so just run it again. */
for (;;) {
WATCHDOG_RESET();
main_loop();
}
/* NOTREACHED - no way out of command loop except booting */
}
void hang(void)
puts("### ERROR ### Please RESET the board ###\n");
bootstage_error(BOOTSTAGE_ID_NEED_RESET);
for (;;)
;
#if 0 /* We could use plain global data, but the resulting code is bigger */
/*
* Pointer to initial global data area
*
* Here we initialize it.
*/
#undef XTRN_DECLARE_GLOBAL_DATA_PTR
#define XTRN_DECLARE_GLOBAL_DATA_PTR /* empty = allocate here */
DECLARE_GLOBAL_DATA_PTR =
(gd_t *) (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET);
#endif /* 0 */
/************************************************************************/