From dc6f4d3a55c7e26af6b0cd41bcd9486b16a1ab9e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 6 Jul 2015 12:54:26 -0600 Subject: sandbox: Support multiple reset types Add settings for the last reset generated, and the types of resets which are permitted. This will be used for testing. Signed-off-by: Simon Glass --- arch/sandbox/cpu/state.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/sandbox/cpu') diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index cae731c8f1..7e5d03e846 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: * -- cgit v1.2.1