diff options
Diffstat (limited to 'arch/sandbox/cpu')
-rw-r--r-- | arch/sandbox/cpu/cpu.c | 9 | ||||
-rw-r--r-- | arch/sandbox/cpu/state.c | 4 |
2 files changed, 5 insertions, 8 deletions
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index e6ddb17a140..3a7f5a004b0 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/cpu/state.c b/arch/sandbox/cpu/state.c index cae731c8f16..7e5d03e8460 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -345,6 +345,10 @@ int state_init(void) state->ram_buf = os_malloc(state->ram_size); assert(state->ram_buf); + /* No reset yet, so mark it as such. Always allow power reset */ + state->last_reset = RESET_COUNT; + state->reset_allowed[RESET_POWER] = true; + /* * Example of how to use GPIOs: * |