imx: imx8qx: add system reset support

Add system reset support for i.MX8QX,
when Linux kernel issues "reboot" command,
TF-A will send command to inform system
controller to reset 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:
Anson Huang 2018-07-12 11:04:15 +08:00
parent 8972694e93
commit 351e3731ca
3 changed files with 9 additions and 0 deletions

View File

@ -19,4 +19,11 @@ void __dead2 imx_system_off(void)
panic();
}
void __dead2 imx_system_reset(void)
{
sc_pm_reset(ipc_handle, SC_PM_RESET_TYPE_BOARD);
wfi();
ERROR("system reset failed.\n");
panic();
}

View File

@ -18,4 +18,5 @@ void plat_gic_cpuif_disable(void);
void plat_gic_pcpu_init(void);
void __dead2 imx_system_off(void);
void __dead2 imx_system_reset(void);
#endif /*__PLAT_IMX8_H__ */

View File

@ -65,6 +65,7 @@ static const plat_psci_ops_t imx_plat_psci_ops = {
.pwr_domain_on_finish = imx_pwr_domain_on_finish,
.validate_ns_entrypoint = imx_validate_ns_entrypoint,
.system_off = imx_system_off,
.system_reset = imx_system_reset,
};
int plat_setup_psci_ops(uintptr_t sec_entrypoint,