summaryrefslogtreecommitdiffstats
path: root/board/xilinx/zynqmp
diff options
context:
space:
mode:
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>2018-08-21 15:44:49 +0530
committerMichal Simek <michal.simek@xilinx.com>2018-09-26 10:15:00 +0200
commitb94a8271cc42086f3f75941c15bba265f409601d (patch)
tree0a56be90b1b86b69bb4aca2a2a6e751af1b7c172 /board/xilinx/zynqmp
parentfe68f2332d80aa3e8b79b76941c884030778ae76 (diff)
downloadu-boot-b94a8271cc42086f3f75941c15bba265f409601d.tar.gz
u-boot-b94a8271cc42086f3f75941c15bba265f409601d.tar.xz
u-boot-b94a8271cc42086f3f75941c15bba265f409601d.zip
arm64: zynqmp: Return pmufw version for zynqmp_pmufw_version()
Modify the zynqmp_pmufw_version() routine to return PMUFW version so that it can be reused wherever required. Get PMUFW version from PMU only once at bootup and later just return stored value. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board/xilinx/zynqmp')
-rw-r--r--board/xilinx/zynqmp/zynqmp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 89fac6bb67..af91cde7c8 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -281,7 +281,16 @@ int board_early_init_f(void)
{
int ret = 0;
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_CLK_ZYNQMP)
- zynqmp_pmufw_version();
+ u32 pm_api_version;
+
+ pm_api_version = zynqmp_pmufw_version();
+ printf("PMUFW:\tv%d.%d\n",
+ pm_api_version >> ZYNQMP_PM_VERSION_MAJOR_SHIFT,
+ pm_api_version & ZYNQMP_PM_VERSION_MINOR_MASK);
+
+ if (pm_api_version < ZYNQMP_PM_VERSION)
+ panic("PMUFW version error. Expected: v%d.%d\n",
+ ZYNQMP_PM_VERSION_MAJOR, ZYNQMP_PM_VERSION_MINOR);
#endif
#if defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED)