summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnson Huang <Anson.Huang@nxp.com>2017-09-01 21:26:29 +0800
committerAnson Huang <Anson.Huang@nxp.com>2017-09-01 21:26:29 +0800
commit4afb2285ab5163da6ea100a1fce8f8e42b78b453 (patch)
treef1444b516ea2206bf277dd4524ec9c6a0c453615
parent579d0a02c4bcb58dbb85ae8036891c050d77edee (diff)
imx8qxp: add board reset support
Add i.MX8QXP board reset support. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
-rw-r--r--plat/freescale/imx8qxp/imx8qxp_psci.c9
-rw-r--r--plat/freescale/imx8qxp/include/sec_rsrc.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/plat/freescale/imx8qxp/imx8qxp_psci.c b/plat/freescale/imx8qxp/imx8qxp_psci.c
index b2356ec0..6f2883f4 100644
--- a/plat/freescale/imx8qxp/imx8qxp_psci.c
+++ b/plat/freescale/imx8qxp/imx8qxp_psci.c
@@ -193,6 +193,14 @@ void imx_get_sys_suspend_power_state(psci_power_state_t *req_state)
req_state->pwr_domain_state[i] = PLAT_MAX_RET_STATE;
}
+void __attribute__((noreturn)) imx_system_reset(void)
+{
+ sc_pm_reset(ipc_handle, SC_PM_RESET_TYPE_BOARD);
+
+ while (1)
+ ;
+}
+
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,
@@ -203,6 +211,7 @@ static const plat_psci_ops_t imx_plat_psci_ops = {
.pwr_domain_suspend = imx_domain_suspend,
.pwr_domain_suspend_finish = imx_domain_suspend_finish,
.get_sys_suspend_power_state = imx_get_sys_suspend_power_state,
+ .system_reset = imx_system_reset,
};
/* export the platform specific psci ops */
diff --git a/plat/freescale/imx8qxp/include/sec_rsrc.h b/plat/freescale/imx8qxp/include/sec_rsrc.h
index 46585881..4d7e62de 100644
--- a/plat/freescale/imx8qxp/include/sec_rsrc.h
+++ b/plat/freescale/imx8qxp/include/sec_rsrc.h
@@ -10,6 +10,7 @@ sc_rsrc_t secure_rsrcs[] = {
SC_R_A35_2,
SC_R_A35_3,
SC_R_GIC,
+ SC_R_SYSTEM,
};
/* resources that have register access for non-secure domain */