Skip to contentSkip to conversation

omap: twl4030_wdt: driver implementation

PATCH In review Atal Shargorodsky 3 participants 5 messages Mar 27, 2009 – Aug 10, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover omap: twl4030_wdt: driver implementation

This is the simplest implementation of twl4030 watchdog driver. Using this driver, the watchdog can be enabled/kicked/disabled, but it does not take care of whether OFF-to-ACTIVE transition will take place or not. Neither it supports the configuration of PRETIMEOUT.

#1 lore raw

PATCH 1/2 omap: twl4030_wdt: twl4030 watchdog driver

From: Timo Kokkonen <[email protected]>

From: Timo Kokkonen <[email protected]>

Implementation of twl4030 watchdog driver.

---
 drivers/mfd/twl4030-core.c     |   13 ++
 drivers/watchdog/Kconfig       |    7 +
 drivers/watchdog/Makefile      |    1 +
 drivers/watchdog/twl4030_wdt.c |  259 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 280 insertions(+), 0 deletions(-)
 create mode 100644 drivers/watchdog/twl4030_wdt.c
drivers/mfd/twl4030-core.c +13 -0
index 1e67713..fe70190 100644
@@ -111,6 +111,13 @@
 #define twl_has_vibra()        false
 #endif
 
+#if defined(CONFIG_TWL4030_WATCHDOG) || \
+	defined(CONFIG_TWL4030_WATCHDOG_MODULE)
+#define twl_has_watchdog()        true
+#else
+#define twl_has_watchdog()        false
+#endif
+
 /* Triton Core internal information (BEGIN) */
 
 /* Last - for index max*/
@@ -543,6 +550,12 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
 			return PTR_ERR(child);
 	}
 
+	if (twl_has_watchdog()) {
+		child = add_child(0, "twl4030_wdt", NULL, 0, false, 0, 0);
+		if (IS_ERR(child))
+			return PTR_ERR(child);
+	}
+
 	if (twl_has_regulator()) {
 		/*
 		child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1);
drivers/watchdog/Kconfig +7 -0
index 0926dd4..3d02565 100644
@@ -233,6 +233,13 @@ config ORION5X_WATCHDOG
 	  To compile this driver as a module, choose M here: the
 	  module will be called orion5x_wdt.
 
+config TWL4030_WATCHDOG
+       tristate "TWL4030 Watchdog"
+       depends on TWL4030_CORE
+       help
+         Support for TI TWL4030 watchdog.  Say 'Y' here to enable the
+         watchdog timer support for TWL4030 chips.
+
 # ARM26 Architecture
 
 # AVR32 Architecture
drivers/watchdog/Makefile +1 -0
index e352bbb..2aaf4d2 100644
@@ -28,6 +28,7 @@ obj-$(CONFIG_USBPCWATCHDOG) += pcwd_usb.o
 obj-$(CONFIG_AT91RM9200_WATCHDOG) += at91rm9200_wdt.o
 obj-$(CONFIG_AT91SAM9X_WATCHDOG) += at91sam9_wdt.o
 obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.o
+obj-$(CONFIG_TWL4030_WATCHDOG) += twl4030_wdt.o
 obj-$(CONFIG_21285_WATCHDOG) += wdt285.o
 obj-$(CONFIG_977_WATCHDOG) += wdt977.o
 obj-$(CONFIG_IXP2000_WATCHDOG) += ixp2000_wdt.o
drivers/watchdog/twl4030_wdt.c new file +259 -0

259 lines not on this page · raw message

Signature · 1 line
1.5.4.3
#2 lore raw

PATCH 2/2 rx51_defconfig: add twl4030 to rx51 default configuration

From: Timo Kokkonen <[email protected]>

From: Timo Kokkonen <[email protected]>

twl4030 watchdog will be compiled as a module by default.

---
 arch/arm/configs/rx51_defconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/configs/rx51_defconfig +1 -0
index 67fd8ec..8f01b81 100644
@@ -1051,6 +1051,7 @@ CONFIG_WATCHDOG=y
 #
 # CONFIG_SOFT_WATCHDOG is not set
 CONFIG_OMAP_WATCHDOG=m
+CONFIG_TWL4030_WATCHDOG=m
 
 #
 # USB-based Watchdog Cards
Signature · 1 line
1.5.4.3
maintainer
#3 lore raw

PATCH 2/2 rx51_defconfig: add twl4030 to rx51 default

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: omap3-upstream

Initial commit ID (Likely to change): 6d8f62040f0d095e78d92213f3daa5bb525a510a

PatchWorks
http://patchwork.kernel.org/patch/14747/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=6d8f62040f0d095e78d92213f3daa5bb525a510a

#4 lore raw

Re: [PATCH 1/2] omap: twl4030_wdt: twl4030 watchdog driver

In reply to Atal Shargorodsky

Hi Russell, Samuel, David,

I reviewed the twl watchdog driver written by Timo and Atal (reviewed version - see below). could you review them also (arm driver and touches drivers/mfd/twl4030-core).

Thanks in advance,
Wim.

---
commit ca1a9726d1e0655c39d07f8b77659c5d017748cb

Author: Timo Kokkonen <[email protected]>
Date:   Fri Mar 27 16:42:17 2009 +0200

[WATCHDOG] twl4030 watchdog driver

Implementation of twl4030 watchdog driver.

drivers/mfd/twl4030-core.c +12 -0
index ec90e95..b8df518 100644
@@ -101,6 +101,12 @@
 #define twl_has_usb()	false
 #endif
 
+#if defined(CONFIG_TWL4030_WATCHDOG) || \
+	defined(CONFIG_TWL4030_WATCHDOG_MODULE)
+#define twl_has_watchdog()        true
+#else
+#define twl_has_watchdog()        false
+#endif
 
 /* Triton Core internal information (BEGIN) */
 
@@ -526,6 +532,12 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
 		usb_transceiver = child;
 	}
 
+	if (twl_has_watchdog()) {
+		child = add_child(0, "twl4030_wdt", NULL, 0, false, 0, 0);
+		if (IS_ERR(child))
+			return PTR_ERR(child);
+	}
+
 	if (twl_has_regulator()) {
 		/*
 		child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1);
drivers/watchdog/Kconfig +7 -0
index 9f6766b..d92bf63 100644
@@ -250,6 +250,13 @@ config COH901327_WATCHDOG
 	  This watchdog is used to reset the system and thus cannot be
 	  compiled as a module.
 
+config TWL4030_WATCHDOG
+	tristate "TWL4030 Watchdog"
+	depends on TWL4030_CORE
+	help
+	  Support for TI TWL4030 watchdog.  Say 'Y' here to enable the
+	  watchdog timer support for TWL4030 chips.
+
 # AVR32 Architecture
 
 config AT32AP700X_WDT
drivers/watchdog/Makefile +1 -0
index 8d75e62..9eb74b7 100644
@@ -28,6 +28,7 @@ obj-$(CONFIG_USBPCWATCHDOG) += pcwd_usb.o
 obj-$(CONFIG_AT91RM9200_WATCHDOG) += at91rm9200_wdt.o
 obj-$(CONFIG_AT91SAM9X_WATCHDOG) += at91sam9_wdt.o
 obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.o
+obj-$(CONFIG_TWL4030_WATCHDOG) += twl4030_wdt.o
 obj-$(CONFIG_21285_WATCHDOG) += wdt285.o
 obj-$(CONFIG_977_WATCHDOG) += wdt977.o
 obj-$(CONFIG_IXP2000_WATCHDOG) += ixp2000_wdt.o
drivers/watchdog/twl4030_wdt.c new file +272 -0

272 lines not on this page · raw message