summaryrefslogtreecommitdiff
path: root/src/mainboard/starlabs/lite
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/starlabs/lite')
-rw-r--r--src/mainboard/starlabs/lite/smihandler.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mainboard/starlabs/lite/smihandler.c b/src/mainboard/starlabs/lite/smihandler.c
new file mode 100644
index 0000000000..75e84c76e2
--- /dev/null
+++ b/src/mainboard/starlabs/lite/smihandler.c
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <acpi/acpi.h>
+#include <cpu/x86/smm.h>
+#include <intelblocks/xhci.h>
+
+void mainboard_smi_sleep(u8 slp_typ)
+{
+ /*
+ * Workaround: Reset the XHCI controller prior to S5 to avoid
+ * XHCI preventing shutdown. Linux needs to put the XHCI into D3
+ * before shutting down but the powerstate commands do not
+ * perform a reset.
+ */
+ if (slp_typ == ACPI_S5)
+ xhci_host_reset();
+}