Skip to contentSkip to conversation

watchdog: sirf: add watchdog driver of CSR SiRFprimaII and SiRFatlasVI

PATCH In review Barry Song 2 participants 2 messages Oct 2, 2013 – Oct 29, 2013

Subsystems (3)
lore
Share & tools
lore

Barry Song

author
#0 lore raw

PATCH v7 1/1 watchdog: sirf: add watchdog driver of CSR SiRFprimaII and SiRFatlasVI

From: Xianglong Du <[email protected]>

On CSR SiRFprimaII and SiRFatlasVI, the 6th timer can act as a watchdog timer when the Watchdog mode is enabled.

watchdog occur when TIMER watchdog counter matches the value software pre-set, when this event occurs, the effect is the same as the system software reset.

---
-v7: fix trailing whitespace and delete redundant empty line

 .../devicetree/bindings/watchdog/sirfsoc_wdt.txt   |  14 ++
 arch/arm/configs/prima2_defconfig                  |   1 +
 drivers/watchdog/Kconfig                           |   9 +
 drivers/watchdog/Makefile                          |   1 +
 drivers/watchdog/sirfsoc_wdt.c                     | 224 +++++++++++++++++++++
 5 files changed, 249 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
 create mode 100644 drivers/watchdog/sirfsoc_wdt.c
Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt new file +14 -0
new file mode 100644
index 0000000..9cbc76c
@@ -0,0 +1,14 @@
+SiRFSoC Timer and Watchdog Timer(WDT) Controller
+
+Required properties:
+- compatible: "sirf,prima2-tick"
+- reg: Address range of tick timer/WDT register set
+- interrupts: interrupt number to the cpu
+
+Example:
+
+timer@b0020000 {
+	compatible = "sirf,prima2-tick";
+	reg = <0xb0020000 0x1000>;
+	interrupts = <0>;
+};
arch/arm/configs/prima2_defconfig +1 -0
index 002a1ce..23591db 100644
@@ -39,6 +39,7 @@ CONFIG_SPI=y
 CONFIG_SPI_SIRF=y
 CONFIG_SPI_SPIDEV=y
 # CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_MASS_STORAGE=m
 CONFIG_MMC=y
drivers/watchdog/Kconfig +9 -0
index d1d53f3..98fb560 100644
@@ -392,6 +392,15 @@ config RETU_WATCHDOG
 	  To compile this driver as a module, choose M here: the
 	  module will be called retu_wdt.
 
+config SIRFSOC_WATCHDOG
+	tristate "SiRFSOC watchdog"
+	depends on ARCH_SIRF
+	select WATCHDOG_CORE
+	default y
+	help
+	  Support for CSR SiRFprimaII and SiRFatlasVI watchdog. When
+	  the watchdog triggers the system will be reset.
+
 # AVR32 Architecture
 
 config AT32AP700X_WDT
drivers/watchdog/Makefile +1 -0
index 6c5bb27..1a1300d 100644
@@ -55,6 +55,7 @@ obj-$(CONFIG_IMX2_WDT) += imx2_wdt.o
 obj-$(CONFIG_UX500_WATCHDOG) += ux500_wdt.o
 obj-$(CONFIG_RETU_WATCHDOG) += retu_wdt.o
 obj-$(CONFIG_BCM2835_WDT) += bcm2835_wdt.o
+obj-$(CONFIG_SIRFSOC_WATCHDOG) += sirfsoc_wdt.o
 
 # AVR32 Architecture
 obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
drivers/watchdog/sirfsoc_wdt.c new file +224 -0

224 lines not on this page · raw message

Signature · 1 line
1.8.2.3
#1 lore raw

Hi Barry and Xianglong,

Quoted 5 lines

From: Xianglong Du <[email protected]>

On CSR SiRFprimaII and SiRFatlasVI, the 6th timer can act as a watchdog timer when the Watchdog mode is enabled.

Quoted 8 lines

watchdog occur when TIMER watchdog counter matches the value software pre-set, when this event occurs, the effect is the same as the system software reset.

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.