summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu/spl.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-11-15 18:44:01 -0700
committerTom Rini <trini@konsulko.com>2018-11-26 08:25:35 -0500
commit1ca910be5df2e2ba80f7ac496570a88e34593cf8 (patch)
treec317f4a964c8b23ce05a1105a2469143590679ba /arch/sandbox/cpu/spl.c
parent20d4440189b924eaf9d77e9f2470cd39abe34a4a (diff)
sandbox: Add an option to display of-platdata in SPL
At present we don't have a test that of-platdata can be accessed in SPL. Add this in as a command-line option to SPL. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/cpu/spl.c')
-rw-r--r--arch/sandbox/cpu/spl.c14
1 files changed, 14 insertions, 0 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))
+ ;
+ }
}