watchdog: tangier: Replace unused constant with a comment
Subsystems (2)
PATCH v3 1/2 watchdog: tangier: Replace unused constant with a comment
The default timeout value had been left in order to leave some traces about default setup of watchdog done by firmware.
For better understanding and compiler burden, replace it with a comment.
--- drivers/watchdog/tangier_wdt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/watchdog/tangier_wdt.c +6 -1
@@ -10,7 +10,12 @@#define WDT_PRETIMEOUT 15#define WDT_TIMEOUT_MIN (1 + WDT_PRETIMEOUT)#define WDT_TIMEOUT_MAX 170 -#define WDT_DEFAULT_TIMEOUT 90 + +/* +* Note, firmware chooses 90 seconds as a default timeout for watchdog on +* Intel Tangier SoC. It means that without handling it in the running code +* the reboot will happen. +*/ #ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS #define WATCHDOG_HEARTBEAT 60000
Signature · 1 line
2.20.1
PATCH v3 2/2 watchdog: tangier: Convert to use WDT class
Convert legacy driver to use watchdog class.
--- arch/x86/cpu/tangier/Kconfig | 1 - arch/x86/dts/edison.dts | 4 ++ configs/edison_defconfig | 2 + drivers/watchdog/Kconfig | 17 ++++---- drivers/watchdog/Makefile | 2 +- drivers/watchdog/tangier_wdt.c | 73 +++++++++++++++++++++------------- 6 files changed, 60 insertions(+), 39 deletions(-)
arch/x86/cpu/tangier/Kconfig +0 -1
@@ -10,7 +10,6 @@ config INTEL_TANGIER imply MMC_SDHCI imply MMC_SDHCI_SDMA imply MMC_SDHCI_TANGIER - imply TANGIER_WATCHDOG imply USB imply USB_DWC3
arch/x86/dts/edison.dts +4 -0
@@ -104,6 +104,10 @@ reg = <0xff009000 0x1000>; }; + watchdog: wdt at 0 { + compatible = "intel,tangier-wdt"; + }; + reset { compatible = "intel,reset-tangier"; u-boot,dm-pre-reloc;
configs/edison_defconfig +2 -0
@@ -39,5 +39,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x8087 CONFIG_USB_GADGET_PRODUCT_NUM=0x0a99 CONFIG_USB_GADGET_DOWNLOAD=y # CONFIG_USB_HOST_ETHER is not set +CONFIG_WDT=y +CONFIG_WDT_TANGIER=y CONFIG_FAT_WRITE=y CONFIG_SHA1=y
drivers/watchdog/Kconfig +8 -9
@@ -34,15 +34,6 @@ config OMAP_WATCHDOG help Say Y here to enable the OMAP3+ watchdog driver. -config TANGIER_WATCHDOG - bool "Intel Tangier watchdog" - depends on INTEL_MID - select HW_WATCHDOG - help - This enables support for watchdog controller available on - Intel Tangier SoC. If you're using a board with Intel Tangier - SoC, say Y here. - config ULP_WATCHDOG bool "i.MX7ULP watchdog" help
@@ -161,4 +152,12 @@ config WDT_MPC8xx help Select this to enable mpc8xx watchdog timer +config WDT_TANGIER + bool "Intel Tangier watchdog timer support" + depends on WDT && INTEL_MID + help + This enables support for watchdog controller available on + Intel Tangier SoC. If you're using a board with Intel Tangier + SoC, say Y here. + endmenu
drivers/watchdog/Makefile +1 -1
@@ -14,7 +14,6 @@ obj-$(CONFIG_S5P) += s5p_wdt.o obj-$(CONFIG_XILINX_TB_WATCHDOG) += xilinx_tb_wdt.o obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.o obj-$(CONFIG_DESIGNWARE_WATCHDOG) += designware_wdt.o -obj-$(CONFIG_TANGIER_WATCHDOG) += tangier_wdt.o obj-$(CONFIG_ULP_WATCHDOG) += ulp_wdog.o obj-$(CONFIG_WDT) += wdt-uclass.o obj-$(CONFIG_WDT_SANDBOX) += sandbox_wdt.o
@@ -28,3 +27,4 @@ obj-$(CONFIG_WDT_MPC8xx) += mpc8xx_wdt.o obj-$(CONFIG_WDT_MT7621) += mt7621_wdt.o obj-$(CONFIG_WDT_MTK) += mtk_wdt.o obj-$(CONFIG_WDT_SP805) += sp805_wdt.o +obj-$(CONFIG_WDT_TANGIER) += tangier_wdt.o
drivers/watchdog/tangier_wdt.c +45 -28
107 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH v3 2/2 watchdog: tangier: Convert to use WDT class
Quoted 5 lines · Andy Shevchenko
Convert legacy driver to use watchdog class.
Signed-off-by Andy Shevchenko <[email protected]>Reviewed-by Stefan Roese <[email protected]>
Quoted 9 lines
--- arch/x86/cpu/tangier/Kconfig | 1 - arch/x86/dts/edison.dts | 4 ++ configs/edison_defconfig | 2 + drivers/watchdog/Kconfig | 17 ++++---- drivers/watchdog/Makefile | 2 +- drivers/watchdog/tangier_wdt.c | 73 +++++++++++++++++++++------------- 6 files changed, 60 insertions(+), 39 deletions(-)
applied to u-boot-x86, thanks!
PATCH v3 1/2 watchdog: tangier: Replace unused constant with a comment
In reply to Andy ShevchenkoQuoted 4 lines · Andy Shevchenko
The default timeout value had been left in order to leave some traces about default setup of watchdog done by firmware.
Quoted 8 lines
For better understanding and compiler burden, replace it with a comment.
Suggested-by Stefan Roese <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>--- drivers/watchdog/tangier_wdt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
PATCH v3 1/2 watchdog: tangier: Replace unused constant with a comment
Quoted 9 lines · Bin Meng
Quoted 6 lines · Andy Shevchenko
The default timeout value had been left in order to leave some traces about default setup of watchdog done by firmware.
For better understanding and compiler burden, replace it with a comment.
Quoted 8 lines
Quoted 6 lines
Suggested-by Stefan Roese <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>--- drivers/watchdog/tangier_wdt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Reviewed-by Bin Meng <[email protected]>
applied to u-boot-x86, thanks!