Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-wat…
Browse files Browse the repository at this point in the history
…chdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] Documentation/watchdog/src/watchdog-simple.c: improve this code
  [WATCHDOG] AR7: watchdog timer
  [WATCHDOG] Linux kernel IPC SBC Watchdog Timer driver
  • Loading branch information
Linus Torvalds committed Oct 23, 2007
2 parents 2024da6 + 06063e2 commit af76bba
Show file tree
Hide file tree
Showing 4 changed files with 374 additions and 7 deletions.
18 changes: 14 additions & 4 deletions Documentation/watchdog/src/watchdog-simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,25 @@
#include <unistd.h>
#include <fcntl.h>

int main(int argc, const char *argv[]) {
int main(void)
{
int fd = open("/dev/watchdog", O_WRONLY);
int ret = 0;
if (fd == -1) {
perror("watchdog");
exit(1);
exit(EXIT_FAILURE);
}
while (1) {
write(fd, "\0", 1);
fsync(fd);
ret = write(fd, "\0", 1);
if (ret != 1) {
ret = -1;
break;
}
ret = fsync(fd);
if (ret)
break;
sleep(10);
}
close(fd);
return ret;
}
13 changes: 10 additions & 3 deletions drivers/watchdog/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,12 @@ config IBMASR
module will be called ibmasr.

config WAFER_WDT
tristate "ICP Wafer 5823 Single Board Computer Watchdog"
tristate "ICP Single Board Computer Watchdog Timer"
depends on X86
help
This is a driver for the hardware watchdog on the ICP Wafer 5823
Single Board Computer (and probably other similar models).
This is a driver for the hardware watchdog on the ICP Single
Board Computer. This driver is working on (at least) the following
IPC SBC's: Wafer 5823, Rocky 4783, Rocky 3703 and Rocky 3782.

To compile this driver as a module, choose M here: the
module will be called wafer5823wdt.
Expand Down Expand Up @@ -609,6 +610,12 @@ config WDT_RM9K_GPI
To compile this driver as a module, choose M here: the
module will be called rm9k_wdt.

config AR7_WDT
tristate "TI AR7 Watchdog Timer"
depends on AR7
help
Hardware driver for the TI AR7 Watchdog Timer.

# PARISC Architecture

# POWERPC Architecture
Expand Down
1 change: 1 addition & 0 deletions drivers/watchdog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ obj-$(CONFIG_SBC_EPX_C3_WATCHDOG) += sbc_epx_c3.o
obj-$(CONFIG_INDYDOG) += indydog.o
obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o
obj-$(CONFIG_WDT_RM9K_GPI) += rm9k_wdt.o
obj-$(CONFIG_AR7_WDT) += ar7_wdt.o

# PARISC Architecture

Expand Down
Loading

0 comments on commit af76bba

Please sign in to comment.