#include <common.h>
#include <errno.h>
+#include <hexdump.h>
#include <i2c.h>
#include <malloc.h>
#include <asm/bitops.h>
/* 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;
}
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;
}
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;
}