Skip to contentSkip to conversation

watchdog: Tighten some watchdog driver dependencies

PATCH In review Tom Rini 2 participants 3 messages Aug 6, 2025 – Oct 16, 2025 Watchdog device drivers

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 watchdog: Tighten some watchdog driver dependencies

A few watchdog drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well.

---
Cc: Stefan Roese <[email protected]>

---
 drivers/watchdog/Kconfig | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
drivers/watchdog/Kconfig +10 -8
index e9ea874d0e3d..463f9249c611 100644
@@ -43,6 +43,7 @@ config HW_WATCHDOG
 
 config IMX_WATCHDOG
 	bool "Enable Watchdog Timer support for IMX and LSCH2 of NXP"
+	depends on MACH_IMX
 	select HW_WATCHDOG if !WDT
 	help
 	  Select this to enable the IMX and LSCH2 of Layerscape watchdog
@@ -64,6 +65,7 @@ config OMAP_WATCHDOG
 
 config ULP_WATCHDOG
 	bool "i.MX7ULP watchdog"
+	depends on MACH_IMX
 	help
 	  Say Y here to enable i.MX7ULP watchdog driver.
 
@@ -116,8 +118,8 @@ config WDT_ARMADA_37XX
 
 config WDT_ASPEED
 	bool "Aspeed ast2400/ast2500 watchdog timer support"
-	depends on WDT
-	default y if ARCH_ASPEED
+	depends on WDT && ARCH_ASPEED
+	default y
 	help
 	  Select this to enable watchdog timer for Aspeed ast2500/ast2400 devices.
 	  The watchdog timer is stopped when initialized. It performs reset, either
@@ -127,8 +129,8 @@ config WDT_ASPEED
 
 config WDT_AST2600
 	bool "Aspeed AST2600 watchdog timer support"
-	depends on WDT
-	default y if ASPEED_AST2600
+	depends on WDT && ASPEED_AST2600
+	default y
 	help
 	  Select this to enable watchdog timer for Aspeed ast2500/ast2400 devices.
 	  The watchdog timer is stopped when initialized. It performs reset, either
@@ -136,7 +138,7 @@ config WDT_AST2600
 
 config WDT_AT91
 	bool "AT91 watchdog timer support"
-	depends on WDT
+	depends on WDT && ARCH_AT91
 	help
 	  Select this to enable Microchip watchdog timer, which can be found on
 	  some AT91 devices.
@@ -173,7 +175,7 @@ config WDT_CDNS
 
 config WDT_CORTINA
 	bool "Cortina Access CAxxxx watchdog timer support"
-	depends on WDT
+	depends on WDT && TARGET_PRESIDIO_ASIC
 	help
 	  Cortina Access CAxxxx watchdog timer support.
 	  This driver support all CPU ISAs supported by Cortina
@@ -219,7 +221,7 @@ config WDT_MAX6370
 
 config WDT_MCF
 	bool "ColdFire family watchdog timer support"
-	depends on WDT
+	depends on WDT && M68K
 	help
 	  Select this to enable ColdFire watchdog timer,
 	  which supports mcf52x2 mcf532x mcf523x families.
@@ -303,7 +305,7 @@ config WDT_OMAP3
 
 config WDT_ORION
 	bool "Orion watchdog timer support"
-	depends on WDT
+	depends on WDT && ARCH_MVEBU
 	select CLK
 	help
 	  Select this to enable Orion watchdog timer, which can be found on some
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Tom Rini

A few watchdog drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well.

---
Cc: Stefan Roese <[email protected]>

Thanks,
Stefan

Quoted 82 lines
---
  drivers/watchdog/Kconfig | 18 ++++++++++--------
  1 file changed, 10 insertions(+), 8 deletions(-)
drivers/watchdog/Kconfig +10 -8
index e9ea874d0e3d..463f9249c611 100644
@@ -43,6 +43,7 @@ config HW_WATCHDOG
 
  config IMX_WATCHDOG
  	bool "Enable Watchdog Timer support for IMX and LSCH2 of NXP"
+	depends on MACH_IMX
  	select HW_WATCHDOG if !WDT
  	help
  	  Select this to enable the IMX and LSCH2 of Layerscape watchdog
@@ -64,6 +65,7 @@ config OMAP_WATCHDOG
 
  config ULP_WATCHDOG
  	bool "i.MX7ULP watchdog"
+	depends on MACH_IMX
  	help
  	  Say Y here to enable i.MX7ULP watchdog driver.
 
@@ -116,8 +118,8 @@ config WDT_ARMADA_37XX
 
  config WDT_ASPEED
  	bool "Aspeed ast2400/ast2500 watchdog timer support"
-	depends on WDT
-	default y if ARCH_ASPEED
+	depends on WDT && ARCH_ASPEED
+	default y
  	help
  	  Select this to enable watchdog timer for Aspeed ast2500/ast2400 devices.
  	  The watchdog timer is stopped when initialized. It performs reset, either
@@ -127,8 +129,8 @@ config WDT_ASPEED
 
  config WDT_AST2600
  	bool "Aspeed AST2600 watchdog timer support"
-	depends on WDT
-	default y if ASPEED_AST2600
+	depends on WDT && ASPEED_AST2600
+	default y
  	help
  	  Select this to enable watchdog timer for Aspeed ast2500/ast2400 devices.
  	  The watchdog timer is stopped when initialized. It performs reset, either
@@ -136,7 +138,7 @@ config WDT_AST2600
 
  config WDT_AT91
  	bool "AT91 watchdog timer support"
-	depends on WDT
+	depends on WDT && ARCH_AT91
  	help
  	  Select this to enable Microchip watchdog timer, which can be found on
  	  some AT91 devices.
@@ -173,7 +175,7 @@ config WDT_CDNS
 
  config WDT_CORTINA
  	bool "Cortina Access CAxxxx watchdog timer support"
-	depends on WDT
+	depends on WDT && TARGET_PRESIDIO_ASIC
  	help
  	  Cortina Access CAxxxx watchdog timer support.
  	  This driver support all CPU ISAs supported by Cortina
@@ -219,7 +221,7 @@ config WDT_MAX6370
 
  config WDT_MCF
  	bool "ColdFire family watchdog timer support"
-	depends on WDT
+	depends on WDT && M68K
  	help
  	  Select this to enable ColdFire watchdog timer,
  	  which supports mcf52x2 mcf532x mcf523x families.
@@ -303,7 +305,7 @@ config WDT_OMAP3
 
  config WDT_ORION
  	bool "Orion watchdog timer support"
-	depends on WDT
+	depends on WDT && ARCH_MVEBU
  	select CLK
  	help
  	  Select this to enable Orion watchdog timer, which can be found on some
#2 lore raw
In reply to Tom Rini
Quoted 6 lines · Tom Rini

A few watchdog drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well.

---
Cc: Stefan Roese <[email protected]>

Applied to u-boot-watchdog/master

Thanks,
Stefan

Quoted 82 lines
---
  drivers/watchdog/Kconfig | 18 ++++++++++--------
  1 file changed, 10 insertions(+), 8 deletions(-)
drivers/watchdog/Kconfig +10 -8
index e9ea874d0e3d..463f9249c611 100644
@@ -43,6 +43,7 @@ config HW_WATCHDOG
 
  config IMX_WATCHDOG
  	bool "Enable Watchdog Timer support for IMX and LSCH2 of NXP"
+	depends on MACH_IMX
  	select HW_WATCHDOG if !WDT
  	help
  	  Select this to enable the IMX and LSCH2 of Layerscape watchdog
@@ -64,6 +65,7 @@ config OMAP_WATCHDOG
 
  config ULP_WATCHDOG
  	bool "i.MX7ULP watchdog"
+	depends on MACH_IMX
  	help
  	  Say Y here to enable i.MX7ULP watchdog driver.
 
@@ -116,8 +118,8 @@ config WDT_ARMADA_37XX
 
  config WDT_ASPEED
  	bool "Aspeed ast2400/ast2500 watchdog timer support"
-	depends on WDT
-	default y if ARCH_ASPEED
+	depends on WDT && ARCH_ASPEED
+	default y
  	help
  	  Select this to enable watchdog timer for Aspeed ast2500/ast2400 devices.
  	  The watchdog timer is stopped when initialized. It performs reset, either
@@ -127,8 +129,8 @@ config WDT_ASPEED
 
  config WDT_AST2600
  	bool "Aspeed AST2600 watchdog timer support"
-	depends on WDT
-	default y if ASPEED_AST2600
+	depends on WDT && ASPEED_AST2600
+	default y
  	help
  	  Select this to enable watchdog timer for Aspeed ast2500/ast2400 devices.
  	  The watchdog timer is stopped when initialized. It performs reset, either
@@ -136,7 +138,7 @@ config WDT_AST2600
 
  config WDT_AT91
  	bool "AT91 watchdog timer support"
-	depends on WDT
+	depends on WDT && ARCH_AT91
  	help
  	  Select this to enable Microchip watchdog timer, which can be found on
  	  some AT91 devices.
@@ -173,7 +175,7 @@ config WDT_CDNS
 
  config WDT_CORTINA
  	bool "Cortina Access CAxxxx watchdog timer support"
-	depends on WDT
+	depends on WDT && TARGET_PRESIDIO_ASIC
  	help
  	  Cortina Access CAxxxx watchdog timer support.
  	  This driver support all CPU ISAs supported by Cortina
@@ -219,7 +221,7 @@ config WDT_MAX6370
 
  config WDT_MCF
  	bool "ColdFire family watchdog timer support"
-	depends on WDT
+	depends on WDT && M68K
  	help
  	  Select this to enable ColdFire watchdog timer,
  	  which supports mcf52x2 mcf532x mcf523x families.
@@ -303,7 +305,7 @@ config WDT_OMAP3
 
  config WDT_ORION
  	bool "Orion watchdog timer support"
-	depends on WDT
+	depends on WDT && ARCH_MVEBU
  	select CLK
  	help
  	  Select this to enable Orion watchdog timer, which can be found on some