diff options
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/cpu/Makefile | 2 | ||||
-rw-r--r-- | arch/sandbox/cpu/cpu.c | 2 | ||||
-rw-r--r-- | arch/sandbox/cpu/spl.c | 13 | ||||
-rw-r--r-- | arch/sandbox/cpu/start.c | 4 | ||||
-rw-r--r-- | arch/sandbox/dts/Makefile | 9 | ||||
-rw-r--r-- | arch/sandbox/dts/cedit.dtsi | 3 | ||||
-rw-r--r-- | arch/sandbox/dts/sandbox_pmic.dtsi | 1 | ||||
-rw-r--r-- | arch/sandbox/dts/test.dts | 5 |
8 files changed, 21 insertions, 18 deletions
diff --git a/arch/sandbox/cpu/Makefile b/arch/sandbox/cpu/Makefile index 7c5c52652f5..bfcdc335d32 100644 --- a/arch/sandbox/cpu/Makefile +++ b/arch/sandbox/cpu/Makefile @@ -8,7 +8,7 @@ obj-y := cache.o cpu.o state.o extra-y := start.o os.o extra-$(CONFIG_SANDBOX_SDL) += sdl.o -obj-$(CONFIG_SPL_BUILD) += spl.o +obj-$(CONFIG_XPL_BUILD) += spl.o obj-$(CONFIG_ETH_SANDBOX_RAW) += eth-raw-os.o # os.c is build in the system environment, so needs standard includes diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index 51ce40e7f08..06f8c13fab9 100644 --- a/arch/sandbox/cpu/cpu.c +++ b/arch/sandbox/cpu/cpu.c @@ -165,7 +165,7 @@ phys_addr_t virt_to_phys(void *ptr) void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags) { -#if defined(CONFIG_PCI) && !defined(CONFIG_SPL_BUILD) +#if defined(CONFIG_PCI) && !defined(CONFIG_XPL_BUILD) unsigned long plen = len; void *ptr; diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index 1c33a520c64..7056cfd0180 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -27,8 +27,8 @@ int sandbox_find_next_phase(char *fname, int maxlen, bool use_img) const char *cur_prefix, *next_prefix; int ret; - cur_prefix = spl_phase_prefix(spl_phase()); - next_prefix = spl_phase_prefix(spl_next_phase()); + cur_prefix = xpl_prefix(xpl_phase()); + next_prefix = xpl_prefix(xpl_next_phase()); ret = os_find_u_boot(fname, maxlen, use_img, cur_prefix, next_prefix); if (ret) return log_msg_ret("find", ret); @@ -55,9 +55,10 @@ void board_init_f(ulong flag) void board_boot_order(u32 *spl_boot_list) { + struct sandbox_state *state = state_get_current(); + spl_boot_list[0] = BOOT_DEVICE_VBE; - spl_boot_list[1] = BOOT_DEVICE_UPL; - spl_boot_list[2] = BOOT_DEVICE_BOARD; + spl_boot_list[1] = state->upl ? BOOT_DEVICE_UPL : BOOT_DEVICE_BOARD; } static int spl_board_load_file(struct spl_image_info *spl_image, @@ -91,7 +92,7 @@ static int load_from_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { struct sandbox_state *state = state_get_current(); - enum u_boot_phase next_phase; + enum xpl_phase_t next_phase; const char *fname; ulong pos, size; int full_size; @@ -101,7 +102,7 @@ static int load_from_image(struct spl_image_info *spl_image, if (!IS_ENABLED(CONFIG_SANDBOX_VPL)) return -ENOENT; - next_phase = spl_next_phase(); + next_phase = xpl_next_phase(); pos = spl_get_image_pos(); size = spl_get_image_size(); if (pos == BINMAN_SYM_MISSING || size == BINMAN_SYM_MISSING) { diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 9ad5d46271a..81752edc9f8 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -129,7 +129,7 @@ static int sandbox_cmdline_cb_help(struct sandbox_state *state, const char *arg) } SANDBOX_CMDLINE_OPT_SHORT(help, 'h', 0, "Display help"); -#ifndef CONFIG_SPL_BUILD +#ifndef CONFIG_XPL_BUILD int sandbox_main_loop_init(void) { struct sandbox_state *state = state_get_current(); @@ -206,7 +206,7 @@ static int sandbox_cmdline_cb_test_fdt(struct sandbox_state *state, char *relname; int len; - if (spl_phase() <= PHASE_SPL) + if (xpl_phase() <= PHASE_SPL) relname = "../arch/sandbox/dts/test.dtb"; else relname = "arch/sandbox/dts/test.dtb"; diff --git a/arch/sandbox/dts/Makefile b/arch/sandbox/dts/Makefile index f810b4752f5..1c9fb4a4566 100644 --- a/arch/sandbox/dts/Makefile +++ b/arch/sandbox/dts/Makefile @@ -10,12 +10,5 @@ dtb-$(CONFIG_CMD_EXTENSION) += overlay0.dtbo overlay1.dtbo include $(srctree)/scripts/Makefile.dts -targets += $(dtb-y) - +# Add any required device tree compiler flags here DTC_FLAGS += -R 4 -p 0x1000 - -PHONY += dtbs -dtbs: $(addprefix $(obj)/, $(dtb-y)) - @: - -clean-files := *.dtb *.dtbo diff --git a/arch/sandbox/dts/cedit.dtsi b/arch/sandbox/dts/cedit.dtsi index 9bd84e62936..facd7a49bef 100644 --- a/arch/sandbox/dts/cedit.dtsi +++ b/arch/sandbox/dts/cedit.dtsi @@ -39,6 +39,9 @@ /* IDs for the menu items */ item-id = <ID_CPU_SPEED_1 ID_CPU_SPEED_2 ID_CPU_SPEED_3>; + + /* values for the menu items */ + item-value = <0 3 6>; }; power-loss { diff --git a/arch/sandbox/dts/sandbox_pmic.dtsi b/arch/sandbox/dts/sandbox_pmic.dtsi index 565c382ed45..ff2cb42844c 100644 --- a/arch/sandbox/dts/sandbox_pmic.dtsi +++ b/arch/sandbox/dts/sandbox_pmic.dtsi @@ -10,6 +10,7 @@ &sandbox_pmic { compatible = "sandbox,pmic"; + sandbox,emul = <&emul_pmic0>; buck1 { regulator-name = "SUPPLY_1.2V"; diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 9599a8db9c5..3017b33d67b 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -101,6 +101,11 @@ bootscr-ram-offset = /bits/ 64 <0x12345678>; bootscr-flash-offset = /bits/ 64 <0>; bootscr-flash-size = /bits/ 64 <0x2000>; + boot-led = "sandbox:green"; + activity-led = "sandbox:red"; + testing-bool; + testing-int = <123>; + testing-str = "testing"; }; }; |