From patchwork Wed Nov 8 15:59:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martyn Welch X-Patchwork-Id: 835884 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=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yXB4y0qsWz9sNc for ; Thu, 9 Nov 2017 03:06:58 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id E0B33C21E28; Wed, 8 Nov 2017 16:02:49 +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=SPF_HELO_PASS, UNPARSEABLE_RELAY 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 2A907C21FF4; Wed, 8 Nov 2017 16:00:09 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 61317C21E28; Wed, 8 Nov 2017 16:00:03 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lists.denx.de (Postfix) with ESMTPS id 4C435C21E55 for ; Wed, 8 Nov 2017 16:00:02 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: martyn) with ESMTPSA id F3F1C26E9A4 From: Martyn Welch To: u-boot@lists.denx.de Date: Wed, 8 Nov 2017 15:59:44 +0000 Message-Id: <1510156790-26463-11-git-send-email-martyn.welch@collabora.co.uk> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1510156790-26463-1-git-send-email-martyn.welch@collabora.co.uk> References: <1510156790-26463-1-git-send-email-martyn.welch@collabora.co.uk> Cc: Ian Ray Subject: [U-Boot] [PATCH 10/16] board: ge: bx50v3: Enable hardware watchdog 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" Enable the hardware watchdog on bx50v3 to cause it to reset in the event the board hangs. Configure GPIO_9 pin as WDOG1_B so that a watchdog timeout results in a full system reset. The watchdog is used and reconfigured by systemd approximately 1.7 seconds into boot. Adding a few seconds for U-Boot and a few more seconds as a safety margin. Note that the PCIe controller is _not_ put back into a safe state prior to board reset. This is a problem if board reset is implemented as CPU reset. Signed-off-by: Ian Ray Signed-off-by: Martyn Welch --- board/ge/bx50v3/bx50v3.c | 1 + include/configs/ge_bx50v3.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c index 07b4298..48c26e0 100644 --- a/board/ge/bx50v3/bx50v3.c +++ b/board/ge/bx50v3/bx50v3.c @@ -659,6 +659,7 @@ static iomux_v3_cfg_t const misc_pads[] = { MX6_PAD_EIM_OE__GPIO2_IO25 | MUX_PAD_CTRL(NC_PAD_CTRL), MX6_PAD_EIM_BCLK__GPIO6_IO31 | MUX_PAD_CTRL(NC_PAD_CTRL), MX6_PAD_GPIO_1__GPIO1_IO01 | MUX_PAD_CTRL(NC_PAD_CTRL), + MX6_PAD_GPIO_9__WDOG1_B | MUX_PAD_CTRL(NC_PAD_CTRL), }; #define SUS_S3_OUT IMX_GPIO_NR(4, 11) #define WIFI_EN IMX_GPIO_NR(6, 14) diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h index 94e406c..162e915 100644 --- a/include/configs/ge_bx50v3.h +++ b/include/configs/ge_bx50v3.h @@ -44,6 +44,10 @@ #define CONFIG_REVISION_TAG #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) +#define CONFIG_HW_WATCHDOG +#define CONFIG_IMX_WATCHDOG +#define CONFIG_WATCHDOG_TIMEOUT_MSECS 6000 + #define CONFIG_LAST_STAGE_INIT #define CONFIG_MXC_GPIO