Commit 81e288e1 authored by Zhang Bo's avatar Zhang Bo Committed by Jason Liu

MA-10118[Android EVK-8MQ] realize the get_board_serial function which read unique id from ocopt

Read the unique id directly from the ocopt register.

Change-Id: I6cfb246153812709ea98edd5b9a85aff4714a329
Signed-off-by: 's avatarZhang Bo <bo.zhang@nxp.com>
parent fafc23d5
......@@ -361,9 +361,13 @@ int mmc_get_env_dev(void)
#ifdef CONFIG_SERIAL_TAG
void get_board_serial(struct tag_serialnr *serialnr)
{
/* TODO: */
serialnr->low = 0;
serialnr->high = 0;
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
......
......@@ -192,6 +192,13 @@ struct ocotp_regs {
} bank[0];
};
struct fuse_bank0_regs {
u32 lock;
u32 uid_low;
u32 uid_high;
u32 rsvd;
};
struct fuse_bank1_regs {
u32 tester3;
u32 rsvd0[3];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment