wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig
Subsystems (7)
PATCH 1/4 wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig
Currently this is set from headers. No board has this set by default, so we don't need to modify any configs.
--- drivers/watchdog/Kconfig | 7 +++++++ include/configs/socfpga_common.h | 1 - include/configs/socfpga_soc64_common.h | 1 - 3 files changed, 7 insertions(+), 2 deletions(-)
drivers/watchdog/Kconfig +7 -0
@@ -176,6 +176,13 @@ config WDT_TANGIER Intel Tangier SoC. If you're using a board with Intel Tangier SoC, say Y here. +config DESIGNWARE_WATCHDOG + bool "Synopsys Designware watchdog timer support" + select HW_WATCHDOG if !WDT + help + Enable support for the Synopsys Designware watchdog timer, which can + be found on Altera socfpgas, and on Kendryte CPUs. + config SPL_WDT bool "Enable driver model for watchdog timer drivers in SPL" depends on SPL_DM
include/configs/socfpga_common.h +0 -1
@@ -105,7 +105,6 @@* L4 Watchdog */ #ifdef CONFIG_HW_WATCHDOG -#define CONFIG_DESIGNWARE_WATCHDOG #define CONFIG_DW_WDT_BASE SOCFPGA_L4WD0_ADDRESS#define CONFIG_DW_WDT_CLOCK_KHZ 25000#endif
include/configs/socfpga_soc64_common.h +0 -1
@@ -152,7 +152,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);*/ #ifdef CONFIG_SPL_BUILD #define CONFIG_HW_WATCHDOG -#define CONFIG_DESIGNWARE_WATCHDOG #define CONFIG_DW_WDT_BASE SOCFPGA_L4WD0_ADDRESS#ifdef CONFIG_TARGET_SOCFPGA_STRATIX10 #ifndef __ASSEMBLY__
Signature · 1 line
2.25.0
PATCH 2/4 arm: Move asm/utils.h to log2.h
This header is needed outside of the arm architecture by the designware wdt driver.
--- arch/arm/cpu/armv7/cache_v7.c | 2 +- arch/arm/mach-davinci/spl.c | 2 +- arch/arm/mach-omap2/clocks-common.c | 2 +- arch/arm/mach-omap2/emif-common.c | 2 +- arch/arm/mach-omap2/omap4/emif.c | 2 +- arch/arm/mach-omap2/omap5/dra7xx_iodelay.c | 2 +- arch/arm/mach-omap2/omap5/emif.c | 2 +- arch/arm/mach-omap2/omap5/hwinit.c | 2 +- arch/arm/mach-socfpga/spl_a10.c | 2 +- arch/arm/mach-socfpga/spl_agilex.c | 2 +- arch/arm/mach-socfpga/spl_gen5.c | 2 +- arch/arm/mach-socfpga/spl_s10.c | 2 +- drivers/watchdog/designware_wdt.c | 4 ++-- arch/arm/include/asm/utils.h => include/log2.h | 4 ++-- 14 files changed, 16 insertions(+), 16 deletions(-) rename arch/arm/include/asm/utils.h => include/log2.h (93%)
arch/arm/cpu/armv7/cache_v7.c +1 -1
@@ -8,7 +8,7 @@#include <linux/types.h> #include <common.h> #include <asm/armv7.h> -#include <asm/utils.h> +#include <log2.h> #define ARMV7_DCACHE_INVAL_RANGE 1#define ARMV7_DCACHE_CLEAN_INVAL_RANGE 2
arch/arm/mach-davinci/spl.c +1 -1
@@ -7,7 +7,7 @@#include <config.h> #include <spl.h> #include <asm/u-boot.h> -#include <asm/utils.h> +#include <log2.h> #include <nand.h> #include <asm/arch/dm365_lowlevel.h> #include <ns16550.h>
arch/arm/mach-omap2/clocks-common.c +1 -1
@@ -18,7 +18,7 @@#include <asm/gpio.h> #include <asm/arch/clock.h> #include <asm/arch/sys_proto.h> -#include <asm/utils.h> +#include <log2.h> #include <asm/omap_gpio.h> #include <asm/emif.h>
arch/arm/mach-omap2/emif-common.c +1 -1
@@ -14,7 +14,7 @@#include <asm/arch/sys_proto.h> #include <asm/omap_common.h> #include <asm/omap_sec_common.h> -#include <asm/utils.h> +#include <log2.h> #include <linux/compiler.h> #include <asm/ti-common/ti-edma3.h>
arch/arm/mach-omap2/omap4/emif.c +1 -1
@@ -11,7 +11,7 @@#include <common.h> #include <asm/emif.h> #include <asm/arch/sys_proto.h> -#include <asm/utils.h> +#include <log2.h> #ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS u32 *const T_num = (u32 *)OMAP_SRAM_SCRATCH_EMIF_T_NUM ;
arch/arm/mach-omap2/omap5/dra7xx_iodelay.c +1 -1
@@ -7,7 +7,7 @@*/ #include <common.h> -#include <asm/utils.h> +#include <log2.h> #include <asm/arch/dra7xx_iodelay.h> #include <asm/arch/omap.h> #include <asm/arch/sys_proto.h>
arch/arm/mach-omap2/omap5/emif.c +1 -1
@@ -11,7 +11,7 @@#include <common.h> #include <asm/emif.h> #include <asm/arch/sys_proto.h> -#include <asm/utils.h> +#include <log2.h> #ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS #define print_timing_reg (reg) debug(#reg" - 0x%08x\n", (reg))
arch/arm/mach-omap2/omap5/hwinit.c +1 -1
@@ -18,7 +18,7 @@#include <asm/arch/sys_proto.h> #include <asm/arch/clock.h> #include <linux/sizes.h> -#include <asm/utils.h> +#include <log2.h> #include <asm/arch/gpio.h> #include <asm/emif.h> #include <asm/omap_common.h>
arch/arm/mach-socfpga/spl_a10.c +1 -1
@@ -8,7 +8,7 @@#include <asm/io.h> #include <asm/pl310.h> #include <asm/u-boot.h> -#include <asm/utils.h> +#include <log2.h> #include <image.h> #include <asm/arch/reset_manager.h> #include <spl.h>
arch/arm/mach-socfpga/spl_agilex.c +1 -1
@@ -6,7 +6,7 @@#include <asm/io.h> #include <asm/u-boot.h> -#include <asm/utils.h> +#include <log2.h> #include <common.h> #include <image.h> #include <spl.h>
arch/arm/mach-socfpga/spl_gen5.c +1 -1
@@ -6,7 +6,7 @@#include <common.h> #include <asm/io.h> #include <asm/u-boot.h> -#include <asm/utils.h> +#include <log2.h> #include <image.h> #include <asm/arch/reset_manager.h> #include <spl.h>
arch/arm/mach-socfpga/spl_s10.c +1 -1
@@ -6,7 +6,7 @@#include <asm/io.h> #include <asm/u-boot.h> -#include <asm/utils.h> +#include <log2.h> #include <common.h> #include <debug_uart.h> #include <image.h>
drivers/watchdog/designware_wdt.c +2 -2
@@ -4,9 +4,9 @@*/ #include <common.h> -#include <watchdog.h> #include <asm/io.h> -#include <asm/utils.h> +#include <log2.h> +#include <watchdog.h> #define DW_WDT_CR 0x00#define DW_WDT_TORR 0x04
include/log2.h renamed from arch/arm/include/asm/utils.h +2 -2
@@ -4,8 +4,8 @@* Texas Instruments, <www.ti.com> * Aneesh V <[email protected]> */ -#ifndef _UTILS_H_ -#define _UTILS_H_ +#ifndef _LOG2_H_ +#define _LOG2_H_static inline s32 log_2_n_round_up (u32 n) {
Signature · 1 line
2.25.0
PATCH 3/4 wdt: Remove dependencies on CONFIG_DW_WDT_* from Designware WDT
In reply to Sean AndersonCurrently, the designware watchdog driver depends in several places on the values of CONFIG_DW_WDT_ defines. This patch moves these uses to just the functions hw_watchdog_*.
--- drivers/watchdog/designware_wdt.c | 65 ++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 23 deletions(-)
drivers/watchdog/designware_wdt.c +42 -23
@@ -17,57 +17,76 @@#define DW_WDT_CR_RMOD_VAL 0x00#define DW_WDT_CRR_RESTART_VAL 0x76 +struct designware_wdt_priv { +void __iomem *base; +ulong clock_khz; +}; +/* * Set the watchdog time interval. * Counter is 32 bit. */ -static int designware_wdt_settimeout (unsigned int timeout) +static int designware_wdt_settimeout (struct designware_wdt_priv *priv, +u64 timeout) {signed int i;/* calculate the timeout range value */ - i = (log_2_n_round_up (timeout *CONFIG_DW_WDT_CLOCK_KHZ )) -16 ; + i =log_2_n_round_up (timeout * priv->clock_khz) -16 ;if (i >15 ) i =15 ;if (i <0 ) i =0 ; -writel ((i | (i <<4 )), (CONFIG_DW_WDT_BASE +DW_WDT_TORR )); +writel (i | (i <<4 ), priv->base +DW_WDT_TORR );return 0 ; } -static void designware_wdt_enable (void ) +static void designware_wdt_enable (struct designware_wdt_priv *priv) { -writel (((DW_WDT_CR_RMOD_VAL <<DW_WDT_CR_RMOD_OFFSET ) | - (0x1 <<DW_WDT_CR_EN_OFFSET )), - (CONFIG_DW_WDT_BASE +DW_WDT_CR )); +writel ((DW_WDT_CR_RMOD_VAL <<DW_WDT_CR_RMOD_OFFSET ) | + (0x1 <<DW_WDT_CR_EN_OFFSET ), priv->base +DW_WDT_CR ); } -static unsigned int designware_wdt_is_enabled (void ) +static unsigned int designware_wdt_is_enabled (struct designware_wdt_priv *priv) {unsigned long val; - val =readl ((CONFIG_DW_WDT_BASE +DW_WDT_CR )); -return val &0x1 ; + val =readl (priv->base +DW_WDT_CR ); +return val &1 ; } -#if defined(CONFIG_HW_WATCHDOG ) +static void designware_wdt_reset (struct designware_wdt_priv *priv) +{ +if (designware_wdt_is_enabled (priv)) +writel (DW_WDT_CRR_RESTART_VAL , priv->base +DW_WDT_CRR ); +} + +static void designware_wdt_init (struct designware_wdt_priv *priv,u64 timeout) +{ +/* reset to disable the watchdog */ +designware_wdt_reset (priv); +/* set timer in miliseconds */ +designware_wdt_settimeout (priv, timeout); +designware_wdt_enable (priv); +designware_wdt_reset (priv); +} + +#ifdef CONFIG_HW_WATCHDOG +static struct designware_wdt_priv wdt_priv = { + .base =CONFIG_DW_WDT_BASE , +}; +void hw_watchdog_reset (void ) { -if (designware_wdt_is_enabled ()) -/* restart the watchdog counter */ -writel (DW_WDT_CRR_RESTART_VAL , - (CONFIG_DW_WDT_BASE +DW_WDT_CRR )); +/* XXX: may contain a function call; must be done at runtime */ + wdt_priv.clock_khz =CONFIG_DW_WDT_CLOCK_KHZ ; +designware_wdt_reset (&wdt_priv); }void hw_watchdog_init (void ) { -/* reset to disable the watchdog */ -hw_watchdog_reset (); -/* set timer in miliseconds */ -designware_wdt_settimeout (CONFIG_WATCHDOG_TIMEOUT_MSECS ); -/* enable the watchdog */ -designware_wdt_enable (); -/* reset the watchdog */ -hw_watchdog_reset (); +/* XXX: see above */ + wdt_priv.clock_khz =CONFIG_DW_WDT_CLOCK_KHZ ; +designware_wdt_init (&wdt_priv,CONFIG_WATCHDOG_TIMEOUT_MSECS ); }#endif
Signature · 1 line
2.25.0
PATCH 4/4 wdt: Add DM support for Designware WDT
In reply to Sean AndersonThe binding used is the same as Linux's.
--- doc/device-tree-bindings/watchdog/dw_wdt.txt | 24 +++++++ drivers/watchdog/designware_wdt.c | 67 ++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 doc/device-tree-bindings/watchdog/dw_wdt.txt
doc/device-tree-bindings/watchdog/dw_wdt.txt new file +24 -0
@@ -0,0 +1,24 @@ +Synopsys Designware Watchdog Timer + +Required Properties: + +- compatible : Should contain "snps,dw-wdt" +- reg : Base address and size of the watchdog timer registers. +- clocks : phandle + clock-specifier for the clock that drives the + watchdog timer. + +Optional Properties: + +- interrupts : The interrupt used for the watchdog timeout warning. +- resets : phandle pointing to the system reset controller with + line index for the watchdog. + +Example: + + watchdog0: wd at ffd02000 { + compatible = "snps,dw-wdt"; + reg = <0xffd02000 0x1000>; + interrupts = <0 171 4>; + clocks = <&per_base_clk>; + resets = <&rst WDT0_RESET>; + };
drivers/watchdog/designware_wdt.c +67 -0
78 lines not on this page · raw message
Signature · 1 line
2.25.0
PATCH 1/4 wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig
In reply to Sean AndersonQuoted 1 line · Sean Anderson
Currently this is set from headers. No board has this set by default
Please check where socfpga_common.h and socfpga_soc64_common.h are included. This should then make it clear that this statement in not true.
, so we
Quoted 1 line
don't need to modify any configs.
The patch is wrong, see above. Also, it's missing a SoB line.
PATCH 1/4 wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig
Quoted 8 lines · Marek Vasut
Quoted 1 line · Sean Anderson
Currently this is set from headers. No board has this set by default
Please check where
socfpga_common.handsocfpga_soc64_common.hare included. This should then make it clear that this statement in not true., so we
Quoted 1 line
don't need to modify any configs.
CONFIG_DESIGNWARE_WATCHDOG is only defined if CONFIG_HW_WATCHDOG is defined, and this is never defined in headers (or in the defconfigs).
Quoted 1 line
The patch is wrong, see above. Also, it's missing a SoB line.
Ah, I just noticed that, thanks for pointing that out.
PATCH 1/4 wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig
In reply to Sean AndersonQuoted 7 lines · Sean Anderson
Currently this is set from headers. No board has this set by default, so we don't need to modify any configs.
--- drivers/watchdog/Kconfig | 7 +++++++ include/configs/socfpga_common.h | 1 - include/configs/socfpga_soc64_common.h | 1 - 3 files changed, 7 insertions(+), 2 deletions(-)
PATCH 2/4 arm: Move asm/utils.h to log2.h
In reply to Sean AndersonQuoted 11 lines · Sean Anderson
This header is needed outside of the arm architecture by the designware wdt driver.
--- arch/arm/cpu/armv7/cache_v7.c | 2 +- arch/arm/mach-davinci/spl.c | 2 +- arch/arm/mach-omap2/clocks-common.c | 2 +- arch/arm/mach-omap2/emif-common.c | 2 +- arch/arm/mach-omap2/omap4/emif.c | 2 +- arch/arm/mach-omap2/omap5/dra7xx_iodelay.c | 2 +- arch/arm/mach-omap2/omap5/emif.c | 2 +- arch/arm/mach-omap2/omap5/hwinit.c | 2 +-
Quoted 8 lines
arch/arm/mach-socfpga/spl_a10.c | 2 +- arch/arm/mach-socfpga/spl_agilex.c | 2 +- arch/arm/mach-socfpga/spl_gen5.c | 2 +- arch/arm/mach-socfpga/spl_s10.c | 2 +- drivers/watchdog/designware_wdt.c | 4 ++-- arch/arm/include/asm/utils.h => include/log2.h | 4 ++-- 14 files changed, 16 insertions(+), 16 deletions(-) rename arch/arm/include/asm/utils.h => include/log2.h (93%)
PATCH 3/4 wdt: Remove dependencies on CONFIG_DW_WDT_* from Designware WDT
In reply to Sean AndersonQuoted 6 lines · Sean Anderson
Currently, the designware watchdog driver depends in several places on the values of
CONFIG_DW_WDT_defines. This patch moves these uses to just the functions hw_watchdog_*.--- drivers/watchdog/designware_wdt.c | 65 ++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 23 deletions(-)
PATCH 4/4 wdt: Add DM support for Designware WDT
In reply to Sean AndersonQuoted 6 lines · Sean Anderson
The binding used is the same as Linux's.
--- doc/device-tree-bindings/watchdog/dw_wdt.txt | 24 +++++++ drivers/watchdog/designware_wdt.c | 67 ++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 doc/device-tree-bindings/watchdog/dw_wdt.txt
PATCH 1/4 wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig
In reply to Sean AndersonQuoted 4 lines · Sean Anderson
Quoted 3 lines · Marek Vasut
Quoted 1 line · Sean Anderson
Currently this is set from headers. No board has this set by default
Quoted 8 lines
Quoted 5 lines
Please check where
socfpga_common.handsocfpga_soc64_common.hare included. This should then make it clear that this statement in not true., so we
Quoted 1 line
don't need to modify any configs.
CONFIG_DESIGNWARE_WATCHDOGis only defined ifCONFIG_HW_WATCHDOGis defined, and this is never defined in headers (or in the defconfigs).
This is what I see in socfpga_soc64_common.h on u-boot/master:
153 #ifdef CONFIG_SPL_BUILD
154 #define CONFIG_HW_WATCHDOG
Quoted 3 lines
Quoted 1 line
The patch is wrong, see above. Also, it's missing a SoB line.
Ah, I just noticed that, thanks for pointing that out.
Note that I updated u-boot-socfpga/master and sent a PR just now (thanks for reminding me of that), it contains the DW WDT patches that were posted to the ML some time ago. You want to rebase the series on top of that.
PATCH 1/4 wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig
Quoted 7 lines · Marek Vasut
Quoted 2 lines · Sean Anderson
CONFIG_DESIGNWARE_WATCHDOGis only defined ifCONFIG_HW_WATCHDOGis defined, and this is never defined in headers (or in the defconfigs).This is what I see in
socfpga_soc64_common.hon u-boot/master:
153 #ifdefCONFIG_SPL_BUILD
154 #defineCONFIG_HW_WATCHDOG
Huh, there it is. I guess I expected the usage to be the same as socfpga_common.h. Would it be best to add DESIGNWARE_WATCHDOG to the appropriate Kconfigs, defconfigs, or leave it in the header?
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
The patch is wrong, see above. Also, it's missing a SoB line.
Ah, I just noticed that, thanks for pointing that out.
Note that I updated u-boot-socfpga/master and sent a PR just now (thanks for reminding me of that), it contains the DW WDT patches that were posted to the ML some time ago. You want to rebase the series on top of that.
Ok, I will do that for v2.
--Sean
PATCH 1/4 wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig
Quoted 5 lines · Sean Anderson
Quoted 4 lines · Marek Vasut
Quoted 2 lines · Sean Anderson
CONFIG_DESIGNWARE_WATCHDOGis only defined ifCONFIG_HW_WATCHDOGis defined, and this is never defined in headers (or in the defconfigs).
Quoted 7 lines
Quoted 3 lines
This is what I see in
socfpga_soc64_common.hon u-boot/master:
153 #ifdefCONFIG_SPL_BUILD
154 #defineCONFIG_HW_WATCHDOGHuh, there it is. I guess I expected the usage to be the same as
socfpga_common.h. Would it be best to addDESIGNWARE_WATCHDOGto the appropriate Kconfigs, defconfigs, or leave it in the header?
I also had to look around, because I knew it was somewhere and the WDT should've generally been enabled on socfpga (at least the 32bit ones).
Kconfig is indeed the way to go. For bulk enabling config options, it is better to put them as "select" entry in arch/arm/Kconfig or arch/arm/mach-foo/Kconfig for the entire platform, so all the boards pick the option up without any changes to zillion defconfigs.
Quoted 10 lines
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
The patch is wrong, see above. Also, it's missing a SoB line.
Ah, I just noticed that, thanks for pointing that out.
Note that I updated u-boot-socfpga/master and sent a PR just now (thanks for reminding me of that), it contains the DW WDT patches that were posted to the ML some time ago. You want to rebase the series on top of that.
Ok, I will do that for v2.
Thanks.
btw what's the motivation for this series, are you hitting some issues with the WDT on SoCFPGA ?
PATCH 1/4 wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig
Quoted 2 lines
btw what's the motivation for this series, are you hitting some issues with the WDT on SoCFPGA ?
This watchdog appears on the Kendryte K210 CPU, which I am adding support for. The rest of the board uses devicetree to configure drivers, so I wanted to add support for this watchdog as well.
PATCH 2/4 arm: Move asm/utils.h to log2.h
In reply to Sean AndersonQuoted 12 lines · Sean Anderson
This header is needed outside of the arm architecture by the designware wdt driver.
--- arch/arm/cpu/armv7/cache_v7.c | 2 +- arch/arm/mach-davinci/spl.c | 2 +- arch/arm/mach-omap2/clocks-common.c | 2 +- arch/arm/mach-omap2/emif-common.c | 2 +- arch/arm/mach-omap2/omap4/emif.c | 2 +- arch/arm/mach-omap2/omap5/dra7xx_iodelay.c | 2 +- arch/arm/mach-omap2/omap5/emif.c | 2 +- arch/arm/mach-omap2/omap5/hwinit.c | 2 +-
Quoted 8 lines
arch/arm/mach-socfpga/spl_a10.c | 2 +- arch/arm/mach-socfpga/spl_agilex.c | 2 +- arch/arm/mach-socfpga/spl_gen5.c | 2 +- arch/arm/mach-socfpga/spl_s10.c | 2 +- drivers/watchdog/designware_wdt.c | 4 ++-- arch/arm/include/asm/utils.h => include/log2.h | 4 ++-- 14 files changed, 16 insertions(+), 16 deletions(-) rename arch/arm/include/asm/utils.h => include/log2.h (93%)
PATCH 4/4 wdt: Add DM support for Designware WDT
In reply to Sean AndersonHi Sean,
Quoted 10 lines · Sean Anderson
Quoted 6 lines · Sean Anderson
The binding used is the same as Linux's.
--- doc/device-tree-bindings/watchdog/dw_wdt.txt | 24 +++++++ drivers/watchdog/designware_wdt.c | 67 ++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 doc/device-tree-bindings/watchdog/dw_wdt.txtSigned-off-by Sean Anderson <[email protected]>
Are you adding this to the Makefile somewhere?
Regards,
Simon
PATCH 4/4 wdt: Add DM support for Designware WDT
Quoted 12 lines · Simon Glass
Hi Sean,
Quoted 9 lines · Sean Anderson
Quoted 6 lines · Sean Anderson
The binding used is the same as Linux's.
--- doc/device-tree-bindings/watchdog/dw_wdt.txt | 24 +++++++ drivers/watchdog/designware_wdt.c | 67 ++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 doc/device-tree-bindings/watchdog/dw_wdt.txt
Quoted 3 lines
Quoted 1 line
Signed-off-by Sean Anderson <[email protected]>Are you adding this to the
Makefilesomewhere?
I'm not sure what you mean. This is optionally used in [1], but I didn't want to add an explicit dependency. However, this appears to be a bit of a duplicate effort in light of [2].
[1] https://patchwork.ozlabs.org/project/uboot/list/?series=156389
[2] https://patchwork.ozlabs.org/patch/1232414/
--Sean
PATCH 4/4 wdt: Add DM support for Designware WDT
Quoted 14 lines · Sean Anderson
Quoted 12 lines · Simon Glass
Hi Sean,
Quoted 9 lines · Sean Anderson
Quoted 6 lines · Sean Anderson
The binding used is the same as Linux's.
--- doc/device-tree-bindings/watchdog/dw_wdt.txt | 24 +++++++ drivers/watchdog/designware_wdt.c | 67 ++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 doc/device-tree-bindings/watchdog/dw_wdt.txt
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Sean Anderson <[email protected]>Are you adding this to the
Makefilesomewhere?I'm not sure what you mean. This is optionally used in [1], but I didn't want to add an explicit dependency. However, this appears to be a bit of a duplicate effort in light of [2].
OK, thanks.
Quoted 5 lines
[1] https://patchwork.ozlabs.org/project/uboot/list/?series=156389
[2] https://patchwork.ozlabs.org/patch/1232414/--Sean
PATCH 2/4 arm: Move asm/utils.h to log2.h
In reply to Simon GlassQuoted 22 lines · Simon Glass
Quoted 12 lines · Sean Anderson
This header is needed outside of the arm architecture by the designware wdt driver.
--- arch/arm/cpu/armv7/cache_v7.c | 2 +- arch/arm/mach-davinci/spl.c | 2 +- arch/arm/mach-omap2/clocks-common.c | 2 +- arch/arm/mach-omap2/emif-common.c | 2 +- arch/arm/mach-omap2/omap4/emif.c | 2 +- arch/arm/mach-omap2/omap5/dra7xx_iodelay.c | 2 +- arch/arm/mach-omap2/omap5/emif.c | 2 +- arch/arm/mach-omap2/omap5/hwinit.c | 2 +-Quoted 8 lines
arch/arm/mach-socfpga/spl_a10.c | 2 +- arch/arm/mach-socfpga/spl_agilex.c | 2 +- arch/arm/mach-socfpga/spl_gen5.c | 2 +- arch/arm/mach-socfpga/spl_s10.c | 2 +- drivers/watchdog/designware_wdt.c | 4 ++-- arch/arm/include/asm/utils.h => include/log2.h | 4 ++-- 14 files changed, 16 insertions(+), 16 deletions(-) rename arch/arm/include/asm/utils.h => include/log2.h (93%)
Quoted 1 line
Reviewed-by Simon Glass <[email protected]>
How could this be reviewed if it's missing basic things, like a SoB line ?
PATCH 1/4 wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig
In reply to Sean AndersonQuoted 7 lines · Sean Anderson
Quoted 2 lines
btw what's the motivation for this series, are you hitting some issues with the WDT on SoCFPGA ?
This watchdog appears on the Kendryte K210 CPU, which I am adding support for. The rest of the board uses devicetree to configure drivers, so I wanted to add support for this watchdog as well.
You should be able to use what's in u-boot-socfpga/master then. Please give it a try.
PATCH 2/4 arm: Move asm/utils.h to log2.h
In reply to Marek VasutHi Marek,
Quoted 24 lines · Marek Vasut
Quoted 22 lines · Simon Glass
Quoted 20 lines · Sean Anderson
This header is needed outside of the arm architecture by the designware wdt driver.
--- arch/arm/cpu/armv7/cache_v7.c | 2 +- arch/arm/mach-davinci/spl.c | 2 +- arch/arm/mach-omap2/clocks-common.c | 2 +- arch/arm/mach-omap2/emif-common.c | 2 +- arch/arm/mach-omap2/omap4/emif.c | 2 +- arch/arm/mach-omap2/omap5/dra7xx_iodelay.c | 2 +- arch/arm/mach-omap2/omap5/emif.c | 2 +- arch/arm/mach-omap2/omap5/hwinit.c | 2 +- arch/arm/mach-socfpga/spl_a10.c | 2 +- arch/arm/mach-socfpga/spl_agilex.c | 2 +- arch/arm/mach-socfpga/spl_gen5.c | 2 +- arch/arm/mach-socfpga/spl_s10.c | 2 +- drivers/watchdog/designware_wdt.c | 4 ++-- arch/arm/include/asm/utils.h => include/log2.h | 4 ++-- 14 files changed, 16 insertions(+), 16 deletions(-) rename arch/arm/include/asm/utils.h => include/log2.h (93%)
Quoted 3 lines
Quoted 1 line
Reviewed-by Simon Glass <[email protected]>How could this be reviewed if it's missing basic things, like a SoB line ?
I saw you requested that on another patch. Apart from that it looks OK to me.
People should use patman :-)
Regards,
Simon
PATCH 2/4 arm: Move asm/utils.h to log2.h
Quoted 4 lines · Simon Glass
Hi Marek,
Quoted 1 line · Marek Vasut
How could this be reviewed if it's missing basic things, like a SoB line ?
I added that in a reply to the original patch; again my apologies for missing it the first time around.
Quoted 4 lines
I saw you requested that on another patch. Apart from that it looks OK to me.
People should use patman :-)
I usually add my signed-off-by lines with git rebase --sign, but I forgot to do that this time. Though reasonably the thing which should have reminded me was running checkpatch (which I also forgot to run).
Quoted 3 lines
Regards,
Simon
PATCH 2/4 arm: Move asm/utils.h to log2.h
Hi Sean,
Quoted 11 lines · Sean Anderson
Quoted 4 lines · Simon Glass
Hi Marek,
Quoted 1 line · Marek Vasut
How could this be reviewed if it's missing basic things, like a SoB line ?
I added that in a reply to the original patch; again my apologies for missing it the first time around.
Quoted 1 line
Quoted 7 lines
Quoted 3 lines
I saw you requested that on another patch. Apart from that it looks OK to me.
People should use patman :-)
I usually add my signed-off-by lines with git rebase --sign, but I forgot to do that this time. Though reasonably the thing which should have reminded me was running checkpatch (which I also forgot to run).
That's why patman exists, to automate adding sign-off, checkpath, get maintainers, dropping unwanted tags, cover letter, etc.
It's so simple to set up. It really doesn't make much sense to send patches manually, IMO.
Regards,
Simon
PATCH 1/4 wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig
In reply to Marek VasutQuoted 4 lines · Marek Vasut
Quoted 3 lines · Sean Anderson
Quoted 2 lines
btw what's the motivation for this series, are you hitting some issues with the WDT on SoCFPGA ?
Quoted 8 lines
Quoted 4 lines
This watchdog appears on the Kendryte K210 CPU, which I am adding support for. The rest of the board uses devicetree to configure drivers, so I wanted to add support for this watchdog as well.
You should be able to use what's in u-boot-socfpga/master then. Please give it a try.
This patch series works except that I still need "[PATCH 2/4] arm: Move asm/utils.h to log2.h". I will include it with my k210 support series, since it is specific to that board.
--Sean
PATCH 1/4 wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig
Quoted 10 lines · Sean Anderson
Quoted 9 lines · Marek Vasut
Quoted 7 lines · Sean Anderson
Quoted 2 lines
btw what's the motivation for this series, are you hitting some issues with the WDT on SoCFPGA ?
This watchdog appears on the Kendryte K210 CPU, which I am adding support for. The rest of the board uses devicetree to configure drivers, so I wanted to add support for this watchdog as well.
Quoted 7 lines
Quoted 3 lines
You should be able to use what's in u-boot-socfpga/master then. Please give it a try.
This patch series works except that I still need "[PATCH 2/4] arm: Move
asm/utils.htolog2.h". I will include it with my k210 support series, since it is specific to that board.
Great! Rebase on u-boot/master and repost. Thanks.