From 63bf57cd2c05017c977b1c2caa913042f356b994 Mon Sep 17 00:00:00 2001 From: "Ye.Li" Date: Fri, 8 May 2015 18:05:26 +0800 Subject: 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 --- arch/arm/cpu/armv7/mx7/soc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'arch/arm/cpu') 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 -- cgit v1.1