summaryrefslogtreecommitdiff
path: root/board/freescale/common
diff options
context:
space:
mode:
authorYork Sun <york.sun@nxp.com>2017-05-15 08:51:59 -0700
committerYork Sun <york.sun@nxp.com>2017-06-01 19:57:24 -0700
commit399e2bb60cb76131c49446baf350697142af7c07 (patch)
tree5e13e5deea8e8d73302f4731e1ea1d6d42ef3236 /board/freescale/common
parent1f55a93802ab1522e4f479d1d2730158e26b3567 (diff)
armv8: layerscape: Make U-Boot EL2 safe
When U-Boot boots from EL2, skip some lowlevel init code requiring EL3, including CCI-400/CCN-504, trust zone, GIC, etc. These initialization tasks are carried out before U-Boot runs. This applies to the RAM version image used for SPL boot if PPA is loaded first. Signed-off-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'board/freescale/common')
-rw-r--r--board/freescale/common/ns_access.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/board/freescale/common/ns_access.c b/board/freescale/common/ns_access.c
index 81c921122e..1c2287d22a 100644
--- a/board/freescale/common/ns_access.c
+++ b/board/freescale/common/ns_access.c
@@ -39,7 +39,10 @@ static void enable_devices_ns_access(struct csu_ns_dev *ns_dev, uint32_t num)
void enable_layerscape_ns_access(void)
{
- enable_devices_ns_access(ns_dev, ARRAY_SIZE(ns_dev));
+#ifdef CONFIG_ARM64
+ if (current_el() == 3)
+#endif
+ enable_devices_ns_access(ns_dev, ARRAY_SIZE(ns_dev));
}
void set_pcie_ns_access(int pcie, u16 val)