MLK-16441 imx8qm/qxp: print commit hash for SCFW, SECO, IMX-MKIMAGE and ATF
authorYe Li <ye.li@nxp.com>
Thu, 12 Mar 2020 02:40:19 +0000 (19:40 -0700)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 07:56:19 +0000 (00:56 -0700)
commitb1b218bd79b03440d8f4e4bf21c555464808ed12
treee2b3a3b822e226ad10b4e56f1879de095d8ea0c4
parent50e421d39a5c6913838794996fc98d01da42de3f
MLK-16441 imx8qm/qxp: print commit hash for SCFW, SECO, IMX-MKIMAGE and ATF

Since we have many software running on QM/QXP, it is better to print their
commit ids in u-boot to know their versions.

This patch gets the commit ids for SCFW and ATF via their APIs and get the
commit for imx-mkimage at the end of u-boot.bin loading address.

Once the commit ids are acquired, show them in console like:
BuildInfo:
    - SCFW e2e62ca4, SECO-FW c121d4a4, IMX-MKIMAGE fe2ff1e9, ATF 8673a8e
    - U-Boot 2018.03-imx_v2018.03+g557a2e5

and set them to environment variables like:
    commit_atf=8673a8e
    commit_mkimage=fe2ff1e9
    commit_scfw=e2e62ca4
    commit_secofw=c121d4a4

If old software are running which does not support provide commit it, the patch
use 0 instead.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 5b443e3e26178e6df7cf76d98724a45871fcfaf1)
(cherry picked from commit cfe5dc4a4a2fc342859ddd19f5ce01b9c43c2d8b)
arch/arm/mach-imx/imx8/misc.c