diff mbox

[U-Boot,11/17] watchdog: Migrate OMAP_WATCHDOG to Kconfig

Message ID 1494642810-22796-11-git-send-email-trini@konsulko.com
State Accepted
Commit 897f70620053e4da07f1173aea3891637b7bb6a9
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini May 13, 2017, 2:33 a.m. UTC
Move this entry to Kconfig.  As it is a hardware watchdog, select
HW_WATCHDOG.  While we could default to enabling this for all platforms,
it is currently only enabled by default on AM33XX, so keep that logic
today.

Cc: Roger Meier <r.meier@siemens.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
Note that 'rut' is in an odd place in that it undefines HW_WATCHDOG for
SPL, but still defines CONFIG_SPL_WATCHDOG_SUPPORT.  If there should be
no watchdog support in SPL, the right thing to do would be to disable
CONFIG_SPL_WATCHDOG_SUPPORT.  This keeps, AFAICT, the status quo.
---
 configs/brppt1_mmc_defconfig           | 1 +
 configs/brppt1_nand_defconfig          | 1 +
 configs/brppt1_spi_defconfig           | 1 +
 configs/draco_defconfig                | 1 +
 configs/etamin_defconfig               | 1 +
 configs/pxm2_defconfig                 | 1 +
 configs/rastaban_defconfig             | 1 +
 configs/thuban_defconfig               | 1 +
 drivers/watchdog/Kconfig               | 8 ++++++++
 include/configs/brppt1.h               | 3 ---
 include/configs/draco.h                | 3 ---
 include/configs/etamin.h               | 3 ---
 include/configs/pxm2.h                 | 3 ---
 include/configs/rastaban.h             | 3 ---
 include/configs/rut.h                  | 4 ----
 include/configs/siemens-am33x-common.h | 3 ---
 include/configs/thuban.h               | 3 ---
 include/configs/ti_am335x_common.h     | 4 ----
 scripts/config_whitelist.txt           | 1 -
 19 files changed, 16 insertions(+), 30 deletions(-)

Comments

Tom Rini May 15, 2017, 11:19 p.m. UTC | #1
On Fri, May 12, 2017 at 10:33:24PM -0400, Tom Rini wrote:

> Move this entry to Kconfig.  As it is a hardware watchdog, select
> HW_WATCHDOG.  While we could default to enabling this for all platforms,
> it is currently only enabled by default on AM33XX, so keep that logic
> today.
> 
> Cc: Roger Meier <r.meier@siemens.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/configs/brppt1_mmc_defconfig b/configs/brppt1_mmc_defconfig
index 7d92c139402a..1bdbf9049597 100644
--- a/configs/brppt1_mmc_defconfig
+++ b/configs/brppt1_mmc_defconfig
@@ -57,4 +57,5 @@  CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_STORAGE=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_LCD=y
+CONFIG_OMAP_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/brppt1_nand_defconfig b/configs/brppt1_nand_defconfig
index 9abe61760e10..ed7432d7f42d 100644
--- a/configs/brppt1_nand_defconfig
+++ b/configs/brppt1_nand_defconfig
@@ -57,4 +57,5 @@  CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_STORAGE=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_LCD=y
+CONFIG_OMAP_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/brppt1_spi_defconfig b/configs/brppt1_spi_defconfig
index 79bb9057bfc2..02b5ff60e21d 100644
--- a/configs/brppt1_spi_defconfig
+++ b/configs/brppt1_spi_defconfig
@@ -65,4 +65,5 @@  CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_STORAGE=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_LCD=y
+CONFIG_OMAP_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/draco_defconfig b/configs/draco_defconfig
index 2ecdd3c8f68d..0e50b3109ea2 100644
--- a/configs/draco_defconfig
+++ b/configs/draco_defconfig
@@ -65,3 +65,4 @@  CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Siemens AG"
 CONFIG_G_DNL_VENDOR_NUM=0x0908
 CONFIG_G_DNL_PRODUCT_NUM=0x02d2
+CONFIG_OMAP_WATCHDOG=y
diff --git a/configs/etamin_defconfig b/configs/etamin_defconfig
index 7e0b1923b8ac..b6911fd71743 100644
--- a/configs/etamin_defconfig
+++ b/configs/etamin_defconfig
@@ -65,3 +65,4 @@  CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Siemens AG"
 CONFIG_G_DNL_VENDOR_NUM=0x0908
 CONFIG_G_DNL_PRODUCT_NUM=0x02d2
+CONFIG_OMAP_WATCHDOG=y
diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig
index c40684a81d48..67bdfd63f259 100644
--- a/configs/pxm2_defconfig
+++ b/configs/pxm2_defconfig
@@ -72,3 +72,4 @@  CONFIG_G_DNL_PRODUCT_NUM=0x02d2
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_SYS_CONSOLE_BG_COL=0xff
 CONFIG_SYS_CONSOLE_FG_COL=0x00
+CONFIG_OMAP_WATCHDOG=y
diff --git a/configs/rastaban_defconfig b/configs/rastaban_defconfig
index 01848c5702ab..f77d4d408793 100644
--- a/configs/rastaban_defconfig
+++ b/configs/rastaban_defconfig
@@ -65,3 +65,4 @@  CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Siemens AG"
 CONFIG_G_DNL_VENDOR_NUM=0x0908
 CONFIG_G_DNL_PRODUCT_NUM=0x02d2
+CONFIG_OMAP_WATCHDOG=y
diff --git a/configs/thuban_defconfig b/configs/thuban_defconfig
index dd61ead647cd..914f70fd6a01 100644
--- a/configs/thuban_defconfig
+++ b/configs/thuban_defconfig
@@ -65,3 +65,4 @@  CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Siemens AG"
 CONFIG_G_DNL_VENDOR_NUM=0x0908
 CONFIG_G_DNL_PRODUCT_NUM=0x02d2
+CONFIG_OMAP_WATCHDOG=y
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index bdaf5d4101d2..22a7c4f80180 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -12,6 +12,14 @@  config BCM2835_WDT
 	  This provides basic infrastructure to support BCM2835/2836 watchdog
 	  hardware, with a max timeout of ~15secs.
 
+config OMAP_WATCHDOG
+	bool "TI OMAP watchdog driver"
+	depends on ARCH_OMAP2PLUS
+	select HW_WATCHDOG
+	default y if AM33XX
+	help
+	  Say Y here to enable the OMAP3+ watchdog driver.
+	
 config ULP_WATCHDOG
 	bool "i.MX7ULP watchdog"
 	help
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index 0c1a54d7ba2e..521d097f8a96 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -20,9 +20,6 @@ 
 #define CONFIG_LCD_DT_SIMPLEFB
 #define LCD_BPP				LCD_COLOR32
 
-#define CONFIG_HW_WATCHDOG
-#define CONFIG_OMAP_WATCHDOG
-
 /* Bootcount using the RTC block */
 #define CONFIG_SYS_BOOTCOUNT_ADDR	0x44E3E000
 #define CONFIG_BOOTCOUNT_LIMIT
diff --git a/include/configs/draco.h b/include/configs/draco.h
index 896d14f99a97..ba6a43062a63 100644
--- a/include/configs/draco.h
+++ b/include/configs/draco.h
@@ -45,9 +45,6 @@ 
 
 #define CONFIG_FACTORYSET
 
-/* Watchdog */
-#define CONFIG_OMAP_WATCHDOG
-
 /* Define own nand partitions */
 #define CONFIG_ENV_OFFSET_REDUND    0x2E0000
 #define CONFIG_ENV_SIZE_REDUND      0x2000
diff --git a/include/configs/etamin.h b/include/configs/etamin.h
index 40c57948ccd4..a0152a4a43e9 100644
--- a/include/configs/etamin.h
+++ b/include/configs/etamin.h
@@ -116,9 +116,6 @@ 
 #define CONFIG_SYS_DCACHE_OFF
 #endif
 
-/* Watchdog */
-#define CONFIG_OMAP_WATCHDOG
-
 /* Define own nand partitions */
 #define CONFIG_ENV_OFFSET_REDUND	0xB80000
 #define CONFIG_ENV_SIZE_REDUND		CONFIG_ENV_SIZE
diff --git a/include/configs/pxm2.h b/include/configs/pxm2.h
index 57f034f0df61..e8e0c7edd89e 100644
--- a/include/configs/pxm2.h
+++ b/include/configs/pxm2.h
@@ -42,9 +42,6 @@ 
 
 #define CONFIG_FACTORYSET
 
-/* Watchdog */
-#define CONFIG_OMAP_WATCHDOG
-
 #ifndef CONFIG_SPL_BUILD
 
 /* Use common default */
diff --git a/include/configs/rastaban.h b/include/configs/rastaban.h
index 99fe1616e555..0820f6fc7a3f 100644
--- a/include/configs/rastaban.h
+++ b/include/configs/rastaban.h
@@ -49,9 +49,6 @@ 
 
 #define CONFIG_FACTORYSET
 
-/* Watchdog */
-#define CONFIG_OMAP_WATCHDOG
-
 /* Define own nand partitions */
 #define CONFIG_ENV_OFFSET_REDUND	0x2E0000
 #define CONFIG_ENV_SIZE_REDUND		0x2000
diff --git a/include/configs/rut.h b/include/configs/rut.h
index 8cfb73d78137..e676a5acd481 100644
--- a/include/configs/rut.h
+++ b/include/configs/rut.h
@@ -110,10 +110,6 @@ 
 
 #endif /* CONFIG_SPL_BUILD */
 
-#ifdef CONFIG_SPL_BUILD
-#undef CONFIG_HW_WATCHDOG
-#endif
-
 #if defined(CONFIG_VIDEO)
 #define CONFIG_VIDEO_DA8XX
 #define CONFIG_SPLASH_SCREEN
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 81586969e263..5bb471c8f605 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -547,9 +547,6 @@ 
 #endif
 #endif
 
-/* Watchdog */
-#define CONFIG_HW_WATCHDOG
-
 /* Reboot after 60 sec if bootcmd fails */
 #define CONFIG_RESET_TO_RETRY
 #define CONFIG_BOOT_RETRY_TIME 60
diff --git a/include/configs/thuban.h b/include/configs/thuban.h
index 8c37d7cace8c..cea84acd03c1 100644
--- a/include/configs/thuban.h
+++ b/include/configs/thuban.h
@@ -42,9 +42,6 @@ 
 
 #define CONFIG_FACTORYSET
 
-/* Watchdog */
-#define CONFIG_OMAP_WATCHDOG
-
 /* Define own nand partitions */
 #define CONFIG_ENV_OFFSET_REDUND    0x2E0000
 #define CONFIG_ENV_SIZE_REDUND      0x2000
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index e4c3c807f21d..bf44121a0fe6 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -47,10 +47,6 @@ 
  */
 #define CONFIG_SYS_BOOTCOUNT_ADDR	0x44E3E000
 
-/* Enable the HW watchdog, since we can use this with bootcount */
-#define CONFIG_HW_WATCHDOG
-#define CONFIG_OMAP_WATCHDOG
-
 /*
  * SPL related defines.  The Public RAM memory map the ROM defines the
  * area between 0x402F0400 and 0x4030B800 as a download area and
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index ebe3fd7996de..e86e7388dce5 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -1988,7 +1988,6 @@  CONFIG_OMAP_USB2PHY2_HOST
 CONFIG_OMAP_USB3PHY1_HOST
 CONFIG_OMAP_USB_PHY
 CONFIG_OMAP_VC_I2C_HS_MCODE
-CONFIG_OMAP_WATCHDOG
 CONFIG_OPTREX_BW
 CONFIG_ORIGEN
 CONFIG_OS1_ENV_ADDR