mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
imx: ventana: hexdump invalid EEPROM data
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
This commit is contained in:
committed by
Stefano Babic
parent
a03462b1b9
commit
74389c1387
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <hexdump.h>
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <asm/bitops.h>
|
#include <asm/bitops.h>
|
||||||
@@ -46,6 +47,8 @@ read_eeprom(int bus, struct ventana_board_info *info)
|
|||||||
/* sanity checks */
|
/* sanity checks */
|
||||||
if (info->model[0] != 'G' || info->model[1] != 'W') {
|
if (info->model[0] != 'G' || info->model[1] != 'W') {
|
||||||
puts("EEPROM: Invalid Model in EEPROM\n");
|
puts("EEPROM: Invalid Model in EEPROM\n");
|
||||||
|
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf,
|
||||||
|
sizeof(*info));
|
||||||
return GW_UNKNOWN;
|
return GW_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,6 +58,8 @@ read_eeprom(int bus, struct ventana_board_info *info)
|
|||||||
if ((info->chksum[0] != chksum>>8) ||
|
if ((info->chksum[0] != chksum>>8) ||
|
||||||
(info->chksum[1] != (chksum&0xff))) {
|
(info->chksum[1] != (chksum&0xff))) {
|
||||||
puts("EEPROM: Failed EEPROM checksum\n");
|
puts("EEPROM: Failed EEPROM checksum\n");
|
||||||
|
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf,
|
||||||
|
sizeof(*info));
|
||||||
return GW_UNKNOWN;
|
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')
|
else if (info->model[4] == '0' && info->model[5] == '9')
|
||||||
type = GW5909;
|
type = GW5909;
|
||||||
break;
|
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;
|
return type;
|
||||||
}
|
}
|
||||||
|
@@ -85,5 +85,6 @@ CONFIG_USB_ETHER_ASIX=y
|
|||||||
CONFIG_USB_ETHER_SMSC95XX=y
|
CONFIG_USB_ETHER_SMSC95XX=y
|
||||||
CONFIG_VIDEO=y
|
CONFIG_VIDEO=y
|
||||||
# CONFIG_VIDEO_SW_CURSOR is not set
|
# CONFIG_VIDEO_SW_CURSOR is not set
|
||||||
|
CONFIG_HEXDUMP=y
|
||||||
CONFIG_OF_LIBFDT=y
|
CONFIG_OF_LIBFDT=y
|
||||||
CONFIG_FDT_FIXUP_PARTITIONS=y
|
CONFIG_FDT_FIXUP_PARTITIONS=y
|
||||||
|
@@ -89,5 +89,6 @@ CONFIG_USB_ETHER_ASIX=y
|
|||||||
CONFIG_USB_ETHER_SMSC95XX=y
|
CONFIG_USB_ETHER_SMSC95XX=y
|
||||||
CONFIG_VIDEO=y
|
CONFIG_VIDEO=y
|
||||||
# CONFIG_VIDEO_SW_CURSOR is not set
|
# CONFIG_VIDEO_SW_CURSOR is not set
|
||||||
|
CONFIG_HEXDUMP=y
|
||||||
CONFIG_OF_LIBFDT=y
|
CONFIG_OF_LIBFDT=y
|
||||||
CONFIG_FDT_FIXUP_PARTITIONS=y
|
CONFIG_FDT_FIXUP_PARTITIONS=y
|
||||||
|
@@ -88,5 +88,6 @@ CONFIG_USB_ETHER_ASIX=y
|
|||||||
CONFIG_USB_ETHER_SMSC95XX=y
|
CONFIG_USB_ETHER_SMSC95XX=y
|
||||||
CONFIG_VIDEO=y
|
CONFIG_VIDEO=y
|
||||||
# CONFIG_VIDEO_SW_CURSOR is not set
|
# CONFIG_VIDEO_SW_CURSOR is not set
|
||||||
|
CONFIG_HEXDUMP=y
|
||||||
CONFIG_OF_LIBFDT=y
|
CONFIG_OF_LIBFDT=y
|
||||||
CONFIG_FDT_FIXUP_PARTITIONS=y
|
CONFIG_FDT_FIXUP_PARTITIONS=y
|
||||||
|
Reference in New Issue
Block a user