diff options
author | Alison Wang <b18965@freescale.com> | 2014-10-17 15:26:35 +0800 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2014-11-24 09:27:23 -0800 |
commit | 5175a2885fbb47e4836dcb8ad0ad2214e9b0b3b5 (patch) | |
tree | 0cdb311e61a78e8dafeec07aead0824e8bbc736b | |
parent | 272c5265ed8f4bf1f02f2d2b38828fbf8939cac3 (diff) | |
download | u-boot-imx-5175a2885fbb47e4836dcb8ad0ad2214e9b0b3b5.zip u-boot-imx-5175a2885fbb47e4836dcb8ad0ad2214e9b0b3b5.tar.gz u-boot-imx-5175a2885fbb47e4836dcb8ad0ad2214e9b0b3b5.tar.bz2 |
arm: ls102xa: Add SystemID EEPROM support for LS1021ATWR board
SystemID information could be read through I2C1 from EEPROM
on LS1021ATWR board.
As LS1 is a little-endian processor, getting the version ID by
be32_to_cpu() is wrong. Fix it by using e.version directly.
This change will be compatible for both ARM and PowerPC.
As there is an errata that I2C1 could not work in SD boot,
reading EEPROM through I2C1 is disabled too in SD boot.
Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
-rw-r--r-- | board/freescale/common/sys_eeprom.c | 4 | ||||
-rw-r--r-- | include/configs/ls1021atwr.h | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c index 6144c53..3426b8a 100644 --- a/board/freescale/common/sys_eeprom.c +++ b/board/freescale/common/sys_eeprom.c @@ -90,7 +90,7 @@ static void show_eeprom(void) /* EEPROM tag ID, either CCID or NXID */ #ifdef CONFIG_SYS_I2C_EEPROM_NXID printf("ID: %c%c%c%c v%u\n", e.id[0], e.id[1], e.id[2], e.id[3], - be32_to_cpu(e.version)); + e.version); #else printf("ID: %c%c%c%c\n", e.id[0], e.id[1], e.id[2], e.id[3]); #endif @@ -485,7 +485,7 @@ int mac_read_from_eeprom(void) #ifdef CONFIG_SYS_I2C_EEPROM_NXID printf("%c%c%c%c v%u\n", e.id[0], e.id[1], e.id[2], e.id[3], - be32_to_cpu(e.version)); + e.version); #else printf("%c%c%c%c\n", e.id[0], e.id[1], e.id[2], e.id[3]); #endif diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index 34cec65..a5d2976 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -161,6 +161,17 @@ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_MXC +/* EEPROM */ +#ifndef CONFIG_SD_BOOT +#define CONFIG_ID_EEPROM +#define CONFIG_SYS_I2C_EEPROM_NXID +#define CONFIG_SYS_EEPROM_BUS_NUM 1 +#define CONFIG_SYS_I2C_EEPROM_ADDR 0x53 +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 +#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 +#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 +#endif + /* * MMC */ |