
-----Original Message----- From: Timur Tabi [mailto:timur@tabi.org] Sent: Monday, August 12, 2013 7:51 AM To: Liu Shengzhou-B36685 Cc: U-Boot Mailing List; sun york-R58495 Subject: Re: [U-Boot] [PATCH] powerpc/eeprom: update MAX_NUM_PORTS to fix program failure
On Thu, Aug 8, 2013 at 5:14 AM, Shengzhou Liu Shengzhou.Liu@freescale.com wrote:
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.
NACK.
If the EEPROM is 128 bytes, then you have a non-conformant EEPROM.
What is a conformant EEPROM? The size of struct of EEPROM_NXID should be able to conform to real size of EEPROM, regardless it's 128 or 256 EEPROM. It's not reasonable to limit MAX_NUM_PORTS to 23, generally we don't need 23 MAC addresses to store in EEPROM. 23 is just suitable to 256 bytes EEPROM.
And using the #ifdef to determine this is definitely the wrong way.
Why? What's your way?