]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx9: soc: Print UID in big endian format for EL2GO
authorYe Li <ye.li@nxp.com>
Thu, 19 Sep 2024 04:01:22 +0000 (12:01 +0800)
committerFabio Estevam <festevam@gmail.com>
Thu, 19 Sep 2024 03:12:41 +0000 (00:12 -0300)
Print UID in big endian format and as one buffer of bytes, so customer
can directly use it for EdgeLock 2GO.

Before:
UID: 0xf6c8ae93 0x0f46b326 0x10d61eb3 0x0583c2d2

Become:
UID: 93aec8f626b3460fb31ed610d2c28305

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/imx9/soc.c

index 6dcf0c4612d7fca04202c0bcc8b611e8a1fb3a00..bdc569b4ae4292a6a0744116d5960a9fda7a2f10 100644 (file)
@@ -560,8 +560,9 @@ int ft_system_setup(void *blob, struct bd_info *bd)
 #if defined(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)
 void get_board_serial(struct tag_serialnr *serialnr)
 {
-       printf("UID: 0x%x 0x%x 0x%x 0x%x\n",
-              gd->arch.uid[0], gd->arch.uid[1], gd->arch.uid[2], gd->arch.uid[3]);
+       printf("UID: %08x%08x%08x%08x\n", __be32_to_cpu(gd->arch.uid[0]),
+              __be32_to_cpu(gd->arch.uid[1]), __be32_to_cpu(gd->arch.uid[2]),
+              __be32_to_cpu(gd->arch.uid[3]));
 
        serialnr->low = __be32_to_cpu(gd->arch.uid[1]);
        serialnr->high = __be32_to_cpu(gd->arch.uid[0]);