]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/sandbox/lib/board.c
sandbox: Provide a way to map from host RAM to U-Boot RAM
[karo-tx-uboot.git] / arch / sandbox / lib / board.c
index 6d464d6ae8d025f083af46fd523a9e9b9fb7d4b5..3752fab5020223241e76719c1be81da08f9e83c6 100644 (file)
@@ -134,6 +134,7 @@ init_fnc_t *init_sequence[] = {
        env_init,               /* initialize environment */
        serial_init,            /* serial communications setup */
        console_init_f,         /* stage 1 init of console */
+       sandbox_early_getopt_check,     /* process command line flags (err/help) */
        display_banner,         /* say that we are here */
 #if defined(CONFIG_DISPLAY_CPUINFO)
        print_cpuinfo,          /* display cpu info (and speed) */
@@ -173,7 +174,7 @@ void board_init_f(ulong bootflag)
        mem = os_malloc(CONFIG_SYS_SDRAM_SIZE);
 
        assert(mem);
-       gd->ram_buf = mem;
+       gd->arch.ram_buf = mem;
        addr = (ulong)(mem + size);
 
        /*
@@ -219,24 +220,19 @@ void board_init_r(gd_t *id, ulong dest_addr)
 
        gd->flags |= GD_FLG_RELOC;      /* tell others: relocation done */
 
-#ifdef CONFIG_SERIAL_MULTI
        serial_initialize();
-#endif
 
 #ifdef CONFIG_POST
        post_output_backlog();
 #endif
 
        /* The Malloc area is at the top of simulated DRAM */
-       mem_malloc_init((ulong)gd->ram_buf + gd->ram_size - TOTAL_MALLOC_LEN,
-                       TOTAL_MALLOC_LEN);
+       mem_malloc_init((ulong)gd->arch.ram_buf + gd->ram_size -
+                       TOTAL_MALLOC_LEN, TOTAL_MALLOC_LEN);
 
        /* initialize environment */
        env_relocate();
 
-       /* IP Address */
-       gd->bd->bi_ip_addr = getenv_IPaddr("ipaddr");
-
        stdio_init();   /* get the devices list going. */
 
        jumptable_init();
@@ -269,6 +265,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
        post_run(NULL, POST_RAM | post_bootmode_get(0));
 #endif
 
+       sandbox_main_loop_init();
+
        /*
         * For now, run the main loop. Later we might let this be done
         * in the main program.