Commit d4bab1b0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] i6300esb.c: change platform_driver to pci_driver
  [WATCHDOG] i6300esb: fix unlock register with
  [WATCHDOG] drivers/watchdog/wdt.c:wdt_ioctl(): make `ident' non-static
  [WATCHDOG] change reboot_notifier to platform-shutdown method.
  [WATCHDOG] watchdog_info constify
  [WATCHDOG] gef_wdt: Author corrections following split of GE Fanuc joint venture
  [WATCHDOG] iTCO_wdt: clean up probe(), modify err msg
  [WATCHDOG] ep93xx: watchdog timer driver for TS-72xx SBCs cleanup
  [WATCHDOG] support for max63xx watchdog timer chips
  [WATCHDOG] ep93xx: added platform side support for TS-72xx WDT driver
  [WATCHDOG] ep93xx: implemented watchdog timer driver for TS-72xx SBCs
parents 56b78921 2786095a
......@@ -65,6 +65,8 @@
#define TS72XX_RTC_DATA_PHYS_BASE 0x11700000
#define TS72XX_RTC_DATA_SIZE 0x00001000
#define TS72XX_WDT_CONTROL_PHYS_BASE 0x23800000
#define TS72XX_WDT_FEED_PHYS_BASE 0x23c00000
#ifndef __ASSEMBLY__
......
......@@ -166,6 +166,26 @@ static struct platform_device ts72xx_rtc_device = {
.num_resources = 0,
};
static struct resource ts72xx_wdt_resources[] = {
{
.start = TS72XX_WDT_CONTROL_PHYS_BASE,
.end = TS72XX_WDT_CONTROL_PHYS_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
{
.start = TS72XX_WDT_FEED_PHYS_BASE,
.end = TS72XX_WDT_FEED_PHYS_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
};
static struct platform_device ts72xx_wdt_device = {
.name = "ts72xx-wdt",
.id = -1,
.num_resources = ARRAY_SIZE(ts72xx_wdt_resources),
.resource = ts72xx_wdt_resources,
};
static struct ep93xx_eth_data ts72xx_eth_data = {
.phy_id = 1,
};
......@@ -175,6 +195,7 @@ static void __init ts72xx_init_machine(void)
ep93xx_init_devices();
ts72xx_register_flash();
platform_device_register(&ts72xx_rtc_device);
platform_device_register(&ts72xx_wdt_device);
ep93xx_register_eth(&ts72xx_eth_data, 1);
}
......
......@@ -553,7 +553,7 @@ static ssize_t mpc52xx_wdt_write(struct file *file, const char __user *data,
return 0;
}
static struct watchdog_info mpc5200_wdt_info = {
static const struct watchdog_info mpc5200_wdt_info = {
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
.identity = WDT_IDENTITY,
};
......
......@@ -55,6 +55,11 @@ config SOFT_WATCHDOG
To compile this driver as a module, choose M here: the
module will be called softdog.
config MAX63XX_WATCHDOG
tristate "Max63xx watchdog"
help
Support for memory mapped max63{69,70,71,72,73,74} watchdog timer.
config WM831X_WATCHDOG
tristate "WM831x watchdog"
depends on MFD_WM831X
......@@ -289,6 +294,17 @@ config ADX_WATCHDOG
Say Y here if you want support for the watchdog timer on Avionic
Design Xanthos boards.
config TS72XX_WATCHDOG
tristate "TS-72XX SBC Watchdog"
depends on MACH_TS72XX
help
Technologic Systems TS-7200, TS-7250 and TS-7260 boards have
watchdog timer implemented in a external CPLD chip. Say Y here
if you want to support for the watchdog timer on TS-72XX boards.
To compile this driver as a module, choose M here: the
module will be called ts72xx_wdt.
# AVR32 Architecture
config AT32AP700X_WDT
......@@ -845,10 +861,10 @@ config TXX9_WDT
# POWERPC Architecture
config GEF_WDT
tristate "GE Fanuc Watchdog Timer"
tristate "GE Watchdog Timer"
depends on GEF_SBC610 || GEF_SBC310 || GEF_PPC9A
---help---
Watchdog timer found in a number of GE Fanuc single board computers.
Watchdog timer found in a number of GE single board computers.
config MPC5200_WDT
bool "MPC52xx Watchdog Timer"
......
......@@ -46,6 +46,7 @@ obj-$(CONFIG_COH901327_WATCHDOG) += coh901327_wdt.o
obj-$(CONFIG_STMP3XXX_WATCHDOG) += stmp3xxx_wdt.o
obj-$(CONFIG_NUC900_WATCHDOG) += nuc900_wdt.o
obj-$(CONFIG_ADX_WATCHDOG) += adx_wdt.o
obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o
# AVR32 Architecture
obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
......@@ -142,4 +143,5 @@ obj-$(CONFIG_WATCHDOG_CP1XXX) += cpwd.o
# Architecture Independant
obj-$(CONFIG_WM831X_WATCHDOG) += wm831x_wdt.o
obj-$(CONFIG_WM8350_WATCHDOG) += wm8350_wdt.o
obj-$(CONFIG_MAX63XX_WATCHDOG) += max63xx_wdt.o
obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o
......@@ -150,7 +150,7 @@ static long acq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
int options, retval = -EINVAL;
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
.firmware_version = 1,
.identity = WATCHDOG_NAME,
......
......@@ -137,7 +137,7 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
int new_timeout;
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING |
WDIOF_SETTIMEOUT |
WDIOF_MAGICCLOSE,
......
......@@ -37,7 +37,7 @@ struct adx_wdt {
spinlock_t lock;
};
static struct watchdog_info adx_wdt_info = {
static const struct watchdog_info adx_wdt_info = {
.identity = "Avionic Design Xanthos Watchdog",
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
};
......
......@@ -180,7 +180,7 @@ static long ali_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 = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING |
WDIOF_SETTIMEOUT |
WDIOF_MAGICCLOSE,
......
......@@ -238,7 +238,7 @@ static long fop_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 = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT
| WDIOF_MAGICCLOSE,
.firmware_version = 1,
......
......@@ -219,7 +219,7 @@ static ssize_t ar7_wdt_write(struct file *file, const char *data,
static long ar7_wdt_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.identity = LONGNAME,
.firmware_version = 1,
.options = (WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING |
......
......@@ -202,7 +202,7 @@ static int at32_wdt_get_status(void)
return status;
}
static struct watchdog_info at32_wdt_info = {
static const struct watchdog_info at32_wdt_info = {
.identity = "at32ap700x watchdog",
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
......
......@@ -121,7 +121,7 @@ static int at91_wdt_settimeout(int new_time)
return 0;
}
static struct watchdog_info at91_wdt_info = {
static const struct watchdog_info at91_wdt_info = {
.identity = "at91 watchdog",
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
};
......
......@@ -149,7 +149,7 @@ static ssize_t bcm47xx_wdt_write(struct file *file, const char __user *data,
return len;
}
static struct watchdog_info bcm47xx_wdt_info = {
static const struct watchdog_info bcm47xx_wdt_info = {
.identity = DRV_NAME,
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
......
......@@ -19,8 +19,6 @@
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/fs.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/uaccess.h>
......@@ -74,7 +72,7 @@
static unsigned int timeout = WATCHDOG_TIMEOUT;
static int nowayout = WATCHDOG_NOWAYOUT;
static struct watchdog_info bfin_wdt_info;
static const struct watchdog_info bfin_wdt_info;
static unsigned long open_check;
static char expect_close;
static DEFINE_SPINLOCK(bfin_wdt_spinlock);
......@@ -309,26 +307,6 @@ static long bfin_wdt_ioctl(struct file *file,
}
}
/**
* bfin_wdt_notify_sys - Notifier Handler
* @this: notifier block
* @code: notifier event
* @unused: unused
*
* Handles specific events, such as turning off the watchdog during a
* shutdown event.
*/
static int bfin_wdt_notify_sys(struct notifier_block *this,
unsigned long code, void *unused)
{
stampit();
if (code == SYS_DOWN || code == SYS_HALT)
bfin_wdt_stop();
return NOTIFY_DONE;
}
#ifdef CONFIG_PM
static int state_before_suspend;
......@@ -388,40 +366,28 @@ static struct miscdevice bfin_wdt_miscdev = {
.fops = &bfin_wdt_fops,
};
static struct watchdog_info bfin_wdt_info = {
static const struct watchdog_info bfin_wdt_info = {
.identity = "Blackfin Watchdog",
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE,
};
static struct notifier_block bfin_wdt_notifier = {
.notifier_call = bfin_wdt_notify_sys,
};
/**
* bfin_wdt_probe - Initialize module
*
* Registers the misc device and notifier handler. Actual device
* Registers the misc device. Actual device
* initialization is handled by bfin_wdt_open().
*/
static int __devinit bfin_wdt_probe(struct platform_device *pdev)
{
int ret;
ret = register_reboot_notifier(&bfin_wdt_notifier);
if (ret) {
pr_devinit(KERN_ERR PFX
"cannot register reboot notifier (err=%d)\n", ret);
return ret;
}
ret = misc_register(&bfin_wdt_miscdev);
if (ret) {
pr_devinit(KERN_ERR PFX
"cannot register miscdev on minor=%d (err=%d)\n",
WATCHDOG_MINOR, ret);
unregister_reboot_notifier(&bfin_wdt_notifier);
return ret;
}
......@@ -434,21 +400,33 @@ static int __devinit bfin_wdt_probe(struct platform_device *pdev)
/**
* bfin_wdt_remove - Initialize module
*
* Unregisters the misc device and notifier handler. Actual device
* Unregisters the misc device. Actual device
* deinitialization is handled by bfin_wdt_close().
*/
static int __devexit bfin_wdt_remove(struct platform_device *pdev)
{
misc_deregister(&bfin_wdt_miscdev);
unregister_reboot_notifier(&bfin_wdt_notifier);
return 0;
}
/**
* bfin_wdt_shutdown - Soft Shutdown Handler
*
* Handles the soft shutdown event.
*/
static void bfin_wdt_shutdown(struct platform_device *pdev)
{
stampit();
bfin_wdt_stop();
}
static struct platform_device *bfin_wdt_device;
static struct platform_driver bfin_wdt_driver = {
.probe = bfin_wdt_probe,
.remove = __devexit_p(bfin_wdt_remove),
.shutdown = bfin_wdt_shutdown,
.suspend = bfin_wdt_suspend,
.resume = bfin_wdt_resume,
.driver = {
......
......@@ -121,7 +121,7 @@ static ssize_t booke_wdt_write(struct file *file, const char __user *buf,
return count;
}
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
.identity = "PowerPC Book-E Watchdog",
};
......
......@@ -257,7 +257,7 @@ static long coh901327_ioctl(struct file *file, unsigned int cmd,
struct watchdog_info __user *ident;
int __user *i;
} uarg;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_CARDRESET |
WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING,
......
......@@ -154,7 +154,7 @@ static long cpu5wdt_ioctl(struct file *file, unsigned int cmd,
void __user *argp = (void __user *)arg;
int __user *p = argp;
unsigned int value;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_CARDRESET,
.identity = "CPU5 WDT",
};
......
......@@ -403,7 +403,7 @@ static int cpwd_release(struct inode *inode, struct file *file)
static long cpwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
static struct watchdog_info info = {
static const struct watchdog_info info = {
.options = WDIOF_SETTIMEOUT,
.firmware_version = 1,
.identity = DRIVER_NAME,
......
......@@ -142,7 +142,7 @@ davinci_wdt_write(struct file *file, const char *data, size_t len,
return len;
}
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING,
.identity = "DaVinci Watchdog",
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment