summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/cpu
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-07-06 12:54:26 -0600
committerSimon Glass <sjg@chromium.org>2015-07-21 17:39:31 -0600
commitdc6f4d3a55c7e26af6b0cd41bcd9486b16a1ab9e (patch)
treef5e4e8a840d14db2c7bc71c84360242945ce24a0 /arch/sandbox/cpu
parent6a1c7cef14a41ade84bccdded1fd87b908b6958c (diff)
downloadtalos-obmc-uboot-dc6f4d3a55c7e26af6b0cd41bcd9486b16a1ab9e.tar.gz
talos-obmc-uboot-dc6f4d3a55c7e26af6b0cd41bcd9486b16a1ab9e.zip
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 <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/cpu')
-rw-r--r--arch/sandbox/cpu/state.c4
1 files changed, 4 insertions, 0 deletions
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:
*
OpenPOWER on IntegriCloud