diff options
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/Kconfig | 5 | ||||
-rw-r--r-- | drivers/watchdog/Makefile | 5 | ||||
-rw-r--r-- | drivers/watchdog/at91rm9200_wdt.c | 5 | ||||
-rw-r--r-- | drivers/watchdog/davinci_wdt.c | 3 | ||||
-rw-r--r-- | drivers/watchdog/ep93xx_wdt.c | 3 | ||||
-rw-r--r-- | drivers/watchdog/iop_wdt.c | 2 | ||||
-rw-r--r-- | drivers/watchdog/ixp2000_wdt.c | 3 | ||||
-rw-r--r-- | drivers/watchdog/ixp4xx_wdt.c | 5 | ||||
-rw-r--r-- | drivers/watchdog/ks8695_wdt.c | 3 | ||||
-rw-r--r-- | drivers/watchdog/omap_wdt.c | 5 | ||||
-rw-r--r-- | drivers/watchdog/pcwd.c | 2 | ||||
-rw-r--r-- | drivers/watchdog/pnx4008_wdt.c | 3 | ||||
-rw-r--r-- | drivers/watchdog/s3c2410_wdt.c | 2 | ||||
-rw-r--r-- | drivers/watchdog/sa1100_wdt.c | 8 | ||||
-rw-r--r-- | drivers/watchdog/shwdt.c | 24 | ||||
-rw-r--r-- | drivers/watchdog/txx9wdt.c | 2 | ||||
-rw-r--r-- | drivers/watchdog/wdt285.c | 4 |
17 files changed, 41 insertions, 43 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 32b9fe15364..db20542796b 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -285,10 +285,11 @@ config ALIM1535_WDT config ALIM7101_WDT tristate "ALi M7101 PMU Computer Watchdog" - depends on X86 && PCI + depends on PCI help This is the driver for the hardware watchdog on the ALi M7101 PMU - as used in the x86 Cobalt servers. + as used in the x86 Cobalt servers and also found in some + SPARC Netra servers too. To compile this driver as a module, choose M here: the module will be called alim7101_wdt. diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index 049c9189569..ca3dc043d78 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -66,7 +66,10 @@ obj-$(CONFIG_IB700_WDT) += ib700wdt.o obj-$(CONFIG_IBMASR) += ibmasr.o obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o obj-$(CONFIG_I6300ESB_WDT) += i6300esb.o -obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o iTCO_vendor_support.o +obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o +ifeq ($(CONFIG_ITCO_VENDOR_SUPPORT),y) +obj-$(CONFIG_ITCO_WDT) += iTCO_vendor_support.o +endif obj-$(CONFIG_IT8712F_WDT) += it8712f_wdt.o obj-$(CONFIG_HP_WATCHDOG) += hpwdt.o obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c index 2313f44144f..d061f0ad2d2 100644 --- a/drivers/watchdog/at91rm9200_wdt.c +++ b/drivers/watchdog/at91rm9200_wdt.c @@ -21,8 +21,7 @@ #include <linux/types.h> #include <linux/watchdog.h> #include <linux/uaccess.h> -#include <asm/arch/at91_st.h> - +#include <mach/at91_st.h> #define WDT_DEFAULT_TIME 5 /* seconds */ #define WDT_MAX_TIME 256 /* seconds */ @@ -129,7 +128,7 @@ static struct watchdog_info at91_wdt_info = { /* * Handle commands from user-space. */ -static long at91_wdt_ioct(struct file *file, +static long at91_wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index 802aeba347a..2e136028673 100644 --- a/drivers/watchdog/davinci_wdt.c +++ b/drivers/watchdog/davinci_wdt.c @@ -24,8 +24,7 @@ #include <linux/spinlock.h> #include <linux/uaccess.h> #include <linux/io.h> - -#include <asm/hardware.h> +#include <mach/hardware.h> #define MODULE_NAME "DAVINCI-WDT: " diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c index 07b74a76892..e9f950ff86e 100644 --- a/drivers/watchdog/ep93xx_wdt.c +++ b/drivers/watchdog/ep93xx_wdt.c @@ -29,8 +29,7 @@ #include <linux/watchdog.h> #include <linux/timer.h> #include <linux/uaccess.h> - -#include <asm/hardware.h> +#include <mach/hardware.h> #define WDT_VERSION "0.3" #define PFX "ep93xx_wdt: " diff --git a/drivers/watchdog/iop_wdt.c b/drivers/watchdog/iop_wdt.c index 8278b13f77c..96eb2cbe587 100644 --- a/drivers/watchdog/iop_wdt.c +++ b/drivers/watchdog/iop_wdt.c @@ -32,7 +32,7 @@ #include <linux/miscdevice.h> #include <linux/watchdog.h> #include <linux/uaccess.h> -#include <asm/hardware.h> +#include <mach/hardware.h> static int nowayout = WATCHDOG_NOWAYOUT; static unsigned long wdt_status; diff --git a/drivers/watchdog/ixp2000_wdt.c b/drivers/watchdog/ixp2000_wdt.c index a77f69d5287..4f4b35a20d8 100644 --- a/drivers/watchdog/ixp2000_wdt.c +++ b/drivers/watchdog/ixp2000_wdt.c @@ -26,8 +26,7 @@ #include <linux/init.h> #include <linux/bitops.h> #include <linux/uaccess.h> - -#include <asm/hardware.h> +#include <mach/hardware.h> static int nowayout = WATCHDOG_NOWAYOUT; static unsigned int heartbeat = 60; /* (secs) Default is 1 minute */ diff --git a/drivers/watchdog/ixp4xx_wdt.c b/drivers/watchdog/ixp4xx_wdt.c index ef3157dc9ac..8302ef005be 100644 --- a/drivers/watchdog/ixp4xx_wdt.c +++ b/drivers/watchdog/ixp4xx_wdt.c @@ -23,14 +23,13 @@ #include <linux/init.h> #include <linux/bitops.h> #include <linux/uaccess.h> - -#include <asm/hardware.h> +#include <mach/hardware.h> static int nowayout = WATCHDOG_NOWAYOUT; static int heartbeat = 60; /* (secs) Default is 1 minute */ static unsigned long wdt_status; static unsigned long boot_status; -static spin_lock_t wdt_lock; +static DEFINE_SPINLOCK(wdt_lock); #define WDT_TICK_RATE (IXP4XX_PERIPHERAL_BUS_CLOCK * 1000000UL) diff --git a/drivers/watchdog/ks8695_wdt.c b/drivers/watchdog/ks8695_wdt.c index f8566d5c62f..0b798fdaa37 100644 --- a/drivers/watchdog/ks8695_wdt.c +++ b/drivers/watchdog/ks8695_wdt.c @@ -21,8 +21,7 @@ #include <linux/watchdog.h> #include <linux/io.h> #include <linux/uaccess.h> -#include <asm/arch/regs-timer.h> - +#include <mach/regs-timer.h> #define WDT_DEFAULT_TIME 5 /* seconds */ #define WDT_MAX_TIME 171 /* seconds */ diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index 6f5420f478a..3a11dadfd8e 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c @@ -42,9 +42,8 @@ #include <linux/bitops.h> #include <linux/io.h> #include <linux/uaccess.h> -#include <linux/hardware.h> - -#include <asm/arch/prcm.h> +#include <mach/hardware.h> +#include <mach/prcm.h> #include "omap_wdt.h" diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c index 3b0ddc7fcf3..9e1331a3b21 100644 --- a/drivers/watchdog/pcwd.c +++ b/drivers/watchdog/pcwd.c @@ -168,7 +168,7 @@ static const int heartbeat_tbl[] = { static int cards_found; /* internal variables */ -static atomic_t open_allowed = ATOMIC_INIT(1); +static unsigned long open_allowed; static char expect_close; static int temp_panic; diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index 6eadf5ebb9b..0ed84162437 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c @@ -30,8 +30,7 @@ #include <linux/spinlock.h> #include <linux/uaccess.h> #include <linux/io.h> - -#include <asm/hardware.h> +#include <mach/hardware.h> #define MODULE_NAME "PNX4008-WDT: " diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index c417fb5e913..3da2b90d2fe 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -49,7 +49,7 @@ #include <linux/uaccess.h> #include <linux/io.h> -#include <asm/arch/map.h> +#include <mach/map.h> #undef S3C_VA_WATCHDOG #define S3C_VA_WATCHDOG (0) diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c index 27d6898a7c9..31a48437dc3 100644 --- a/drivers/watchdog/sa1100_wdt.c +++ b/drivers/watchdog/sa1100_wdt.c @@ -29,10 +29,11 @@ #include <linux/uaccess.h> #ifdef CONFIG_ARCH_PXA -#include <asm/arch/pxa-regs.h> +#include <mach/pxa-regs.h> #endif -#include <asm/hardware.h> +#include <mach/reset.h> +#include <mach/hardware.h> #define OSCR_FREQ CLOCK_TICK_RATE @@ -159,7 +160,8 @@ static int __init sa1100dog_init(void) * we suspend, RCSR will be cleared, and the watchdog * reset reason will be lost. */ - boot_status = (RCSR & RCSR_WDR) ? WDIOF_CARDRESET : 0; + boot_status = (reset_status & RESET_STATUS_WATCHDOG) ? + WDIOF_CARDRESET : 0; pre_margin = OSCR_FREQ * margin; ret = misc_register(&sa1100dog_miscdev); diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c index 824125adf90..cdc7138be30 100644 --- a/drivers/watchdog/shwdt.c +++ b/drivers/watchdog/shwdt.c @@ -30,7 +30,7 @@ #include <linux/mm.h> #include <linux/io.h> #include <linux/uaccess.h> -#include <linux/watchdog.h> +#include <asm/watchdog.h> #define PFX "shwdt: " @@ -68,7 +68,7 @@ static int clock_division_ratio = WTCSR_CKS_4096; static void sh_wdt_ping(unsigned long data); static unsigned long shwdt_is_open; -static struct watchdog_info sh_wdt_info; +static const struct watchdog_info sh_wdt_info; static char shwdt_expect_close; static DEFINE_TIMER(timer, sh_wdt_ping, 0, 0); static unsigned long next_heartbeat; @@ -89,7 +89,7 @@ static void sh_wdt_start(void) __u8 csr; unsigned long flags; - spin_lock_irqsave(&wdt_lock, flags); + spin_lock_irqsave(&shwdt_lock, flags); next_heartbeat = jiffies + (heartbeat * HZ); mod_timer(&timer, next_ping_period(clock_division_ratio)); @@ -127,7 +127,7 @@ static void sh_wdt_start(void) csr &= ~RSTCSR_RSTS; sh_wdt_write_rstcsr(csr); #endif - spin_unlock_irqrestore(&wdt_lock, flags); + spin_unlock_irqrestore(&shwdt_lock, flags); } /** @@ -139,14 +139,14 @@ static void sh_wdt_stop(void) __u8 csr; unsigned long flags; - spin_lock_irqsave(&wdt_lock, flags); + spin_lock_irqsave(&shwdt_lock, flags); del_timer(&timer); csr = sh_wdt_read_csr(); csr &= ~WTCSR_TME; sh_wdt_write_csr(csr); - spin_unlock_irqrestore(&wdt_lock, flags); + spin_unlock_irqrestore(&shwdt_lock, flags); } /** @@ -157,9 +157,9 @@ static inline void sh_wdt_keepalive(void) { unsigned long flags; - spin_lock_irqsave(&wdt_lock, flags); + spin_lock_irqsave(&shwdt_lock, flags); next_heartbeat = jiffies + (heartbeat * HZ); - spin_unlock_irqrestore(&wdt_lock, flags); + spin_unlock_irqrestore(&shwdt_lock, flags); } /** @@ -173,9 +173,9 @@ static int sh_wdt_set_heartbeat(int t) if (unlikely(t < 1 || t > 3600)) /* arbitrary upper limit */ return -EINVAL; - spin_lock_irqsave(&wdt_lock, flags); + spin_lock_irqsave(&shwdt_lock, flags); heartbeat = t; - spin_unlock_irqrestore(&wdt_lock, flags); + spin_unlock_irqrestore(&shwdt_lock, flags); return 0; } @@ -189,7 +189,7 @@ static void sh_wdt_ping(unsigned long data) { unsigned long flags; - spin_lock_irqsave(&wdt_lock, flags); + spin_lock_irqsave(&shwdt_lock, flags); if (time_before(jiffies, next_heartbeat)) { __u8 csr; @@ -203,7 +203,7 @@ static void sh_wdt_ping(unsigned long data) } else printk(KERN_WARNING PFX "Heartbeat lost! Will not ping " "the watchdog\n"); - spin_unlock_irqrestore(&wdt_lock, flags); + spin_unlock_irqrestore(&shwdt_lock, flags); } /** diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c index dbbc018a5f4..6adab77fbbb 100644 --- a/drivers/watchdog/txx9wdt.c +++ b/drivers/watchdog/txx9wdt.c @@ -45,7 +45,7 @@ static unsigned long txx9wdt_alive; static int expect_close; static struct txx9_tmr_reg __iomem *txx9wdt_reg; static struct clk *txx9_imclk; -static DECLARE_LOCK(txx9_lock); +static DEFINE_SPINLOCK(txx9_lock); static void txx9wdt_ping(void) { diff --git a/drivers/watchdog/wdt285.c b/drivers/watchdog/wdt285.c index fea398a4ca3..db362c34958 100644 --- a/drivers/watchdog/wdt285.c +++ b/drivers/watchdog/wdt285.c @@ -28,8 +28,8 @@ #include <linux/interrupt.h> #include <linux/uaccess.h> #include <linux/irq.h> +#include <mach/hardware.h> -#include <asm/hardware.h> #include <asm/mach-types.h> #include <asm/hardware/dec21285.h> @@ -208,7 +208,7 @@ static int __init footbridge_watchdog_init(void) soft_margin); if (machine_is_cats()) - printk(KERN_WARN + printk(KERN_WARNING "Warning: Watchdog reset may not work on this machine.\n"); return 0; } |