]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
board/freescale: Move CRC32 offset in NXID v1 data format
authorEbony Zhu <b45385@freescale.com>
Fri, 25 Apr 2014 23:38:44 +0000 (18:38 -0500)
committerYork Sun <yorksun@freescale.com>
Fri, 16 May 2014 21:24:05 +0000 (16:24 -0500)
According to AN3638, CRC of NXID v1 is at the end of the
256-byte I2C memory. The wrong CRC32 offset prevents Uboot
from reading system information from EEPROM. No NXID v0 is
being used on Freescale boards.

Signed-off-by: Ebony Zhu <b45385@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
board/freescale/common/sys_eeprom.c

index 33a5a5a8f5337bdc1315859897d4229bfd26be23..6144c533ef27af60d629103aa5f117369ed373b4 100644 (file)
@@ -21,7 +21,7 @@
 /* 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
+#define MAX_NUM_PORTS  16
 #endif
 #define NXID_VERSION   1
 #endif
@@ -58,8 +58,9 @@ static struct __attribute__ ((__packed__)) eeprom {
        u8 res_1[21];     /* 0x2b - 0x3f Reserved */
        u8 mac_count;     /* 0x40        Number of MAC addresses */
        u8 mac_flag;      /* 0x41        MAC table flags */
-       u8 mac[MAX_NUM_PORTS][6];     /* 0x42 - x MAC addresses */
-       u32 crc;          /* x+1         CRC32 checksum */
+       u8 mac[MAX_NUM_PORTS][6];     /* 0x42 - 0xa1 MAC addresses */
+       u8 res_2[90];     /* 0xa2 - 0xfb Reserved */    
+       u32 crc;          /* 0xfc - 0xff CRC32 checksum */
 #endif
 } e;