[U-Boot] [PATCH 37/53] armv8: ls1012ardb: Make U-Boot EL2 safe

Rajesh Bhagat rajesh.bhagat at nxp.com
Wed Oct 3 11:37:20 UTC 2018


When U-Boot boots from EL2, skip some lowlevel init code for CCI-400
requiring EL3.

These initialization tasks are carried out before U-Boot runs.

Signed-off-by: Rajesh Bhagat <rajesh.bhagat at nxp.com>
Signed-off-by: York Sun <york.sun at nxp.com>
---
 board/freescale/ls1012ardb/ls1012ardb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
index 66554bcf6e..f648a9040b 100644
--- a/board/freescale/ls1012ardb/ls1012ardb.c
+++ b/board/freescale/ls1012ardb/ls1012ardb.c
@@ -145,7 +145,8 @@ int board_init(void)
 	 * Set CCI-400 control override register to enable barrier
 	 * transaction
 	 */
-	out_le32(&cci->ctrl_ord, CCI400_CTRLORD_EN_BARRIER);
+	if (current_el() == 3)
+		out_le32(&cci->ctrl_ord, CCI400_CTRLORD_EN_BARRIER);
 
 #ifdef CONFIG_SYS_FSL_ERRATUM_A010315
 	erratum_a010315();
-- 
2.17.1



More information about the U-Boot mailing list