summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorShengzhou Liu <Shengzhou.Liu@freescale.com>2013-09-13 14:46:01 +0800
committerYork Sun <yorksun@freescale.com>2013-10-16 16:15:17 -0700
commit5536aeb09b672e2541663fdc9370e2bc174dbae9 (patch)
treeb7038558bd3804dfc0982ff50b298551d2701288 /board
parent41c686d9758cad0050206b3176c8820ee2a88646 (diff)
downloadu-boot-imx-5536aeb09b672e2541663fdc9370e2bc174dbae9.zip
u-boot-imx-5536aeb09b672e2541663fdc9370e2bc174dbae9.tar.gz
u-boot-imx-5536aeb09b672e2541663fdc9370e2bc174dbae9.tar.bz2
powerpc/eeprom: update MAX_NUM_PORTS to adapt non-256-bytes EEPROM
Some boards use System EEPROM with 128-bytes instead of 256-bytes. Since we regard 256-bytes EEPROM as standard EEPROM with default value for MAX_NUM_PORTS. For those non-256-bytes EEPROM, we can redefine MAX_NUM_PORTS in board-specific file to override the default MAX_NUM_PORTS. This patch doesn't impact on previous existing boards. Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/common/sys_eeprom.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index d789364..9c18dd8 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -18,7 +18,11 @@
#endif
#ifdef CONFIG_SYS_I2C_EEPROM_NXID
+/* some boards with non-256-bytes EEPROM have special define */
+/* for MAX_NUM_PORTS in board-specific file */
+#ifndef MAX_NUM_PORTS
#define MAX_NUM_PORTS 23
+#endif
#define NXID_VERSION 1
#endif