From patchwork Mon Sep 30 07:33:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 1169238 X-Patchwork-Delegate: sr@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=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46hdtD606Nz9sDB for ; Mon, 30 Sep 2019 20:29:08 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 79FF9C21D4A; Mon, 30 Sep 2019 10:29:02 +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=KHOP_BIG_TO_CC 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 71570C21E3A; Mon, 30 Sep 2019 10:28:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C8A3EC21C51; Mon, 30 Sep 2019 07:33:58 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 6D8B7C21C2F for ; Mon, 30 Sep 2019 07:33:58 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46hZ061rsJz1rQBD for ; Mon, 30 Sep 2019 09:33:58 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46hZ061kxmz1qqkD for ; Mon, 30 Sep 2019 09:33:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id GzG_uGf07b7N for ; Mon, 30 Sep 2019 09:33:55 +0200 (CEST) X-Auth-Info: 4GKYjEf2YGOWM7bbXfYroFAE9nZoPea/T90pSY3VlQI= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA for ; Mon, 30 Sep 2019 09:33:55 +0200 (CEST) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id E4A9C18095E; Mon, 30 Sep 2019 09:33:45 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id C49261A00A0; Mon, 30 Sep 2019 09:33:45 +0200 (CEST) From: Heiko Schocher To: U-Boot Mailing List Date: Mon, 30 Sep 2019 09:33:43 +0200 Message-Id: <20190930073344.2055842-1-hs@denx.de> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 30 Sep 2019 10:28:45 +0000 Cc: Martyn Welch , Stefan Roese , Marek Vasut , Tien Fong Chee , Pascal Linder , Xiaoliang Yang , Chin-Liang See , Ian Ray , Andreas Geisreiter , Otavio Salvador , Andy Shevchenko , Ludwig Zenz , Markus Niebel , Olaf Mandel , =?utf-8?q?Antti_M=C3=A4entausta?= , Martyn Welch , Dinh Nguyen Subject: [U-Boot] [PATCH v2] watchdog: move WATCHDOG_TIMEOUT_MSECS to Kconfig 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" move WATCHDOG_TIMEOUT_MSECS to Kconfig and fix all board defconfigs. Signed-off-by: Heiko Schocher Reviewed-by: Stefan Roese Acked-by: Lukasz Majewski Acked-by: Martyn Welch --- Patchseries build fine on travis see: https://travis-ci.org/hsdenx/u-boot-test/builds/591305674 Based on mainline commit: d88eab4bcc: ("efi_loader: SetVariable() deleting variables") Changes in v2: - add Reviewed-by tag from Stefan - add Acked-by tag from Lukasz and Martin - rebased to d88eab4bcc: ("efi_loader: SetVariable() deleting variables") Sorry to Stefan, who had requested a rebase and I missed the EMail... arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 | 1 - configs/dh_imx6_defconfig | 1 + configs/display5_defconfig | 1 + configs/display5_factory_defconfig | 1 + configs/ge_bx50v3_defconfig | 1 + configs/kp_imx6q_tpc_defconfig | 1 + configs/m53menlo_defconfig | 1 + configs/mx53ppd_defconfig | 1 + configs/tqma6s_wru4_mmc_defconfig | 1 + configs/warp_defconfig | 1 + drivers/watchdog/Kconfig | 9 +++++++++ include/configs/dh_imx6.h | 1 - include/configs/display5.h | 1 - include/configs/ge_bx50v3.h | 2 -- include/configs/kp_imx6q_tpc.h | 1 - include/configs/m53menlo.h | 1 - include/configs/mx53ppd.h | 2 -- include/configs/socfpga_common.h | 1 - include/configs/socfpga_stratix10_socdk.h | 1 - include/configs/tqma6_wru4.h | 1 - include/configs/warp.h | 1 - scripts/config_whitelist.txt | 1 - 22 files changed, 18 insertions(+), 14 deletions(-) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 b/arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 index 9583bf743e..d7f7b9f111 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 +++ b/arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 @@ -16,6 +16,5 @@ You can enable it by setting CONFIG_IMX_WATCHDOG. Use following config to set watchdog timeout, if this config is not defined, the default timeout value is 128s which is the maximum. Set 10 seconds for example: - #define CONFIG_WATCHDOG_TIMEOUT_MSECS 10000 Set CONFIG_WATCHDOG_RESET_DISABLE to disable reset watchdog, so that the watchdog will not be fed in u-boot. diff --git a/configs/dh_imx6_defconfig b/configs/dh_imx6_defconfig index f459af07f8..db4753c5c7 100644 --- a/configs/dh_imx6_defconfig +++ b/configs/dh_imx6_defconfig @@ -85,4 +85,5 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_IMX_WATCHDOG=y diff --git a/configs/display5_defconfig b/configs/display5_defconfig index e48b6467e6..fdabd31c90 100644 --- a/configs/display5_defconfig +++ b/configs/display5_defconfig @@ -82,4 +82,5 @@ CONFIG_MII=y CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_MXC_SPI=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=15000 CONFIG_IMX_WATCHDOG=y diff --git a/configs/display5_factory_defconfig b/configs/display5_factory_defconfig index 5b79057074..d403ad9480 100644 --- a/configs/display5_factory_defconfig +++ b/configs/display5_factory_defconfig @@ -87,5 +87,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b67 CONFIG_USB_GADGET_PRODUCT_NUM=0x4000 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=15000 CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y diff --git a/configs/ge_bx50v3_defconfig b/configs/ge_bx50v3_defconfig index 735165916a..75fdbf7e72 100644 --- a/configs/ge_bx50v3_defconfig +++ b/configs/ge_bx50v3_defconfig @@ -61,5 +61,6 @@ CONFIG_DM_SPI=y CONFIG_MXC_SPI=y CONFIG_DM_VIDEO=y CONFIG_VIDEO_IPUV3=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=6000 CONFIG_IMX_WATCHDOG=y # CONFIG_EFI_LOADER is not set diff --git a/configs/kp_imx6q_tpc_defconfig b/configs/kp_imx6q_tpc_defconfig index 75dd9d7c7a..fdfb899903 100644 --- a/configs/kp_imx6q_tpc_defconfig +++ b/configs/kp_imx6q_tpc_defconfig @@ -41,5 +41,6 @@ CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_IMX_THERMAL=y CONFIG_USB=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y diff --git a/configs/m53menlo_defconfig b/configs/m53menlo_defconfig index 50047952a7..7e5bcf94b9 100644 --- a/configs/m53menlo_defconfig +++ b/configs/m53menlo_defconfig @@ -89,4 +89,5 @@ CONFIG_DM_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_IPUV3=y CONFIG_IMX_WATCHDOG=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=8000 CONFIG_FAT_WRITE=y diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig index cad798a416..7f293c8e9a 100644 --- a/configs/mx53ppd_defconfig +++ b/configs/mx53ppd_defconfig @@ -50,4 +50,5 @@ CONFIG_USB_EHCI_MX5=y CONFIG_VIDEO_IPUV3=y CONFIG_VIDEO=y # CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_WATCHDOG_TIMEOUT_MSECS=8000 CONFIG_IMX_WATCHDOG=y diff --git a/configs/tqma6s_wru4_mmc_defconfig b/configs/tqma6s_wru4_mmc_defconfig index 03e893044b..1dab5af413 100644 --- a/configs/tqma6s_wru4_mmc_defconfig +++ b/configs/tqma6s_wru4_mmc_defconfig @@ -66,5 +66,6 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y diff --git a/configs/warp_defconfig b/configs/warp_defconfig index 7a6ea6f8c6..7da64e6c6f 100644 --- a/configs/warp_defconfig +++ b/configs/warp_defconfig @@ -39,5 +39,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_WATCHDOG_TIMEOUT_MSECS=30000 CONFIG_IMX_WATCHDOG=y CONFIG_OF_LIBFDT=y diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index a66a9bcbe2..8c16d69d33 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -8,6 +8,15 @@ config WATCHDOG this option if you want to service enabled watchdog by U-Boot. Disable this option if you want U-Boot to start watchdog but never service it. +config WATCHDOG_TIMEOUT_MSECS + int "Watchdog timeout in msec" + default 128000 if ARCH_MX25 || ARCH_MX31 || ARCH_MX5 || ARCH_MX6 + default 128000 if ARCH_MX7 || ARCH_VF610 + default 30000 if ARCH_SOCFPGA + default 60000 + help + Watchdog timeout in msec + config HW_WATCHDOG bool diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h index c516e6ed4c..a854d0b531 100644 --- a/include/configs/dh_imx6.h +++ b/include/configs/dh_imx6.h @@ -88,7 +88,6 @@ #endif /* Watchdog */ -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 60000 /* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE diff --git a/include/configs/display5.h b/include/configs/display5.h index e503e4a0ce..182399a390 100644 --- a/include/configs/display5.h +++ b/include/configs/display5.h @@ -354,7 +354,6 @@ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) /* Watchdog */ -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 15000 /* ENV config */ #ifdef CONFIG_ENV_IS_IN_SPI_FLASH diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h index 31214a6aa7..6de5119d7f 100644 --- a/include/configs/ge_bx50v3.h +++ b/include/configs/ge_bx50v3.h @@ -28,8 +28,6 @@ #define CONFIG_REVISION_TAG #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 6000 - #define CONFIG_MXC_UART /* SATA Configs */ diff --git a/include/configs/kp_imx6q_tpc.h b/include/configs/kp_imx6q_tpc.h index 2435ebbc7f..c160ad5bf6 100644 --- a/include/configs/kp_imx6q_tpc.h +++ b/include/configs/kp_imx6q_tpc.h @@ -60,7 +60,6 @@ #endif /* Watchdog */ -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 60000 /* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h index 49f11ea4b8..113e84456d 100644 --- a/include/configs/m53menlo.h +++ b/include/configs/m53menlo.h @@ -153,7 +153,6 @@ #define CONFIG_FSL_IIM /* Watchdog */ -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000 /* * Boot Linux diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h index d5b54dfa15..59988efc9b 100644 --- a/include/configs/mx53ppd.h +++ b/include/configs/mx53ppd.h @@ -22,8 +22,6 @@ /* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024) -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000 - #define CONFIG_BOARD_LATE_INIT #define CONFIG_REVISION_TAG diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index b11fe021a7..94268ed7a3 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -108,7 +108,6 @@ #define CONFIG_DESIGNWARE_WATCHDOG #define CONFIG_DW_WDT_BASE SOCFPGA_L4WD0_ADDRESS #define CONFIG_DW_WDT_CLOCK_KHZ 25000 -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 #endif /* diff --git a/include/configs/socfpga_stratix10_socdk.h b/include/configs/socfpga_stratix10_socdk.h index 7b55dd14da..8e6ecf4bed 100644 --- a/include/configs/socfpga_stratix10_socdk.h +++ b/include/configs/socfpga_stratix10_socdk.h @@ -168,7 +168,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void); unsigned int cm_get_l4_sys_free_clk_hz(void); #define CONFIG_DW_WDT_CLOCK_KHZ (cm_get_l4_sys_free_clk_hz() / 1000) #endif -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 3000 #endif /* diff --git a/include/configs/tqma6_wru4.h b/include/configs/tqma6_wru4.h index 34f000f214..0af52e5565 100644 --- a/include/configs/tqma6_wru4.h +++ b/include/configs/tqma6_wru4.h @@ -17,7 +17,6 @@ #define CONSOLE_DEV "ttymxc3" /* Watchdog */ -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 60000 /* Config on-board RTC */ #define CONFIG_RTC_DS1337 diff --git a/include/configs/warp.h b/include/configs/warp.h index 5345f5314d..41fd6c759e 100644 --- a/include/configs/warp.h +++ b/include/configs/warp.h @@ -25,7 +25,6 @@ #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE /* Watchdog */ -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 /* 30s */ #define CONFIG_SYS_MEMTEST_START 0x80000000 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_256M) diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index b06a77ebd6..f1d7073a74 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -4347,7 +4347,6 @@ CONFIG_WATCHDOG_NOWAYOUT CONFIG_WATCHDOG_PRESC CONFIG_WATCHDOG_RC CONFIG_WATCHDOG_TIMEOUT -CONFIG_WATCHDOG_TIMEOUT_MSECS CONFIG_WD_PERIOD CONFIG_X600 CONFIG_X86EMU_DEBUG