diff options
author | Simon Glass <sjg@chromium.org> | 2013-11-10 10:26:59 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-01-08 17:24:38 -0700 |
commit | 808434cdbd70b6633c99fe2974af7d25316cc593 (patch) | |
tree | e867522a0f02358fedd4afc11b49852a5f830d42 /arch/sandbox | |
parent | 6ebcab8de7c38ca0b2cc5215c5b3e7ccf5f9d0d7 (diff) | |
download | u-boot-808434cdbd70b6633c99fe2974af7d25316cc593.tar.gz u-boot-808434cdbd70b6633c99fe2974af7d25316cc593.tar.bz2 u-boot-808434cdbd70b6633c99fe2974af7d25316cc593.zip |
sandbox: Allow return from board_init_f()
The execution flow becomes easier if we can return from board_init_f()
as ARM does. We can control things from start.c instead of having to
call back into that file from other places.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/cpu/start.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 951ac63f3a..895c4d82b0 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -10,6 +10,8 @@ #include <os.h> +DECLARE_GLOBAL_DATA_PTR; + int sandbox_early_getopt_check(void) { struct sandbox_state *state = state_get_current(); @@ -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; } |