]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
powerpc/eeprom: update MAX_NUM_PORTS to adapt non-256-bytes EEPROM
authorShengzhou Liu <Shengzhou.Liu@freescale.com>
Fri, 13 Sep 2013 06:46:01 +0000 (14:46 +0800)
committerYork Sun <yorksun@freescale.com>
Wed, 16 Oct 2013 23:15:17 +0000 (16:15 -0700)
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>
board/freescale/common/sys_eeprom.c

index d7893644cd4816519e04d7fce8a69a52cba051e2..9c18dd824248a072a558197eb3426b6d5eae1e26 100644 (file)
 #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