]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx9: soc: imx9: soc: Align UID endianness with ROM
authorFrank Li <Frank.Li@nxp.com>
Thu, 19 Sep 2024 04:01:21 +0000 (12:01 +0800)
committerFabio Estevam <festevam@gmail.com>
Thu, 19 Sep 2024 03:12:41 +0000 (00:12 -0300)
ROM use UID[0] and UID[1] as serial number with big endian when usb serial
download.

After update this, uuu(>1.6) can use below command to filter out devices
when multi boards connected.

uuu -ms <serial#> ...

[sudo] uuu -lsusb can list known devices with serial# informaiton.

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

index 06032f2ff59f23decf51efb77ace02939739c83f..6dcf0c4612d7fca04202c0bcc8b611e8a1fb3a00 100644 (file)
@@ -563,8 +563,8 @@ 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]);
 
-       serialnr->low = gd->arch.uid[0];
-       serialnr->high = gd->arch.uid[3];
+       serialnr->low = __be32_to_cpu(gd->arch.uid[1]);
+       serialnr->high = __be32_to_cpu(gd->arch.uid[0]);
 }
 #endif