summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorYork Sun <yorksun@freescale.com>2014-04-30 14:43:46 -0700
committerYork Sun <yorksun@freescale.com>2014-05-13 08:31:22 -0700
commitbffac7aef54039dbe53dbf8bcbc9f8dbe78b8aa5 (patch)
tree9eead75ba2f24fd302f4fd3954ab65e46c4a52cd /board
parent73a56b6e9f3f1cc2412b5b8a75a3c71f48586c94 (diff)
downloadu-boot-imx-bffac7aef54039dbe53dbf8bcbc9f8dbe78b8aa5.zip
u-boot-imx-bffac7aef54039dbe53dbf8bcbc9f8dbe78b8aa5.tar.gz
u-boot-imx-bffac7aef54039dbe53dbf8bcbc9f8dbe78b8aa5.tar.bz2
powerpc/freescale: Change the return value of mac_read_from_eeprom()
The return value has not been checked by its caller, until recent change of using generic board architecture. The error of this function is not critical enough to hang the system. Printing the warning message is enough to catch user's attention. U-boot should continue to boot to give user a chance to fix the EEPROM. Chaning the return value to 0 to avoid hanging in the board_init_r(). Signed-off-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/common/sys_eeprom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index 9c18dd8..33a5a5a 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -425,13 +425,13 @@ int mac_read_from_eeprom(void)
if (read_eeprom()) {
printf("Read failed.\n");
- return -1;
+ return 0;
}
if (!is_valid) {
printf("Invalid ID (%02x %02x %02x %02x)\n",
e.id[0], e.id[1], e.id[2], e.id[3]);
- return -1;
+ return 0;
}
#ifdef CONFIG_SYS_I2C_EEPROM_NXID
@@ -447,7 +447,7 @@ int mac_read_from_eeprom(void)
crcp = (void *)&e + crc_offset;
if (crc != be32_to_cpu(*crcp)) {
printf("CRC mismatch (%08x != %08x)\n", crc, be32_to_cpu(e.crc));
- return -1;
+ return 0;
}
#ifdef CONFIG_SYS_I2C_EEPROM_NXID