aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/cpu')
-rw-r--r--arch/sandbox/cpu/spl.c14
-rw-r--r--arch/sandbox/cpu/start.c9
-rw-r--r--arch/sandbox/cpu/u-boot-spl.lds2
3 files changed, 24 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index 42c149a4981..49f98644c02 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -44,5 +44,19 @@ SPL_LOAD_IMAGE_METHOD("sandbox", 0, BOOT_DEVICE_BOARD, spl_board_load_image);
void spl_board_init(void)
{
+ struct sandbox_state *state = state_get_current();
+ struct udevice *dev;
+
preloader_console_init();
+ if (state->show_of_platdata) {
+ /*
+ * Scan all the devices so that we can output their platform
+ * data. See sandbox_spl_probe().
+ */
+ printf("Scanning misc devices\n");
+ for (uclass_first_device(UCLASS_MISC, &dev);
+ dev;
+ uclass_next_device(&dev))
+ ;
+ }
}
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index 2ee3b485657..28ca35392c9 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -283,6 +283,15 @@ static int sandbox_cmdline_cb_log_level(struct sandbox_state *state,
SANDBOX_CMDLINE_OPT_SHORT(log_level, 'L', 1,
"Set log level (0=panic, 7=debug)");
+static int sandbox_cmdline_cb_show_of_platdata(struct sandbox_state *state,
+ const char *arg)
+{
+ state->show_of_platdata = true;
+
+ return 0;
+}
+SANDBOX_CMDLINE_OPT(show_of_platdata, 0, "Show of-platdata in SPL");
+
int board_run_command(const char *cmdline)
{
printf("## Commands are disabled. Please enable CONFIG_CMDLINE.\n");
diff --git a/arch/sandbox/cpu/u-boot-spl.lds b/arch/sandbox/cpu/u-boot-spl.lds
index f97abdfa050..de65b01b33c 100644
--- a/arch/sandbox/cpu/u-boot-spl.lds
+++ b/arch/sandbox/cpu/u-boot-spl.lds
@@ -14,7 +14,7 @@ SECTIONS
}
__u_boot_sandbox_option_start = .;
- _u_boot_sandbox_getopt : { *(.u_boot_sandbox_getopt) }
+ _u_boot_sandbox_getopt : { KEEP(*(.u_boot_sandbox_getopt)) }
__u_boot_sandbox_option_end = .;
__bss_start = .;