[U-Boot] [PATCH] powerpc/eeprom: update MAX_NUM_PORTS to fix program failure

Shengzhou Liu Shengzhou.Liu at freescale.com
Thu Aug 8 11:14:53 CEST 2013


On some boards, the size of EEPROM is 128 Bytes instead of 256.
so we set default MAX_NUM_PORTS to 9 rather than previous 23 to
avoid the programming failure, we can define MAX_NUM_PORTS in
board-specific header file to overwrite the default value.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu at freescale.com>
---
 board/freescale/common/sys_eeprom.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index d2ed036..6bfc376 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -34,7 +34,9 @@
 #endif
 
 #ifdef CONFIG_SYS_I2C_EEPROM_NXID
-#define MAX_NUM_PORTS	23
+#ifndef MAX_NUM_PORTS
+#define MAX_NUM_PORTS	9
+#endif
 #define NXID_VERSION	1
 #endif
 
-- 
1.8.0




More information about the U-Boot mailing list