Commit df899488 authored by Peng Fan's avatar Peng Fan

MLK-17050 imx8m: print out atf commit

Print out atf commit in U-Boot.
Signed-off-by: 's avatarPeng Fan <peng.fan@nxp.com>
parent 696326cb
......@@ -15,6 +15,7 @@
#include <errno.h>
#include <fdt_support.h>
#include <fsl_wdog.h>
#include <generated/version_autogenerated.h>
DECLARE_GLOBAL_DATA_PTR;
......@@ -551,3 +552,30 @@ void reset_cpu(ulong addr)
*/
}
}
#if defined(CONFIG_ARCH_MISC_INIT)
#define FSL_SIP_BUILDINFO 0xC2000003
#define FSL_SIP_BUILDINFO_GET_COMMITHASH 0x00
static void acquire_buildinfo(void)
{
uint64_t atf_commit = 0;
/* Get ARM Trusted Firmware commit id */
atf_commit = call_imx_sip(FSL_SIP_BUILDINFO,
FSL_SIP_BUILDINFO_GET_COMMITHASH, 0, 0, 0);
if (atf_commit == 0xffffffff) {
debug("ATF does not support build info\n");
atf_commit = 0x30; /* Display 0, 0 ascii is 0x30 */
}
printf("\n BuildInfo:\n - ATF %s\n - %s\n\n", (char *)&atf_commit,
U_BOOT_VERSION);
}
int arch_misc_init(void)
{
acquire_buildinfo();
return 0;
}
#endif
......@@ -3,6 +3,7 @@ CONFIG_ARCH_IMX8M=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_IMX8MQ_EVK=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg"
CONFIG_ARCH_MISC_INIT=y
CONFIG_SPL=y
CONFIG_HUSH_PARSER=y
CONFIG_OF_LIBFDT=y
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment