summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2014-07-04 16:05:24 +0800
committerYe.Li <B37916@freescale.com>2014-07-04 17:24:04 +0800
commite5c6f2f9a3210635633065b8ebe55bb6f6c0a1b6 (patch)
tree977c349ecdfda9fe31a8a8c4d7746f4cd3015f3c
parent8f71c0e790814c7681cc3a6db843f2a402c889fc (diff)
downloadu-boot-imx-e5c6f2f9a3210635633065b8ebe55bb6f6c0a1b6.zip
u-boot-imx-e5c6f2f9a3210635633065b8ebe55bb6f6c0a1b6.tar.gz
u-boot-imx-e5c6f2f9a3210635633065b8ebe55bb6f6c0a1b6.tar.bz2
ENGR00321260-1 iMX6: Add support to get CPU serial number
The android boot needs get_board_serial function to get the CPU uid as the serial number. Implement this function to read the uid from fuse for all iMX6 platforms. Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit 8d355a9d6f138e1c1cd04dbadb7b5b3e2d692701)
-rw-r--r--arch/arm/cpu/armv7/mx6/soc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index 4662893..189463d 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -518,6 +518,19 @@ int board_postclk_init(void)
return 0;
}
+#ifdef CONFIG_SERIAL_TAG
+void get_board_serial(struct tag_serialnr *serialnr)
+{
+ struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
+ struct fuse_bank *bank = &ocotp->bank[0];
+ struct fuse_bank0_regs *fuse =
+ (struct fuse_bank0_regs *)bank->fuse_regs;
+
+ serialnr->low = fuse->uid_low;
+ serialnr->high = fuse->uid_high;
+}
+#endif
+
#ifndef CONFIG_SYS_DCACHE_OFF
void enable_caches(void)
{