summaryrefslogtreecommitdiff
path: root/board/freescale/common/sys_eeprom.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-07-07 20:54:12 +0200
committerWolfgang Denk <wd@denx.de>2009-07-07 20:54:12 +0200
commit73e1140b4929c92f7715bbc64ee8553815bb43aa (patch)
tree337677f8f62440561b93dca1053f6105c2c880c2 /board/freescale/common/sys_eeprom.c
parent98ab14e858bf60306d0aa3f0df5a7a5f88264aff (diff)
parentafb0b1315c048ce2b1f35f0183b8b118ad0c14e1 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Diffstat (limited to 'board/freescale/common/sys_eeprom.c')
-rw-r--r--board/freescale/common/sys_eeprom.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index ae5304a9b45..3e1e3321695 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -78,12 +78,14 @@ static int has_been_read = 0;
#ifdef CONFIG_SYS_I2C_EEPROM_NXID
/* Is this a valid NXID EEPROM? */
-#define is_valid (*((u32 *)e.id) == (('N' << 24) | ('X' << 16) | ('I' << 8) | 'D'))
+#define is_valid ((e.id[0] == 'N') || (e.id[1] == 'X') || \
+ (e.id[2] == 'I') || (e.id[3] == 'D'))
#endif
#ifdef CONFIG_SYS_I2C_EEPROM_CCID
/* Is this a valid CCID EEPROM? */
-#define is_valid (*((u32 *)e.id) == (('C' << 24) | ('C' << 16) | ('I' << 8) | 'D'))
+#define is_valid ((e.id[0] == 'C') || (e.id[1] == 'C') || \
+ (e.id[2] == 'I') || (e.id[3] == 'D'))
#endif
/**