diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2018-07-12 10:52:55 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2018-07-12 11:00:41 +0800 |
commit | 8972694e931df4622cb5844c96ecdd0fe5941235 (patch) | |
tree | 0e6ee1c7d47bbc90c07826912e0cb718ad2133e0 /plat/imx/common/imx8_psci.c | |
parent | bcf50ed0e715974803b47eaf1cc04f2dd1805676 (diff) |
imx: imx8qx: add system off support
Add system power off support for i.MX8QX,
when Linux kernel issues "poweroff" command,
TF-A will send command to inform system
controller to power off whole board according
to board design, tested on i.MX8QX MEK board.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Diffstat (limited to 'plat/imx/common/imx8_psci.c')
-rw-r--r-- | plat/imx/common/imx8_psci.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plat/imx/common/imx8_psci.c b/plat/imx/common/imx8_psci.c new file mode 100644 index 00000000..0b0dcb57 --- /dev/null +++ b/plat/imx/common/imx8_psci.c @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <arch.h> +#include <arch_helpers.h> +#include <debug.h> +#include <plat_imx8.h> +#include <sci/sci.h> +#include <stdbool.h> + +void __dead2 imx_system_off(void) +{ + sc_pm_set_sys_power_mode(ipc_handle, SC_PM_PW_MODE_OFF); + wfi(); + ERROR("power off failed.\n"); + panic(); +} + + |