From c3b6b0a7ee4559ea3cb885c6f99560899ef55034 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 16 May 2023 18:46:13 +0200 Subject: [PATCH] pure chaos --- linux/payload/PlocMpsocHandler.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/linux/payload/PlocMpsocHandler.cpp b/linux/payload/PlocMpsocHandler.cpp index 4167b68c..750b64d7 100644 --- a/linux/payload/PlocMpsocHandler.cpp +++ b/linux/payload/PlocMpsocHandler.cpp @@ -219,18 +219,14 @@ void PlocMpsocHandler::doStartUp() { void PlocMpsocHandler::doShutDown() { #ifdef XIPHOS_Q7S #if not OBSW_MPSOC_JTAG_BOOT == 1 - switch (powerState) { - case PowerState::ON: - uartIsolatorSwitch.pullLow(); - commandActionHelper.commandAction(supervisorHandler, supv::SHUTDOWN_MPSOC); - powerState = PowerState::SHUTDOWN; - return; - case PowerState::OFF: - hkReport.setReportingEnabled(false); - setMode(_MODE_POWER_DOWN); - break; - default: - break; + if (powerState == PowerState::ON) { + uartIsolatorSwitch.pullLow(); + commandActionHelper.commandAction(supervisorHandler, supv::SHUTDOWN_MPSOC); + powerState = PowerState::SHUTDOWN; + return; + } else if (powerState == PowerState::SHUTDOWN) { + // Wait till power state is OFF. + return; } #else uartIsolatorSwitch.pullLow();