diff options
author | Robin Gong <yibin.gong@nxp.com> | 2017-11-29 19:26:44 +0800 |
---|---|---|
committer | Abel Vesa <abel.vesa@nxp.com> | 2018-06-11 10:08:40 +0300 |
commit | 1fff21f4d6a3314c8d8f181822bc8b2dcc1d61a6 (patch) | |
tree | 5b068105af3f6bd9aca13eee7ffa2899029659a5 /plat/imx/imx8qxp | |
parent | f4ec82775b77039912e0b369e808a49bfad7b9c4 (diff) |
plat: freescale: imx8qm/qxp: add poweroff
Add power off interface for Linux. Currently poweroff the whole board,may
change to poweroff partition if necessary.
sync with the below scfw commit:
commit 0e1f8aa5d6c6a6d9b8c05d5a84bbd613b301d367
Author: Chuck Cannon <chuck.cannon@freescale.com>
Date: Tue Nov 28 13:56:29 2017 -0600
Use SC_R_BOARD_R1 to control the base board reset.
Signed-off-by: Chuck Cannon <chuck.cannon@freescale.com>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Diffstat (limited to 'plat/imx/imx8qxp')
-rw-r--r-- | plat/imx/imx8qxp/imx8qxp_psci.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plat/imx/imx8qxp/imx8qxp_psci.c b/plat/imx/imx8qxp/imx8qxp_psci.c index 0eb89ba5..9957bfe8 100644 --- a/plat/imx/imx8qxp/imx8qxp_psci.c +++ b/plat/imx/imx8qxp/imx8qxp_psci.c @@ -193,12 +193,10 @@ void __attribute__((noreturn)) imx_system_reset(void) void __attribute__((noreturn)) imx_system_off(void) { - /* - * Never return, no SCFW API is available for - * system poweroff, here just do wfi for now - */ - while (1) - wfi(); + sc_pm_set_sys_power_mode(ipc_handle, SC_PM_PW_MODE_OFF); + wfi(); + ERROR("power off failed.\n"); + panic(); } static const plat_psci_ops_t imx_plat_psci_ops = { |