summaryrefslogtreecommitdiff
path: root/drivers/sysreset
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sysreset')
-rw-r--r--drivers/sysreset/sysreset_sandbox.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c
index 71cabd1956..7026a48c4b 100644
--- a/drivers/sysreset/sysreset_sandbox.c
+++ b/drivers/sysreset/sysreset_sandbox.c
@@ -56,6 +56,9 @@ static int sandbox_sysreset_request(struct udevice *dev, enum sysreset_t type)
switch (type) {
case SYSRESET_COLD:
state->last_sysreset = type;
+ if (!state->sysreset_allowed[type])
+ return -EACCES;
+ sandbox_reset();
break;
case SYSRESET_POWER_OFF:
state->last_sysreset = type;