Skip to content
Snippets Groups Projects
board.c 25.3 KiB
Newer Older
  • Learn to ignore specific revisions
  • 		/* Also take the logbuffer into account (pram is in kB) */
    		pram += (LOGBUFF_LEN+LOGBUFF_OVERHEAD)/1024;
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    		sprintf ((char *)memsz, "%ldk", (bd->bi_memsize / 1024) - pram);
    		setenv ("mem", (char *)memsz);
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	}
    #endif
    
    
    #ifdef CONFIG_PS2KBD
    	puts ("PS/2:  ");
    	kbd_init();
    #endif
    
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    #ifdef CONFIG_MODEM_SUPPORT
     {
    	 extern int do_mdm_init;
    	 do_mdm_init = gd->do_mdm_init;
     }
    #endif
    
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	/* 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");
    
    	show_boot_progress(-30);
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	for (;;);
    }
    
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    #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);
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    #endif  /* 0 */
    
    /************************************************************************/