summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeo Hall <teo.hall@nxp.com>2018-11-27 14:50:50 -0600
committerAnson Huang <Anson.Huang@nxp.com>2019-12-13 10:41:29 +0800
commit192fb9ede73006bca15de9bb1663fa4dda648928 (patch)
tree05cb5f346b0bdbaa109c36ecaec9710cb1fda15a
parentd5fca8923f5e390e55ed03212e3c9619c083eb3c (diff)
plat: imx8qm/imx8qxp: Add MU flag check for partition reboot
Test if a partition reboot has taken place with the MU interrupt bit. Check before returning the entrypoint Signed-off-by: Teo Hall <teo.hall@nxp.com>
-rw-r--r--plat/imx/common/imx8_helpers.S19
-rw-r--r--plat/imx/imx8qm/include/platform_def.h5
-rw-r--r--plat/imx/imx8qx/include/platform_def.h4
3 files changed, 28 insertions, 0 deletions
diff --git a/plat/imx/common/imx8_helpers.S b/plat/imx/common/imx8_helpers.S
index 19293bfe..f9d5ad49 100644
--- a/plat/imx/common/imx8_helpers.S
+++ b/plat/imx/common/imx8_helpers.S
@@ -91,6 +91,25 @@ endfunc plat_calc_core_pos
* ---------------------------------------------
*/
func plat_get_my_entrypoint
+
+#if defined(PLAT_IMX8QX) || defined(PLAT_IMX8QM)
+ /* ---------------------------------------------
+ * SCU will signal through a GIR bit when a
+ * partition boot has taken place which requires
+ * cold boot setup to take place once again
+ * ---------------------------------------------
+ */
+
+ mov x0, #PLAT_BOOT_MU_BASE
+ add x0, x0, #PLAT_MU_SR_OFF
+ ldr w1, [x0]
+ and w1, w1, #PLAT_MU_COLD_BOOT_FLG_MSK
+ cbz w1, warm_boot
+ str w1, [x0]
+ mov x0, #0
+ ret
+warm_boot:
+#endif
adrp x1, mailbox_base
ldr x0, [x1, :lo12:mailbox_base]
ret
diff --git a/plat/imx/imx8qm/include/platform_def.h b/plat/imx/imx8qm/include/platform_def.h
index cf964187..9da04890 100644
--- a/plat/imx/imx8qm/include/platform_def.h
+++ b/plat/imx/imx8qm/include/platform_def.h
@@ -32,6 +32,11 @@
#define PLAT_MAX_OFF_STATE U(2)
#define PLAT_MAX_RET_STATE U(1)
+#define PLAT_MU_SR_OFF 0x20
+#define PLAT_MU_COLD_BOOT_FLG_MSK 0x40000000
+#define PLAT_BOOT_MU_BASE 0x5D1B0000
+
+
#define BL31_BASE 0x80000000
#define BL31_LIMIT 0x80020000
diff --git a/plat/imx/imx8qx/include/platform_def.h b/plat/imx/imx8qx/include/platform_def.h
index c4415017..626f2e25 100644
--- a/plat/imx/imx8qx/include/platform_def.h
+++ b/plat/imx/imx8qx/include/platform_def.h
@@ -27,6 +27,10 @@
#define PLAT_MAX_OFF_STATE U(2)
#define PLAT_MAX_RET_STATE U(1)
+#define PLAT_MU_SR_OFF 0x20
+#define PLAT_MU_COLD_BOOT_FLG_MSK 0x40000000
+#define PLAT_BOOT_MU_BASE 0x5D1B0000
+
#define BL31_BASE 0x80000000
#define BL31_LIMIT 0x80020000