imx: initialize register value before writting MU_SR register
MU_SR register bit[30] is cold boot flag passed from SCU,
w0 is random value and would clear the flag incorrectly,
and cause system partition reboot fail if Linux is in suspend.
So this patch initializes it to 0x80000000 which is exactly
the same with first time board power up before writting to MU_SR
register.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 3bbb1bc8f15d56f0d071919fb80c778d5d67f969)
diff --git a/bl31/aarch64/bl31_entrypoint.S b/bl31/aarch64/bl31_entrypoint.S
index fe55f12..7df9288 100644
--- a/bl31/aarch64/bl31_entrypoint.S
+++ b/bl31/aarch64/bl31_entrypoint.S
@@ -23,6 +23,7 @@
func bl31_entrypoint
#ifdef PLAT_imx8qm
ldr x1, stm
+ ldr w0, =0x80000000
str w0, [x1]
str w0, [x1]
str w0, [x1]