diff options
author | Ji Luo <ji.luo@nxp.com> | 2019-11-04 22:32:45 +0800 |
---|---|---|
committer | Ji Luo <ji.luo@nxp.com> | 2020-05-15 17:34:39 +0800 |
commit | 99c6701d7fc3b17ed65f71b9d85602435cea9d2d (patch) | |
tree | 469b6ddfda30346165e94e124e5cedf055d47a40 /board/freescale | |
parent | f388e3aaeb1cf8ce1d55280927ead5c357a57336 (diff) |
MA-15813 [Android] imx8q: Enable reset in spl stage
To avoid both A/B slots are marked as unbootable because
of some random failures, we will need to reset at spl stage
when current slot load/verify fail but already with flag
"successful_boot" set.
imx8q can't be reset via the psci driver because the atf
is not avaiable at spl stage, porting the sc_pm_reboot()
scu api so we can do reset at spl stage for imx8qm/imx8qxp
mek boards.
Test: reset on imx8qm_mek and imx8qxp_mek.
Change-Id: Ifa0bdea9393e413942a8a0188a4f937fa0aa9ab8
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from a5c5748101c383bc3afb424a3ef2689ab2664846)
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/imx8qm_mek/imx8qm_mek.c | 3 | ||||
-rw-r--r-- | board/freescale/imx8qxp_mek/imx8qxp_mek.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c index 39cd1ac69b..ded960e122 100644 --- a/board/freescale/imx8qm_mek/imx8qm_mek.c +++ b/board/freescale/imx8qm_mek/imx8qm_mek.c @@ -406,7 +406,8 @@ void board_quiesce_devices(void) */ void reset_cpu(ulong addr) { - /* TODO */ + sc_pm_reboot(-1, SC_PM_RESET_TYPE_COLD); + while(1); } #ifdef CONFIG_OF_BOARD_SETUP diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c index f4d3cc6dd3..3d46089851 100644 --- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c +++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c @@ -370,7 +370,9 @@ void board_quiesce_devices(void) */ void reset_cpu(ulong addr) { - /* TODO */ + sc_pm_reboot(-1, SC_PM_RESET_TYPE_COLD); + while(1); + } #ifdef CONFIG_OF_BOARD_SETUP |