summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2019-10-26 16:24:04 +0200
committerStefano Babic <sbabic@denx.de>2019-11-03 17:04:16 +0100
commit910b2fca9783fbd72978eaf78ffcfdd5ab3b050f (patch)
treed33e7d98ad0522cec896a33766356cc066613bd7
parent264977d1c2f12c8b7bcb125405a66bb05332d3c5 (diff)
downloadu-boot-910b2fca9783fbd72978eaf78ffcfdd5ab3b050f.tar.gz
imx8: output SECO-FW and ATF commit IDs
Borrow ID reading code from Ye Li (NXP U-Boot, commit ID 5b443e3e2617) but drop imx-mkimage commit ID reading since we now use in tree mkimage. Signed-off-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r--arch/arm/mach-imx/imx8/misc.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/imx8/misc.c b/arch/arm/mach-imx/imx8/misc.c
index fe73e29eee..00fe4670bb 100644
--- a/arch/arm/mach-imx/imx8/misc.c
+++ b/arch/arm/mach-imx/imx8/misc.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
#include <common.h>
#include <asm/arch/sci/sci.h>
+#include <asm/mach-imx/sys_proto.h>
int sc_pm_setup_uart(sc_rsrc_t uart_rsrc, sc_pm_clock_rate_t clk_rate)
{
@@ -25,9 +26,14 @@ int sc_pm_setup_uart(sc_rsrc_t uart_rsrc, sc_pm_clock_rate_t clk_rate)
return 0;
}
+#define FSL_SIP_BUILDINFO 0xC2000003
+#define FSL_SIP_BUILDINFO_GET_COMMITHASH 0x00
+
void build_info(void)
{
+ u32 seco_build = 0, seco_commit = 0;
u32 sc_build = 0, sc_commit = 0;
+ ulong atf_commit = 0;
/* Get SCFW build and commit id */
sc_misc_build_info(-1, &sc_build, &sc_commit);
@@ -35,5 +41,23 @@ void build_info(void)
printf("SCFW does not support build info\n");
sc_commit = 0; /* Display 0 if build info not supported */
}
- printf("Build: SCFW %x\n", sc_commit);
+
+ /* Get SECO FW build and commit id */
+ sc_seco_build_info(-1, &seco_build, &seco_commit);
+ if (!seco_build) {
+ debug("SECO FW does not support build info\n");
+ /* Display 0 when the build info is not supported */
+ seco_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 */
+ }
+
+ printf("Build: SCFW %08x, SECO-FW %08x, ATF %s\n",
+ sc_commit, seco_commit, (char *)&atf_commit);
}