1
0
Fork 0

Enable reading of serial tag from OCOTP

utp
Martin T. H. Sandsmark 2016-12-02 11:18:33 +01:00
parent c1794c409e
commit 231ed29fcb
2 changed files with 18 additions and 1 deletions

View File

@ -436,6 +436,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
#if defined(CONFIG_FEC_MXC)
void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
{

View File

@ -1,7 +1,8 @@
/*
* Copyright 2013 Freescale Semiconductor, Inc.
* Copyright 2016 reMarkable AS
*
* Configuration settings for the Freescale i.MX6SL EVK board.
* Configuration settings for the reMarkable
*
* SPDX-License-Identifier: GPL-2.0+
*/
@ -28,6 +29,9 @@
/* MMC Configs */
#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
/* Enable reading of serial tag from OCOTP */
#define CONFIG_SERIAL_TAG
/* I2C Configs */
#define CONFIG_SYS_I2C
#define CONFIG_SYS_I2C_MXC