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: (28 commits)
  [WATCHDOG] Fix pcwd_init_module crash
  [WATCHDOG] ICH9 support for iTCO_wdt
  [WATCHDOG] 631xESB/632xESB support for iTCO_wdt - add all LPC bridges
  [WATCHDOG] 631xESB/632xESB support for iTCO_wdt
  [WATCHDOG] omap_wdt.c - default error for IOCTL is -ENOTTY
  [WATCHDOG] Return value of nonseekable_open
  [WATCHDOG] mv64x60_wdt: Rework the timeout register manipulation
  [WATCHDOG] mv64x60_wdt: disable watchdog timer when driver is probed
  [WATCHDOG] mv64x60_wdt: Support the WDIOF_MAGICCLOSE feature
  [WATCHDOG] mv64x60_wdt: Add a module parameter to change nowayout setting
  [WATCHDOG] mv64x60_wdt: Add WDIOC_SETOPTIONS ioctl support
  [WATCHDOG] mv64x60_wdt: Support for WDIOC_SETTIMEOUT ioctl
  [WATCHDOG] mv64x60_wdt: Fix WDIOC_GETTIMEOUT return value
  [WATCHDOG] mv64x60_wdt: Check return value of nonseekable_open
  [WATCHDOG] mv64x60_wdt: Add arch/powerpc platform support
  [WATCHDOG] mv64x60_wdt: Get register address from platform data
  [WATCHDOG] mv64x60_wdt: set up platform_device in platform code
  [WATCHDOG] ensure mouse and keyboard ignored in w83627hf_wdt
  [WATCHDOG] s3c2410_wdt: fixup after arch include moves
  [WATCHDOG] git-watchdog-typo
  ...
  • Loading branch information
Linus Torvalds committed Aug 1, 2007
2 parents d6dd9e9 + 647e50f commit 2f63251
Show file tree
Hide file tree
Showing 29 changed files with 1,509 additions and 156 deletions.
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,14 @@ L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only)
W: http://blackfin.uclinux.org
S: Supported

BLACKFIN WATCHDOG DRIVER
P: Mike Frysinger
M: michael.frysinger@analog.com
M: vapier.adi@gmail.com
L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only)
W: http://blackfin.uclinux.org
S: Supported

BAYCOM/HDLCDRV DRIVERS FOR AX.25
P: Thomas Sailer
M: t.sailer@alumni.ethz.ch
Expand Down
6 changes: 6 additions & 0 deletions arch/powerpc/boot/dts/prpmc2800.dts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@
interrupt-parent = <&/mv64x60/pic>;
};

wdt@b410 { /* watchdog timer */
compatible = "marvell,mv64x60-wdt";
reg = <b410 8>;
timeout = <a>; /* wdt timeout in seconds */
};

i2c@c000 {
device_type = "i2c";
compatible = "marvell,mv64x60-i2c";
Expand Down
64 changes: 64 additions & 0 deletions arch/powerpc/sysdev/mv64x60_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,61 @@ static int __init mv64x60_i2c_device_setup(struct device_node *np, int id)
return err;
}

/*
* Create mv64x60_wdt platform devices
*/
static int __init mv64x60_wdt_device_setup(struct device_node *np, int id)
{
struct resource r;
struct platform_device *pdev;
struct mv64x60_wdt_pdata pdata;
const unsigned int *prop;
int err;

err = of_address_to_resource(np, 0, &r);
if (err)
return err;

memset(&pdata, 0, sizeof(pdata));

prop = of_get_property(np, "timeout", NULL);
if (!prop)
return -ENODEV;
pdata.timeout = *prop;

np = of_get_parent(np);
if (!np)
return -ENODEV;

prop = of_get_property(np, "clock-frequency", NULL);
of_node_put(np);
if (!prop)
return -ENODEV;
pdata.bus_clk = *prop / 1000000; /* wdt driver wants freq in MHz */

pdev = platform_device_alloc(MV64x60_WDT_NAME, id);
if (!pdev)
return -ENOMEM;

err = platform_device_add_resources(pdev, &r, 1);
if (err)
goto error;

err = platform_device_add_data(pdev, &pdata, sizeof(pdata));
if (err)
goto error;

err = platform_device_add(pdev);
if (err)
goto error;

return 0;

error:
platform_device_put(pdev);
return err;
}

static int __init mv64x60_device_setup(void)
{
struct device_node *np = NULL;
Expand All @@ -414,6 +469,15 @@ static int __init mv64x60_device_setup(void)
if ((err = mv64x60_i2c_device_setup(np, id)))
goto error;

/* support up to one watchdog timer */
np = of_find_compatible_node(np, NULL, "marvell,mv64x60-wdt");
if (np) {
if ((err = mv64x60_wdt_device_setup(np, id)))
goto error;
of_node_put(np);
}


return 0;

error:
Expand Down
29 changes: 29 additions & 0 deletions arch/ppc/syslib/mv64x60.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,32 @@ static struct platform_device i2c_device = {
};
#endif

#ifdef CONFIG_WATCHDOG
static struct mv64x60_wdt_pdata mv64x60_wdt_pdata = {
.timeout = 10, /* default watchdog expiry in seconds */
.bus_clk = 133, /* default bus clock in MHz */
};

static struct resource mv64x60_wdt_resources[] = {
[0] = {
.name = "mv64x60 wdt base",
.start = MV64x60_WDT_WDC,
.end = MV64x60_WDT_WDC + 8 - 1, /* two 32-bit registers */
.flags = IORESOURCE_MEM,
},
};

static struct platform_device wdt_device = {
.name = MV64x60_WDT_NAME,
.id = 0,
.num_resources = ARRAY_SIZE(mv64x60_wdt_resources),
.resource = mv64x60_wdt_resources,
.dev = {
.platform_data = &mv64x60_wdt_pdata,
},
};
#endif

#if defined(CONFIG_SYSFS) && !defined(CONFIG_GT64260)
static struct mv64xxx_pdata mv64xxx_pdata = {
.hs_reg_valid = 0,
Expand Down Expand Up @@ -476,6 +502,9 @@ static struct platform_device *mv64x60_pd_devs[] __initdata = {
#ifdef CONFIG_I2C_MV64XXX
&i2c_device,
#endif
#ifdef CONFIG_MV64X60_WDT
&wdt_device,
#endif
#if defined(CONFIG_SYSFS) && !defined(CONFIG_GT64260)
&mv64xxx_device,
#endif
Expand Down
1 change: 1 addition & 0 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ obj-y += i2c/
obj-$(CONFIG_W1) += w1/
obj-$(CONFIG_POWER_SUPPLY) += power/
obj-$(CONFIG_HWMON) += hwmon/
obj-$(CONFIG_WATCHDOG) += char/watchdog/
obj-$(CONFIG_PHONE) += telephony/
obj-$(CONFIG_MD) += md/
obj-$(CONFIG_BT) += bluetooth/
Expand Down
1 change: 0 additions & 1 deletion drivers/char/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ obj-$(CONFIG_GPIO_VR41XX) += vr41xx_giu.o
obj-$(CONFIG_GPIO_TB0219) += tb0219.o
obj-$(CONFIG_TELCLOCK) += tlclk.o

obj-$(CONFIG_WATCHDOG) += watchdog/
obj-$(CONFIG_MWAVE) += mwave/
obj-$(CONFIG_AGP) += agp/
obj-$(CONFIG_DRM) += drm/
Expand Down
117 changes: 85 additions & 32 deletions drivers/char/watchdog/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ config SOFT_WATCHDOG
To compile this driver as a module, choose M here: the
module will be called softdog.

# ALPHA Architecture

# ARM Architecture

config AT91RM9200_WATCHDOG
Expand Down Expand Up @@ -189,7 +191,7 @@ config PNX4008_WATCHDOG

config IOP_WATCHDOG
tristate "IOP Watchdog"
depends on WATCHDOG && PLAT_IOP
depends on PLAT_IOP
select WATCHDOG_NOWAYOUT if (ARCH_IOP32X || ARCH_IOP33X)
help
Say Y here if to include support for the watchdog timer
Expand All @@ -203,15 +205,48 @@ config IOP_WATCHDOG
operating as an Root Complex and/or Central Resource, the PCI-X
and/or PCIe busses will also be reset. THIS IS A VERY BIG HAMMER.

config DAVINCI_WATCHDOG
tristate "DaVinci watchdog"
depends on ARCH_DAVINCI
help
Say Y here if to include support for the watchdog timer
in the DaVinci DM644x/DM646x processors.
To compile this driver as a module, choose M here: the
module will be called davinci_wdt.

NOTE: once enabled, this timer cannot be disabled.
Say N if you are unsure.

# ARM26 Architecture

# AVR32 Architecture

config AT32AP700X_WDT
tristate "AT32AP700x watchdog"
depends on WATCHDOG && CPU_AT32AP7000
depends on CPU_AT32AP7000
help
Watchdog timer embedded into AT32AP700x devices. This will reboot
your system when the timeout is reached.

# BLACKFIN Architecture

config BFIN_WDT
tristate "Blackfin On-Chip Watchdog Timer"
depends on BLACKFIN
---help---
If you say yes here you will get support for the Blackfin On-Chip
Watchdog Timer. If you have one of these processors and wish to
have watchdog support enabled, say Y, otherwise say N.

To compile this driver as a module, choose M here: the
module will be called bfin_wdt.

# CRIS Architecture

# FRV Architecture

# H8300 Architecture

# X86 (i386 + ia64 + x86_64) Architecture

config ACQUIRE_WDT
Expand Down Expand Up @@ -540,37 +575,11 @@ config SBC_EPX_C3_WATCHDOG
To compile this driver as a module, choose M here: the
module will be called sbc_epx_c3.

# PowerPC Architecture
# M32R Architecture

config 8xx_WDT
tristate "MPC8xx Watchdog Timer"
depends on 8xx
# M68K Architecture

config 83xx_WDT
tristate "MPC83xx Watchdog Timer"
depends on PPC_83xx

config MV64X60_WDT
tristate "MV64X60 (Marvell Discovery) Watchdog Timer"
depends on MV64X60

config BOOKE_WDT
bool "PowerPC Book-E Watchdog Timer"
depends on BOOKE || 4xx
---help---
Please see Documentation/watchdog/watchdog-api.txt for
more information.

# PPC64 Architecture

config WATCHDOG_RTAS
tristate "RTAS watchdog"
depends on PPC_RTAS
help
This driver adds watchdog support for the RTAS watchdog.

To compile this driver as a module, choose M here. The module
will be called wdrtas.
# M68KNOMMU Architecture

# MIPS Architecture

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

# PARISC Architecture

# POWERPC Architecture

config MPC5200_WDT
tristate "MPC5200 Watchdog Timer"
depends on PPC_MPC52xx

config 8xx_WDT
tristate "MPC8xx Watchdog Timer"
depends on 8xx

config 83xx_WDT
tristate "MPC83xx Watchdog Timer"
depends on PPC_83xx

config MV64X60_WDT
tristate "MV64X60 (Marvell Discovery) Watchdog Timer"
depends on MV64X60

config BOOKE_WDT
bool "PowerPC Book-E Watchdog Timer"
depends on BOOKE || 4xx
---help---
Please see Documentation/watchdog/watchdog-api.txt for
more information.

# PPC64 Architecture

config WATCHDOG_RTAS
tristate "RTAS watchdog"
depends on PPC_RTAS
help
This driver adds watchdog support for the RTAS watchdog.

To compile this driver as a module, choose M here. The module
will be called wdrtas.

# S390 Architecture

config ZVM_WATCHDOG
Expand All @@ -614,7 +661,7 @@ config ZVM_WATCHDOG
To compile this driver as a module, choose M here. The module
will be called vmwatchdog.

# SUPERH Architecture
# SUPERH (sh + sh64) Architecture

config SH_WDT
tristate "SuperH Watchdog"
Expand All @@ -641,6 +688,8 @@ config SH_WDT_MMAP
If you say Y here, user applications will be able to mmap the
WDT/CPG registers.

# SPARC Architecture

# SPARC64 Architecture

config WATCHDOG_CP1XXX
Expand All @@ -665,6 +714,10 @@ config WATCHDOG_RIO
machines. The watchdog timeout period is normally one minute but
can be changed with a boot-time parameter.

# V850 Architecture

# XTENSA Architecture

#
# ISA-based Watchdog Cards
#
Expand Down
Loading

0 comments on commit 2f63251

Please sign in to comment.