Commit 689697785e04aefd08b6efdc4e47a737819da173

Authored by Simon Glass
Committed by Tom Rini
1 parent d891ab95c2

board_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f()

We don't need a special hook for sandbox as one of the later ones will do
just as well. We can print error messages about bad options after we
print the banner. In fact, it seems better.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>

Showing 3 changed files with 7 additions and 3 deletions Side-by-side Diff

arch/sandbox/cpu/start.c
... ... @@ -66,6 +66,11 @@
66 66 os_exit(0);
67 67 }
68 68  
  69 +int misc_init_f(void)
  70 +{
  71 + return sandbox_early_getopt_check();
  72 +}
  73 +
69 74 static int sandbox_cmdline_cb_help(struct sandbox_state *state, const char *arg)
70 75 {
71 76 /* just flag to sandbox_early_getopt_check to show usage */
... ... @@ -840,9 +840,6 @@
840 840 init_baud_rate, /* initialze baudrate settings */
841 841 serial_init, /* serial communications setup */
842 842 console_init_f, /* stage 1 init of console */
843   -#ifdef CONFIG_SANDBOX
844   - sandbox_early_getopt_check,
845   -#endif
846 843 display_options, /* say that we are here */
847 844 display_text_info, /* show debugging info if required */
848 845 #if defined(CONFIG_MPC8260)
include/configs/sandbox.h
... ... @@ -199,5 +199,7 @@
199 199 #define CONFIG_SYS_SYSTEMACE_WIDTH 16
200 200 #define CONFIG_SYS_SYSTEMACE_BASE 0
201 201  
  202 +#define CONFIG_MISC_INIT_F
  203 +
202 204 #endif