From patchwork Thu Feb 21 16:48:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 1046286 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gateworks-com.20150623.gappssmtp.com header.i=@gateworks-com.20150623.gappssmtp.com header.b="pPAEzd71"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 4450mp2wByz9sBF for ; Fri, 22 Feb 2019 03:49:09 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 97E2BC220E1; Thu, 21 Feb 2019 16:49:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D1A3CC21E42; Thu, 21 Feb 2019 16:49:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 25DC1C21E42; Thu, 21 Feb 2019 16:49:00 +0000 (UTC) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by lists.denx.de (Postfix) with ESMTPS id 449EBC21C6A for ; Thu, 21 Feb 2019 16:48:59 +0000 (UTC) Received: by mail-pl1-f182.google.com with SMTP id 101so14446519pld.6 for ; Thu, 21 Feb 2019 08:48:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=7LK5oYG6SMbiZ3X3ijkT0oh7Myxm56aVM8ezEwtmLW0=; b=pPAEzd71/rCB277dEaQIBxlflElBgqmBsM1d3SRjBmmTO7oned4mvAkjcIdynMcdA/ 6kjnSjazst4X5my7mnjZEeugTcSYllv5zrl1ZFkrR3al0Fjm9t/8nq8vDtvBVlWnde3n uMLwRf7rF/qGJNmHgVU6fJfEJ3sq229gdoRwWMjkmrYUjJVJ1ipm/qBTPWRpTsqV6E0H BLGO3XrXXNoBFemYVCAxIJALVq2OPeT6nxQywWHSdJeZbaVf7U0PfP7hWCvjIkGgT9O0 LZ8r6NjQO3jiOk0GWam31jHy/hB8fDDcWu4Sn9Q9VIHs+HMKfsP83QqIWzPpqKgYsugl HBbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7LK5oYG6SMbiZ3X3ijkT0oh7Myxm56aVM8ezEwtmLW0=; b=sypv5pIKSBCFvz2Ws36s94ljBSX3Z5ZjsHg8RSz/uAA7W1rooO9zD2pIOXDXE5d8TJ UORUypezBGtyrpVJ5I1R1n8RlfJ8RNzOEL8LgvrE0iDgy5mvsPBOiX7IBj1eUvAtnSGn aIse+j5Q87l49ziHRgq5J29VdaK0b+QI4C3w9Ca/pHSEOAx6hZnYBHglVYQBkg18PR2a JSYAFnBNuK3mKvXEk46DhqzHSFQonh2dM/PV47uxjtkdS4WjgDXtqomreT/DaTC3GCaD L7oK8m4d/XylAIwKWsiOjZNHgHVELEt8pXjtnXfnRXdXF+S5ih3Dv5UZYdlZPtbVCdK2 J/lw== X-Gm-Message-State: AHQUAubV519eQI2BhkpANY0iQdZ/fyjLuafmdV4tCTvcdHmCnWzSln4r yydxg2jkD0XGOJw2BZMl3H5qvw== X-Google-Smtp-Source: AHgI3IbRliR7PD5azoW8Cxfe69MC+fQF9+VM77ffqeiaj5fS8qRrj/T+8XS25TRovNbM0Gqtwp7wAg== X-Received: by 2002:a17:902:2ba8:: with SMTP id l37mr43495338plb.243.1550767737709; Thu, 21 Feb 2019 08:48:57 -0800 (PST) Received: from tharvey.pdc.gateworks.com (68-189-91-139.static.snlo.ca.charter.com. [68.189.91.139]) by smtp.gmail.com with ESMTPSA id u28sm3919534pgn.32.2019.02.21.08.48.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 08:48:56 -0800 (PST) From: Tim Harvey To: Stefano Babic Date: Thu, 21 Feb 2019 08:48:48 -0800 Message-Id: <20190221164848.3992-1-tharvey@gateworks.com> X-Mailer: git-send-email 2.17.1 Cc: u-boot Subject: [U-Boot] [PATCH] imx: ventana: hexdump invalid EEPROM data X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Signed-off-by: Tim Harvey --- board/gateworks/gw_ventana/eeprom.c | 10 ++++++++++ configs/gwventana_emmc_defconfig | 1 + configs/gwventana_gw5904_defconfig | 1 + configs/gwventana_nand_defconfig | 1 + 4 files changed, 13 insertions(+) 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 #include +#include #include #include #include @@ -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; } diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig index f95957adab..07171c7009 100644 --- a/configs/gwventana_emmc_defconfig +++ b/configs/gwventana_emmc_defconfig @@ -85,5 +85,6 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_SMSC95XX=y CONFIG_VIDEO=y # CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_HEXDUMP=y CONFIG_OF_LIBFDT=y CONFIG_FDT_FIXUP_PARTITIONS=y diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig index 219d31a9a1..0ed2209e3b 100644 --- a/configs/gwventana_gw5904_defconfig +++ b/configs/gwventana_gw5904_defconfig @@ -89,5 +89,6 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_SMSC95XX=y CONFIG_VIDEO=y # CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_HEXDUMP=y CONFIG_OF_LIBFDT=y CONFIG_FDT_FIXUP_PARTITIONS=y diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig index 466a7752ad..57e4a999ab 100644 --- a/configs/gwventana_nand_defconfig +++ b/configs/gwventana_nand_defconfig @@ -88,5 +88,6 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_SMSC95XX=y CONFIG_VIDEO=y # CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_HEXDUMP=y CONFIG_OF_LIBFDT=y CONFIG_FDT_FIXUP_PARTITIONS=y