summaryrefslogtreecommitdiff
path: root/board/gateworks
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2019-02-21 19:48:48 +0300
committerStefano Babic <sbabic@denx.de>2019-03-13 11:14:35 +0300
commit74389c13874f5fbc717beb995bfdaba87613a31c (patch)
treefc8e44a9a3fd58d9b3b11fb861671f6a710527cc /board/gateworks
parenta03462b1b9e84200ecf5bfe6ab0dfc9de4df4c39 (diff)
downloadu-boot-74389c13874f5fbc717beb995bfdaba87613a31c.tar.xz
imx: ventana: hexdump invalid EEPROM data
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'board/gateworks')
-rw-r--r--board/gateworks/gw_ventana/eeprom.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/board/gateworks/gw_ventana/eeprom.c b/board/gateworks/gw_ventana/eeprom.c
index ee227320c0..5e9cf11575 100644
--- a/board/gateworks/gw_ventana/eeprom.c
+++ b/board/gateworks/gw_ventana/eeprom.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <errno.h>
+#include <hexdump.h>
#include <i2c.h>
#include <malloc.h>
#include <asm/bitops.h>
@@ -46,6 +47,8 @@ read_eeprom(int bus, struct ventana_board_info *info)
/* sanity checks */
if (info->model[0] != 'G' || info->model[1] != 'W') {
puts("EEPROM: Invalid Model in EEPROM\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf,
+ sizeof(*info));
return GW_UNKNOWN;
}
@@ -55,6 +58,8 @@ read_eeprom(int bus, struct ventana_board_info *info)
if ((info->chksum[0] != chksum>>8) ||
(info->chksum[1] != (chksum&0xff))) {
puts("EEPROM: Failed EEPROM checksum\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf,
+ sizeof(*info));
return GW_UNKNOWN;
}
@@ -116,6 +121,11 @@ read_eeprom(int bus, struct ventana_board_info *info)
else if (info->model[4] == '0' && info->model[5] == '9')
type = GW5909;
break;
+ default:
+ printf("EEPROM: Unknown model in EEPROM: %s\n", info->model);
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf,
+ sizeof(*info));
+ break;
}
return type;
}