From 0785dfd8a7b14cb2c99fc1271c865eb2170c620b Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 5 Nov 2015 08:34:35 +0100 Subject: ARM64: zynqmp: Use the same U-Boot version with/without ATF Remove SECURE_IOU option which is not needed. U-Boot itself can detect which EL level it is on and based on that use do platform setup. It also simplify usage because one Kconfig entry is gone. Signed-off-by: Michal Simek --- arch/arm/cpu/armv8/zynqmp/cpu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arch/arm/cpu/armv8/zynqmp/cpu.c') diff --git a/arch/arm/cpu/armv8/zynqmp/cpu.c b/arch/arm/cpu/armv8/zynqmp/cpu.c index f90cca36aa..45b49dc018 100644 --- a/arch/arm/cpu/armv8/zynqmp/cpu.c +++ b/arch/arm/cpu/armv8/zynqmp/cpu.c @@ -15,8 +15,22 @@ DECLARE_GLOBAL_DATA_PTR; +static unsigned int zynqmp_get_silicon_version_secure(void) +{ + u32 ver; + + ver = readl(&csu_base->version); + ver &= ZYNQMP_SILICON_VER_MASK; + ver >>= ZYNQMP_SILICON_VER_SHIFT; + + return ver; +} + unsigned int zynqmp_get_silicon_version(void) { + if (current_el() == 3) + return zynqmp_get_silicon_version_secure(); + gd->cpu_clk = get_tbclk(); switch (gd->cpu_clk) { -- cgit v1.2.1