]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - onenand_ipl/onenand_boot.c
at91rm9200ek: add configure target for RAM boot
[karo-tx-uboot.git] / onenand_ipl / onenand_boot.c
index f30deaeca7d3cd5f3e3fef067e994f57a5208f57..22baebb314c71a9a53d976b57c1580e5e97984a9 100644 (file)
  */
 
 #include <common.h>
-#include <version.h>
 
 #include "onenand_ipl.h"
 
-#ifdef CFG_PRINTF
-int print_info(void)
-{
-       printf(XLOADER_VERSION);
-
-       return 0;
-}
-#endif
-
 typedef int (init_fnc_t)(void);
 
-init_fnc_t *init_sequence[] = {
-       board_init,             /* basic board dependent setup */
-#ifdef CFG_PRINTF
-       serial_init,            /* serial communications setup */
-       print_info,
-#endif
-       NULL,
-};
-
 void start_oneboot(void)
 {
-       init_fnc_t **init_fnc_ptr;
        uchar *buf;
 
-       for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
-               if ((*init_fnc_ptr)() != 0)
-                       hang();
-       }
-
-       buf = (uchar *) CFG_LOAD_ADDR;
-
-       if (!onenand_read_block(buf, ONENAND_START_BLOCK))
-               buf += ONENAND_BLOCK_SIZE;
+       buf = (uchar *) CONFIG_SYS_LOAD_ADDR;
 
-       if (buf == (uchar *)CFG_LOAD_ADDR)
-               hang();
+       onenand_read_block(buf);
 
-       /* go run U-Boot and never return */
-       printf("Starting OS Bootloader...\n");
-       ((init_fnc_t *)CFG_LOAD_ADDR)();
+       ((init_fnc_t *)CONFIG_SYS_LOAD_ADDR)();
 
        /* should never come here */
 }
 
 void hang(void)
 {
-       /* if board_hang() returns, hange here */
-       printf("X-Loader hangs\n");
-       for (;;);
+       for (;;);
 }