diff options
author | Simon Glass <sjg@chromium.org> | 2015-07-06 12:54:29 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-07-21 17:39:31 -0600 |
commit | 5010d98f02d9714f83c507e12ade0c52d214d157 (patch) | |
tree | 2d27c1859a3595f236a27a885657fdf599806825 /arch/sandbox | |
parent | b9d33fa06c174e7fb4c8cd4bfec5cfff87f301e8 (diff) | |
download | u-boot-5010d98f02d9714f83c507e12ade0c52d214d157.tar.gz |
sandbox: Use the reset driver to handle reset
Move sandbox over to use the reset uclass for reset, instead of a direct
call to do_reset(). This allows us to add tests.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/cpu/cpu.c | 9 | ||||
-rw-r--r-- | arch/sandbox/dts/test.dts | 8 | ||||
-rw-r--r-- | arch/sandbox/include/asm/u-boot-sandbox.h | 3 |
3 files changed, 12 insertions, 8 deletions
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index e6ddb17a14..3a7f5a004b 100644 --- a/arch/sandbox/cpu/cpu.c +++ b/arch/sandbox/cpu/cpu.c @@ -20,7 +20,7 @@ static struct udevice *map_dev; unsigned long map_len; #endif -void reset_cpu(ulong ignored) +void sandbox_exit(void) { /* Do this here while it still has an effect */ os_fd_restore(); @@ -34,13 +34,6 @@ void reset_cpu(ulong ignored) os_exit(0); } -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ - reset_cpu(0); - - return 0; -} - /* delay x useconds */ void __udelay(unsigned long usec) { diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 3c9abb303f..79b017598c 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -196,6 +196,14 @@ }; }; + reset@0 { + compatible = "sandbox,warm-reset"; + }; + + reset@1 { + compatible = "sandbox,reset"; + }; + spi@0 { #address-cells = <1>; #size-cells = <0>; diff --git a/arch/sandbox/include/asm/u-boot-sandbox.h b/arch/sandbox/include/asm/u-boot-sandbox.h index da87cc3040..2f3c3f90f2 100644 --- a/arch/sandbox/include/asm/u-boot-sandbox.h +++ b/arch/sandbox/include/asm/u-boot-sandbox.h @@ -83,4 +83,7 @@ void sandbox_set_enable_pci_map(int enable); */ int sandbox_read_fdt_from_file(void); +/* Exit sandbox (quit U-Boot) */ +void sandbox_exit(void); + #endif /* _U_BOOT_SANDBOX_H_ */ |