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>
This commit is contained in:
parent
bcf50ed0e7
commit
8972694e93
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
@ -17,4 +17,5 @@ void plat_gic_cpuif_enable(void);
|
|||
void plat_gic_cpuif_disable(void);
|
||||
void plat_gic_pcpu_init(void);
|
||||
|
||||
void __dead2 imx_system_off(void);
|
||||
#endif /*__PLAT_IMX8_H__ */
|
||||
|
|
|
@ -64,6 +64,7 @@ static const plat_psci_ops_t imx_plat_psci_ops = {
|
|||
.pwr_domain_on = imx_pwr_domain_on,
|
||||
.pwr_domain_on_finish = imx_pwr_domain_on_finish,
|
||||
.validate_ns_entrypoint = imx_validate_ns_entrypoint,
|
||||
.system_off = imx_system_off,
|
||||
};
|
||||
|
||||
int plat_setup_psci_ops(uintptr_t sec_entrypoint,
|
||||
|
|
|
@ -20,6 +20,7 @@ BL31_SOURCES += plat/imx/common/lpuart_console.S \
|
|||
plat/imx/imx8qx/imx8qx_bl31_setup.c \
|
||||
plat/imx/imx8qx/imx8qx_psci.c \
|
||||
plat/imx/common/imx8_topology.c \
|
||||
plat/imx/common/imx8_psci.c \
|
||||
lib/xlat_tables/xlat_tables_common.c \
|
||||
lib/xlat_tables/aarch64/xlat_tables.c \
|
||||
lib/cpus/aarch64/cortex_a35.S \
|
||||
|
|
Loading…
Reference in New Issue