board_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f()
authorSimon Glass <sjg@chromium.org>
Tue, 28 Mar 2017 16:27:28 +0000 (10:27 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 5 Apr 2017 17:55:07 +0000 (13:55 -0400)
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>
arch/sandbox/cpu/start.c
common/board_f.c
include/configs/sandbox.h

index dc58fef90cc1fdcbbf4ace8c382112c928644010..f605d4d61eac864ac2bf1f593416e4ad2dfdaadc 100644 (file)
@@ -66,6 +66,11 @@ int sandbox_early_getopt_check(void)
        os_exit(0);
 }
 
+int misc_init_f(void)
+{
+       return sandbox_early_getopt_check();
+}
+
 static int sandbox_cmdline_cb_help(struct sandbox_state *state, const char *arg)
 {
        /* just flag to sandbox_early_getopt_check to show usage */
index 6995f741a64dbd1a28357fd61fd97bad5cdb8582..f1c97fc2a3c6e83f7f3835a27dc034a7ddf4e153 100644 (file)
@@ -840,9 +840,6 @@ static const init_fnc_t init_sequence_f[] = {
        init_baud_rate,         /* initialze baudrate settings */
        serial_init,            /* serial communications setup */
        console_init_f,         /* stage 1 init of console */
-#ifdef CONFIG_SANDBOX
-       sandbox_early_getopt_check,
-#endif
        display_options,        /* say that we are here */
        display_text_info,      /* show debugging info if required */
 #if defined(CONFIG_MPC8260)
index 6b3cd18046d3e27f92c05c7d020a10085634970d..7de8765dc803eed4ecb01e1b937a2b417ed2ca56 100644 (file)
 #define CONFIG_SYS_SYSTEMACE_WIDTH     16
 #define CONFIG_SYS_SYSTEMACE_BASE      0
 
+#define CONFIG_MISC_INIT_F
+
 #endif