diff options
author | Michal Simek <michal.simek@xilinx.com> | 2015-11-05 08:34:35 +0100 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2016-01-27 15:55:56 +0100 |
commit | 0785dfd8a7b14cb2c99fc1271c865eb2170c620b (patch) | |
tree | 257fe44ca352165c6c42463bde6dc2f875bb56fd /arch/arm/cpu | |
parent | d041e3e15765c3e1977f125083bd7deebe83f40b (diff) | |
download | u-boot-imx-0785dfd8a7b14cb2c99fc1271c865eb2170c620b.zip u-boot-imx-0785dfd8a7b14cb2c99fc1271c865eb2170c620b.tar.gz u-boot-imx-0785dfd8a7b14cb2c99fc1271c865eb2170c620b.tar.bz2 |
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 <michal.simek@xilinx.com>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/armv8/zynqmp/Kconfig | 4 | ||||
-rw-r--r-- | arch/arm/cpu/armv8/zynqmp/clk.c | 16 | ||||
-rw-r--r-- | arch/arm/cpu/armv8/zynqmp/cpu.c | 14 |
3 files changed, 30 insertions, 4 deletions
diff --git a/arch/arm/cpu/armv8/zynqmp/Kconfig b/arch/arm/cpu/armv8/zynqmp/Kconfig index e5a4fdd..9a19dfa 100644 --- a/arch/arm/cpu/armv8/zynqmp/Kconfig +++ b/arch/arm/cpu/armv8/zynqmp/Kconfig @@ -20,10 +20,6 @@ config SYS_SOC config SYS_CONFIG_NAME default "xilinx_zynqmp_ep" if TARGET_ZYNQMP_EP -config SECURE_IOU - bool "Configure ZynqMP secure IOU" - default n - config ZYNQMP_USB bool "Configure ZynqMP USB" diff --git a/arch/arm/cpu/armv8/zynqmp/clk.c b/arch/arm/cpu/armv8/zynqmp/clk.c index 9218586..40bd2ca 100644 --- a/arch/arm/cpu/armv8/zynqmp/clk.c +++ b/arch/arm/cpu/armv8/zynqmp/clk.c @@ -26,6 +26,22 @@ unsigned long get_uart_clk(int dev_id) return 133000000; } +unsigned long zynqmp_get_system_timer_freq(void) +{ + u32 ver = zynqmp_get_silicon_version(); + + switch (ver) { + case ZYNQMP_CSU_VERSION_VELOCE: + return 10000; + case ZYNQMP_CSU_VERSION_EP108: + return 4000000; + case ZYNQMP_CSU_VERSION_QEMU: + return 50000000; + } + + return 100000000; +} + #ifdef CONFIG_CLOCKS /** * set_cpu_clk_info() - Initialize clock framework diff --git a/arch/arm/cpu/armv8/zynqmp/cpu.c b/arch/arm/cpu/armv8/zynqmp/cpu.c index f90cca3..45b49dc 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) { |