summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2015-05-08 18:05:26 +0800
committerYe.Li <B37916@freescale.com>2015-05-11 10:04:47 +0800
commit63bf57cd2c05017c977b1c2caa913042f356b994 (patch)
treee45939480542c5d3d1aeeb34ad1a13981a35a1f2
parent11a6ad7fede3fea34eb99e9decdcd7e23e3726f0 (diff)
downloadu-boot-imx-63bf57cd2c05017c977b1c2caa913042f356b994.zip
u-boot-imx-63bf57cd2c05017c977b1c2caa913042f356b994.tar.gz
u-boot-imx-63bf57cd2c05017c977b1c2caa913042f356b994.tar.bz2
MLK-10870 imx: mx7d: Implement to get board serial number
Get the Unique ID of the chip from the fuse TESTER0 and TESTER1. Signed-off-by: Ye.Li <B37916@freescale.com>
-rw-r--r--arch/arm/cpu/armv7/mx7/soc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c
index d88e986..0e80d0e 100644
--- a/arch/arm/cpu/armv7/mx7/soc.c
+++ b/arch/arm/cpu/armv7/mx7/soc.c
@@ -183,7 +183,13 @@ int board_postclk_init(void)
#ifdef CONFIG_SERIAL_TAG
void get_board_serial(struct tag_serialnr *serialnr)
{
- /* TODO */
+ 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->tester0;
+ serialnr->high = fuse->tester1;
}
#endif