feat(ti): add PSCI system_off support
Send a TI-SCI control message to system firmware to power down the board.
Signed-off-by: Andrew Davis <afd@ti.com>
Change-Id: I6b8fa64baa94da078db82fc8e115630c9f200b3d
diff --git a/plat/ti/k3/common/k3_psci.c b/plat/ti/k3/common/k3_psci.c
index 6febbc6..4eb3ab5 100644
--- a/plat/ti/k3/common/k3_psci.c
+++ b/plat/ti/k3/common/k3_psci.c
@@ -205,7 +205,14 @@
static void __dead2 k3_system_off(void)
{
- ERROR("System Off: operation not handled.\n");
+ int ret;
+
+ /* Queue up the system shutdown request */
+ ret = ti_sci_device_put_no_wait(PLAT_BOARD_DEVICE_ID);
+ if (ret != 0) {
+ ERROR("Sending system shutdown message failed (%d)\n", ret);
+ }
+
while (true)
wfi();
}