]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/sandbox/cpu/start.c
sandbox: Allow return from board_init_f()
[karo-tx-uboot.git] / arch / sandbox / cpu / start.c
index 1b1545478470c48bbfe4a9275fb4853d4aa1813a..895c4d82b0dd654bd70cbc4b91c62ba3d5c5d952 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <os.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 int sandbox_early_getopt_check(void)
 {
        struct sandbox_state *state = state_get_current();
@@ -50,9 +52,9 @@ int sandbox_early_getopt_check(void)
 
                /* then the long flag */
                if (opt->has_arg)
-                       printf("--%-*s", max_noarg_len, opt->flag);
-               else
                        printf("--%-*s <arg> ", max_arg_len, opt->flag);
+               else
+                       printf("--%-*s", max_noarg_len, opt->flag);
 
                /* finally the help text */
                printf("  %s\n", opt->help);
@@ -109,12 +111,11 @@ int main(int argc, char *argv[])
        if (os_parse_args(state, argc, argv))
                return 1;
 
-       /*
-        * Do pre- and post-relocation init, then start up U-Boot. This will
-        * never return.
-        */
+       /* Do pre- and post-relocation init */
        board_init_f(0);
 
-       /* NOTREACHED - board_init_f() does not return */
+       board_init_r(gd->new_gd, 0);
+
+       /* NOTREACHED - board_init_r() does not return */
        return 0;
 }