sandbox: sysreset: Update to support power-on reset
authorSimon Glass <sjg@chromium.org>
Sat, 24 Nov 2018 04:29:28 +0000 (21:29 -0700)
committerSimon Glass <sjg@chromium.org>
Wed, 5 Dec 2018 13:01:34 +0000 (06:01 -0700)
commit2a07269062a8e63dadc23be0f8b0d4638da7d2d2
tree5b0f9056117025030bfdc318c77ab8be99aa91a7
parente628bba785a310e80193f9a34c0b53fcb2136c46
sandbox: sysreset: Update to support power-on reset

If U-Boot is started from SPL or TPL, then those earlier phases deal with
the reset cause. On real hardware this cause may be lost once it is read.
Emulate that behaviour in sandbox by reporting a warm reset when a
previous phase has run since start-up.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/sysreset/sysreset_sandbox.c
test/dm/sysreset.c