clk: sifive: fu540-prci: Add ddr clock initialization
[oweals/u-boot.git] / drivers / sysreset / sysreset_sandbox.c
index 38e2a7e241ddd6679cb54fabfd850fa4a9149d36..69c22a70008fe5486d06459b4d569c398df93335 100644 (file)
@@ -57,15 +57,16 @@ static int sandbox_sysreset_request(struct udevice *dev, enum sysreset_t type)
        case SYSRESET_COLD:
                state->last_sysreset = type;
                break;
-       case SYSRESET_POWER:
+       case SYSRESET_POWER_OFF:
                state->last_sysreset = type;
                if (!state->sysreset_allowed[type])
                        return -EACCES;
                sandbox_exit();
                break;
-       case SYSRESET_POWER_OFF:
+       case SYSRESET_POWER:
                if (!state->sysreset_allowed[type])
                        return -EACCES;
+               sandbox_exit();
        default:
                return -ENOSYS;
        }