summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorGaurav Jain <gaurav.jain@nxp.com>2022-05-11 14:07:55 +0530
committerStefano Babic <sbabic@denx.de>2022-05-20 12:36:47 +0200
commitcad77280c31f6736e93bf18060080fee50cc9ee3 (patch)
tree02a3d7321105a0b4ae78a373419b5cea89183584 /board
parentcda8f87349594a1df9cc8616e25944173c9d0a0c (diff)
downloadu-boot-cad77280c31f6736e93bf18060080fee50cc9ee3.tar.gz
i.MX8ULP: add display_ele_fw_version api
implement get f/w version api. print ele f/w version in spl. Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/imx8ulp_evk/spl.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/board/freescale/imx8ulp_evk/spl.c b/board/freescale/imx8ulp_evk/spl.c
index 66bfc2bd0c..ece9ff26e9 100644
--- a/board/freescale/imx8ulp_evk/spl.c
+++ b/board/freescale/imx8ulp_evk/spl.c
@@ -58,6 +58,23 @@ int power_init_board(void)
return 0;
}
+void display_ele_fw_version(void)
+{
+ u32 fw_version, sha1, res;
+ int ret;
+
+ ret = ahab_get_fw_version(&fw_version, &sha1, &res);
+ if (ret) {
+ printf("ahab get firmware version failed %d, 0x%x\n", ret, res);
+ } else {
+ printf("ELE firmware version %u.%u.%u-%x",
+ (fw_version & (0x00ff0000)) >> 16,
+ (fw_version & (0x0000ff00)) >> 8,
+ (fw_version & (0x000000ff)), sha1);
+ ((fw_version & (0x80000000)) >> 31) == 1 ? puts("-dirty\n") : puts("\n");
+ }
+}
+
void spl_board_init(void)
{
struct udevice *dev;
@@ -77,6 +94,8 @@ void spl_board_init(void)
puts("Normal Boot\n");
+ display_ele_fw_version();
+
/* After AP set iomuxc0, the i2c can't work, Need M33 to set it now */
/* Load the lposc fuse to work around ROM issue. The fuse depends on S400 to read. */