MLK-16441 imx8qm/qxp: print commit hash for SCFW, SECO, IMX-MKIMAGE and ATF
authorYe Li <ye.li@nxp.com>
Mon, 16 Apr 2018 08:01:29 +0000 (01:01 -0700)
committerYe Li <ye.li@nxp.com>
Fri, 24 May 2019 08:48:15 +0000 (01:48 -0700)
commita0ae3c321517a1279751130d0d8a264e558f55dd
treeb726821e88fc00c256219dab0329cf09dabd878a
parent39bc3673a53867d25919ecdb32bd2c637a5edf27
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 enables the CONFIG_ARCH_MISC_INIT. In arch_misc_init to 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)
arch/arm/include/asm/arch-imx8/sci/rpc.h
arch/arm/include/asm/arch-imx8/sci/sci.h
arch/arm/mach-imx/imx8/cpu.c
drivers/misc/imx8/scu_api.c