From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rajesh Bhagat Date: Wed, 3 Oct 2018 17:07:21 +0530 Subject: [U-Boot] [PATCH 38/53] armv8: ls1012aqds: Make U-Boot EL2 safe In-Reply-To: <20181003113736.14981-1-rajesh.bhagat@nxp.com> References: <20181003113736.14981-1-rajesh.bhagat@nxp.com> Message-ID: <20181003113736.14981-39-rajesh.bhagat@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Signed-off-by: York Sun --- board/freescale/ls1012aqds/ls1012aqds.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c index 7582f5e430..1187bd130e 100644 --- a/board/freescale/ls1012aqds/ls1012aqds.c +++ b/board/freescale/ls1012aqds/ls1012aqds.c @@ -120,8 +120,9 @@ 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