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] i6300esb.c: start locking
  [WATCHDOG] i6300esb.c: convert to platform device driver
  [WATCHDOG] wdt.c: remove #ifdef CONFIG_WDT_501
  [WATCHDOG] Fix io.h & uaccess.h includes.
  [WATCHDOG] More coding-style and trivial clean-up
  [WATCHDOG] struct file_operations should be const
  [WATCHDOG] cpwd.c: Coding style - Clean-up
  [WATCHDOG] hpwdt.c: Add new HP BMC controller. 
  [PATCH 13/13] drivers/watchdog: use USB API functions rather than constants
  [WATCHDOG] orion5x_wdt: fix compile issue by providing tclk as platform data
  [WATCHDOG] rc32434_wdt: make sure watchdog is not running at startup
  [WATCHDOG] rc32434_wdt: add spin_locking
  [WATCHDOG] rc32434_wdt: add shutdown method
  [WATCHDOG] rc32434_wdt: add timeout module parameter
  [WATCHDOG] rc32434_wdt: clean-up driver
  [WATCHDOG] davinci: convert to ioremap() + io[read|write]
  [WATCHDOG] w83697ug: add error checking
  [WATCHDOG] cpwd.c & riowd.c - unlocked_ioctl
  • Loading branch information
torvalds committed Mar 26, 2009
2 parents d3f12d3 + 3b9d49e commit 8690d8a
Show file tree
Hide file tree
Showing 42 changed files with 793 additions and 536 deletions.
29 changes: 29 additions & 0 deletions arch/arm/mach-orion5x/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <plat/ehci-orion.h>
#include <plat/mv_xor.h>
#include <plat/orion_nand.h>
#include <plat/orion5x_wdt.h>
#include <plat/time.h>
#include "common.h"

Expand Down Expand Up @@ -532,6 +533,29 @@ void __init orion5x_xor_init(void)
}


/*****************************************************************************
* Watchdog
****************************************************************************/
static struct orion5x_wdt_platform_data orion5x_wdt_data = {
.tclk = 0,
};

static struct platform_device orion5x_wdt_device = {
.name = "orion5x_wdt",
.id = -1,
.dev = {
.platform_data = &orion5x_wdt_data,
},
.num_resources = 0,
};

void __init orion5x_wdt_init(void)
{
orion5x_wdt_data.tclk = orion5x_tclk;
platform_device_register(&orion5x_wdt_device);
}


/*****************************************************************************
* Time handling
****************************************************************************/
Expand Down Expand Up @@ -631,6 +655,11 @@ void __init orion5x_init(void)
printk(KERN_INFO "Orion: Applying 5281 D0 WFI workaround.\n");
disable_hlt();
}

/*
* Register watchdog driver
*/
orion5x_wdt_init();
}

/*
Expand Down
18 changes: 18 additions & 0 deletions arch/arm/plat-orion/include/plat/orion5x_wdt.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* arch/arm/plat-orion/include/plat/orion5x_wdt.h
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/

#ifndef __PLAT_ORION5X_WDT_H
#define __PLAT_ORION5X_WDT_H

struct orion5x_wdt_platform_data {
u32 tclk; /* no <linux/clk.h> support yet */
};


#endif

15 changes: 0 additions & 15 deletions drivers/watchdog/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -940,21 +940,6 @@ config WDT
To compile this driver as a module, choose M here: the
module will be called wdt.

config WDT_501
bool "WDT501 features"
depends on WDT
help
Saying Y here and creating a character special file /dev/temperature
with major number 10 and minor number 131 ("man mknod") will give
you a thermometer inside your computer: reading from
/dev/temperature yields one byte, the temperature in degrees
Fahrenheit. This works only if you have a WDT501P watchdog board
installed.

If you want to enable the Fan Tachometer on the WDT501P, then you
can do this via the tachometer parameter. Only do this if you have a
fan tachometer actually set up.

#
# PCI-based Watchdog Cards
#
Expand Down
8 changes: 4 additions & 4 deletions drivers/watchdog/acquirewdt.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Acquire Single Board Computer Watchdog Timer driver
*
* Based on wdt.c. Original copyright messages:
* Based on wdt.c. Original copyright messages:
*
* (c) Copyright 1996 Alan Cox <[email protected]>,
* All Rights Reserved.
Expand All @@ -17,9 +17,9 @@
*
* (c) Copyright 1995 Alan Cox <[email protected]>
*
* 14-Dec-2001 Matt Domsch <[email protected]>
* Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
* Can't add timeout - driver doesn't allow changing value
* 14-Dec-2001 Matt Domsch <[email protected]>
* Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
* Can't add timeout - driver doesn't allow changing value
*/

/*
Expand Down
7 changes: 5 additions & 2 deletions drivers/watchdog/advantechwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
.options = WDIOF_KEEPALIVEPING |
WDIOF_SETTIMEOUT |
WDIOF_MAGICCLOSE,
.firmware_version = 1,
.identity = WATCHDOG_NAME,
};
Expand Down Expand Up @@ -259,7 +261,8 @@ static int __devinit advwdt_probe(struct platform_device *dev)
goto unreg_stop;
}

/* Check that the heartbeat value is within it's range ; if not reset to the default */
/* Check that the heartbeat value is within it's range ;
* if not reset to the default */
if (advwdt_set_heartbeat(timeout)) {
advwdt_set_heartbeat(WATCHDOG_TIMEOUT);
printk(KERN_INFO PFX
Expand Down
20 changes: 10 additions & 10 deletions drivers/watchdog/alim1535_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static void ali_start(void)

pci_read_config_dword(ali_pci, 0xCC, &val);
val &= ~0x3F; /* Mask count */
val |= (1<<25) | ali_timeout_bits;
val |= (1 << 25) | ali_timeout_bits;
pci_write_config_dword(ali_pci, 0xCC, val);

spin_unlock(&ali_lock);
Expand All @@ -79,8 +79,8 @@ static void ali_stop(void)
spin_lock(&ali_lock);

pci_read_config_dword(ali_pci, 0xCC, &val);
val &= ~0x3F; /* Mask count to zero (disabled) */
val &= ~(1<<25);/* and for safety mask the reset enable */
val &= ~0x3F; /* Mask count to zero (disabled) */
val &= ~(1 << 25); /* and for safety mask the reset enable */
pci_write_config_dword(ali_pci, 0xCC, val);

spin_unlock(&ali_lock);
Expand All @@ -89,7 +89,7 @@ static void ali_stop(void)
/*
* ali_keepalive - send a keepalive to the watchdog
*
* Send a keepalive to the timer (actually we restart the timer).
* Send a keepalive to the timer (actually we restart the timer).
*/

static void ali_keepalive(void)
Expand All @@ -109,11 +109,11 @@ static int ali_settimer(int t)
if (t < 0)
return -EINVAL;
else if (t < 60)
ali_timeout_bits = t|(1<<6);
ali_timeout_bits = t|(1 << 6);
else if (t < 3600)
ali_timeout_bits = (t/60)|(1<<7);
ali_timeout_bits = (t / 60)|(1 << 7);
else if (t < 18000)
ali_timeout_bits = (t/300)|(1<<6)|(1<<7);
ali_timeout_bits = (t / 300)|(1 << 6)|(1 << 7);
else
return -EINVAL;

Expand All @@ -138,7 +138,7 @@ static int ali_settimer(int t)
*/

static ssize_t ali_write(struct file *file, const char __user *data,
size_t len, loff_t *ppos)
size_t len, loff_t *ppos)
{
/* See if we got the magic character 'V' and reload the timer */
if (len) {
Expand Down Expand Up @@ -348,9 +348,9 @@ static int __init ali_find_watchdog(void)
/* Timer bits */
wdog &= ~0x3F;
/* Issued events */
wdog &= ~((1<<27)|(1<<26)|(1<<25)|(1<<24));
wdog &= ~((1 << 27)|(1 << 26)|(1 << 25)|(1 << 24));
/* No monitor bits */
wdog &= ~((1<<16)|(1<<13)|(1<<12)|(1<<11)|(1<<10)|(1<<9));
wdog &= ~((1 << 16)|(1 << 13)|(1 << 12)|(1 << 11)|(1 << 10)|(1 << 9));

pci_write_config_dword(pdev, 0xCC, wdog);

Expand Down
6 changes: 4 additions & 2 deletions drivers/watchdog/alim7101_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ static int __init alim7101_wdt_init(void)
alim7101_pmu = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101,
NULL);
if (!alim7101_pmu) {
printk(KERN_INFO PFX "ALi M7101 PMU not present - WDT not set\n");
printk(KERN_INFO PFX
"ALi M7101 PMU not present - WDT not set\n");
return -EBUSY;
}

Expand Down Expand Up @@ -399,7 +400,8 @@ static int __init alim7101_wdt_init(void)

rc = misc_register(&wdt_miscdev);
if (rc) {
printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
printk(KERN_ERR PFX
"cannot register miscdev on minor=%d (err=%d)\n",
wdt_miscdev.minor, rc);
goto err_out_reboot;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/at91sam9_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static long at91_wdt_ioctl(struct file *file,
* Pat the watchdog whenever device is written to.
*/
static ssize_t at91_wdt_write(struct file *file, const char *data, size_t len,
loff_t *ppos)
loff_t *ppos)
{
if (!len)
return 0;
Expand Down
Loading

0 comments on commit 8690d8a

Please sign in to comment.