diff options
author | Tom Rini <trini@konsulko.com> | 2018-09-27 08:29:10 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-09-27 08:29:10 -0400 |
commit | bbef20d479441b01d62252cf127498c58078b2c3 (patch) | |
tree | 7818d7df29c6147d5270c0ee0a6ff1645917d1b6 /arch/arm/cpu/armv8/zynqmp/cpu.c | |
parent | 0ae8dcfef7c890330c62bb34c724126ffc169bef (diff) | |
parent | 3888c8d1979289efe685fe29276aed4d4b685975 (diff) |
Merge tag 'xilinx-for-v2018.11' of git://git.denx.de/u-boot-microblaze
Xilinx changes for v2018.11
- Handle BOARD_LATE_INIT via Kconfig
SPL:
- Enable GZIP for all partitions types(not only for kernel)
ZynqMP:
- Rearrange pmufw version handling
- Support newer PMUFW with improved fpga load sequence
Zynq:
- Cleanup config file
- Simplify zybo config by enabling option via Kconfig
net:
- Fix gems max-speed property reading
- Enable support for fixed-link phys
Diffstat (limited to 'arch/arm/cpu/armv8/zynqmp/cpu.c')
-rw-r--r-- | arch/arm/cpu/armv8/zynqmp/cpu.c | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/arch/arm/cpu/armv8/zynqmp/cpu.c b/arch/arm/cpu/armv8/zynqmp/cpu.c index 1279dc8658..43ba739d2f 100644 --- a/arch/arm/cpu/armv8/zynqmp/cpu.c +++ b/arch/arm/cpu/armv8/zynqmp/cpu.c @@ -171,38 +171,28 @@ int __maybe_unused invoke_smc(u32 pm_api_id, u32 arg0, u32 arg1, u32 arg2, return regs.regs[0]; } -#define ZYNQMP_SIP_SVC_GET_API_VERSION 0xC2000001 - -#define ZYNQMP_PM_VERSION_MAJOR 1 -#define ZYNQMP_PM_VERSION_MINOR 0 -#define ZYNQMP_PM_VERSION_MAJOR_SHIFT 16 -#define ZYNQMP_PM_VERSION_MINOR_MASK 0xFFFF - -#define ZYNQMP_PM_VERSION \ - ((ZYNQMP_PM_VERSION_MAJOR << ZYNQMP_PM_VERSION_MAJOR_SHIFT) | \ - ZYNQMP_PM_VERSION_MINOR) - #if defined(CONFIG_CLK_ZYNQMP) -void zynqmp_pmufw_version(void) +unsigned int zynqmp_pmufw_version(void) { int ret; u32 ret_payload[PAYLOAD_ARG_CNT]; - u32 pm_api_version; - - ret = invoke_smc(ZYNQMP_SIP_SVC_GET_API_VERSION, 0, 0, 0, 0, - ret_payload); - pm_api_version = ret_payload[1]; + static u32 pm_api_version = ZYNQMP_PM_VERSION_INVALID; - if (ret) - panic("PMUFW is not found - Please load it!\n"); + /* + * Get PMU version only once and later + * just return stored values instead of + * asking PMUFW again. + */ + if (pm_api_version == ZYNQMP_PM_VERSION_INVALID) { + ret = invoke_smc(ZYNQMP_SIP_SVC_GET_API_VERSION, 0, 0, 0, 0, + ret_payload); + pm_api_version = ret_payload[1]; - printf("PMUFW:\tv%d.%d\n", - pm_api_version >> ZYNQMP_PM_VERSION_MAJOR_SHIFT, - pm_api_version & ZYNQMP_PM_VERSION_MINOR_MASK); + if (ret) + panic("PMUFW is not found - Please load it!\n"); + } - if (pm_api_version < ZYNQMP_PM_VERSION) - panic("PMUFW version error. Expected: v%d.%d\n", - ZYNQMP_PM_VERSION_MAJOR, ZYNQMP_PM_VERSION_MINOR); + return pm_api_version; } #endif |