Commit 4d4de2adc74a5cd1b1f2cb8dd122e02cd5b97252
Committed by
Ye Li
1 parent
32943c7d81
Exists in
smarc_8mq_lf_v2020.04
and in
4 other branches
MLK-17050 imx8m: print out atf commit
Print out atf commit in U-Boot. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit df89948806c38e38119767a67ef0e18f24ac886b) (cherry picked from commit 3a17aa1659fbfe675b74ada60a481d93bb557cdc) (cherry picked from commit 60780b360889a4366159d342dd7e197faf0d1ca2)
Showing 5 changed files with 32 additions and 0 deletions Side-by-side Diff
arch/arm/mach-imx/imx8m/soc.c
... | ... | @@ -20,6 +20,7 @@ |
20 | 20 | #include <fdt_support.h> |
21 | 21 | #include <fsl_wdog.h> |
22 | 22 | #include <imx_sip.h> |
23 | +#include <generated/version_autogenerated.h> | |
23 | 24 | |
24 | 25 | DECLARE_GLOBAL_DATA_PTR; |
25 | 26 | |
... | ... | @@ -458,6 +459,33 @@ |
458 | 459 | * spin for .5 seconds before reset |
459 | 460 | */ |
460 | 461 | } |
462 | +} | |
463 | +#endif | |
464 | + | |
465 | +#if defined(CONFIG_ARCH_MISC_INIT) | |
466 | +#define FSL_SIP_BUILDINFO 0xC2000003 | |
467 | +#define FSL_SIP_BUILDINFO_GET_COMMITHASH 0x00 | |
468 | +static void acquire_buildinfo(void) | |
469 | +{ | |
470 | + uint64_t atf_commit = 0; | |
471 | + | |
472 | + /* Get ARM Trusted Firmware commit id */ | |
473 | + atf_commit = call_imx_sip(FSL_SIP_BUILDINFO, | |
474 | + FSL_SIP_BUILDINFO_GET_COMMITHASH, 0, 0, 0); | |
475 | + if (atf_commit == 0xffffffff) { | |
476 | + debug("ATF does not support build info\n"); | |
477 | + atf_commit = 0x30; /* Display 0, 0 ascii is 0x30 */ | |
478 | + } | |
479 | + | |
480 | + printf("\n BuildInfo:\n - ATF %s\n - %s\n\n", (char *)&atf_commit, | |
481 | + U_BOOT_VERSION); | |
482 | +} | |
483 | + | |
484 | +int arch_misc_init(void) | |
485 | +{ | |
486 | + acquire_buildinfo(); | |
487 | + | |
488 | + return 0; | |
461 | 489 | } |
462 | 490 | #endif |
configs/imx8mm_evk_defconfig
configs/imx8mn_ddr4_evk_defconfig
configs/imx8mp_evk_defconfig