From: Christophe Leroy <christophe.leroy@c-s.fr>
Date: Wed, 26 Feb 2020 16:17:52 +0000 (+0000)
Subject: watchdog: Don't select CONFIG_WATCHDOG and CONFIG_HW_WATCHDOG at the same time
X-Git-Tag: v2025.01-rc5-pxa1908~2544^2
X-Git-Url: http://git.dujemihanovic.xyz/%7B%7B%20.Permalink%20%7D%7D?a=commitdiff_plain;h=7e00e907f51fd9335127c323d6a0eacdbb7e7013;p=u-boot.git

watchdog: Don't select CONFIG_WATCHDOG and CONFIG_HW_WATCHDOG at the same time

Commit 06985289d452 ("watchdog: Implement generic watchdog_reset()
version") introduced an automatic selection of CONFIG_WATCHDOG by
CONFIG_WDT. But for boards selecting CONFIG_HW_WATCHDOG, like
boards have a powerpc 8xx, CONFIG_WATCHDOG shall not be selected
as they are mutually exclusive.

Make CONFIG_WATCHDOG dependent on !CONFIG_HW_WATCHDOG

Fixes: 06985289d452 ("watchdog: Implement generic watchdog_reset() version")
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Stefan Roese <sr@denx.de>
---

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index fbb561b995..d24c1e4835 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -2,6 +2,7 @@ menu "Watchdog Timer Support"
 
 config WATCHDOG
 	bool "Enable U-Boot watchdog reset"
+	depends on !HW_WATCHDOG
 	help
 	  This option enables U-Boot watchdog support where U-Boot is using
 	  watchdog_reset function to service watchdog device in U-Boot. Enable