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/pcwd.c | 2 | ||||
-rw-r--r-- | drivers/watchdog/shwdt.c | 24 | ||||
-rw-r--r-- | drivers/watchdog/txx9wdt.c | 2 |
5 files changed, 21 insertions, 17 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 32b9fe153641..db20542796bf 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 049c91895699..ca3dc043d786 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/pcwd.c b/drivers/watchdog/pcwd.c index 3b0ddc7fcf3f..9e1331a3b215 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/shwdt.c b/drivers/watchdog/shwdt.c index 824125adf90a..cdc7138be301 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 dbbc018a5f46..6adab77fbbb0 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) { |