According to latest ELE Get FW version API, the FW version word is defined
as below. The patch version only has 4 bits and minor version has 12 bits.
However, the codes use 8 bits for patch version and minor version. Add the
patch to fix the issue.

ELE firmware version
[31] - When set indicates a dirty build.
[30] - Reserved
[29:28] - Hotfix version.
[27] - When set, indicate that ELE FW is authenticated and operational.
[26:25] - Reserved
[24] - When set, indicate that an alternative FW is running.
[23:16] - Indicate the major version. This byte is checked against the
version set in the fuses to determine if the FW execution can be authorized
[15:4] - Indicate the minor version.
[3:0] - Indicate the patch version.

Signed-off-by: Ye Li <ye...@nxp.com>
Reviewed-by: Peng Fan <peng....@nxp.com>
---
 board/freescale/imx8ulp_evk/spl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/freescale/imx8ulp_evk/spl.c 
b/board/freescale/imx8ulp_evk/spl.c
index d123b21b722..fe637077928 100644
--- a/board/freescale/imx8ulp_evk/spl.c
+++ b/board/freescale/imx8ulp_evk/spl.c
@@ -69,8 +69,8 @@ void display_ele_fw_version(void)
        } else {
                printf("ELE firmware version %u.%u.%u-%x",
                       (fw_version & (0x00ff0000)) >> 16,
-                      (fw_version & (0x0000ff00)) >> 8,
-                      (fw_version & (0x000000ff)), sha1);
+                      (fw_version & (0x0000fff0)) >> 4,
+                      (fw_version & (0x0000000f)), sha1);
                ((fw_version & (0x80000000)) >> 31) == 1 ? puts("-dirty\n") : 
puts("\n");
        }
 }
-- 
2.37.1

Reply via email to