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: booke_wdt: fix build - unconstify watchdog_info watchdog: sbc_fitpc2_wdt: fixed "scheduling while atomic" bug. watchdog: sbc_fitpc2_wdt: fixed I/O operations order Watchdog: sb_wdog.c: Fix sibyte watchdog initialization
This commit is contained in:
@@ -121,7 +121,7 @@ static ssize_t booke_wdt_write(struct file *file, const char __user *buf,
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct watchdog_info ident = {
|
static struct watchdog_info ident = {
|
||||||
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
|
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
|
||||||
.identity = "PowerPC Book-E Watchdog",
|
.identity = "PowerPC Book-E Watchdog",
|
||||||
};
|
};
|
||||||
|
@@ -67,8 +67,8 @@ static DEFINE_SPINLOCK(sbwd_lock);
|
|||||||
void sbwdog_set(char __iomem *wdog, unsigned long t)
|
void sbwdog_set(char __iomem *wdog, unsigned long t)
|
||||||
{
|
{
|
||||||
spin_lock(&sbwd_lock);
|
spin_lock(&sbwd_lock);
|
||||||
__raw_writeb(0, wdog - 0x10);
|
__raw_writeb(0, wdog);
|
||||||
__raw_writeq(t & 0x7fffffUL, wdog);
|
__raw_writeq(t & 0x7fffffUL, wdog - 0x10);
|
||||||
spin_unlock(&sbwd_lock);
|
spin_unlock(&sbwd_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
static int nowayout = WATCHDOG_NOWAYOUT;
|
static int nowayout = WATCHDOG_NOWAYOUT;
|
||||||
static unsigned int margin = 60; /* (secs) Default is 1 minute */
|
static unsigned int margin = 60; /* (secs) Default is 1 minute */
|
||||||
static unsigned long wdt_status;
|
static unsigned long wdt_status;
|
||||||
static DEFINE_SPINLOCK(wdt_lock);
|
static DEFINE_MUTEX(wdt_lock);
|
||||||
|
|
||||||
#define WDT_IN_USE 0
|
#define WDT_IN_USE 0
|
||||||
#define WDT_OK_TO_CLOSE 1
|
#define WDT_OK_TO_CLOSE 1
|
||||||
@@ -45,26 +45,26 @@ static DEFINE_SPINLOCK(wdt_lock);
|
|||||||
|
|
||||||
static void wdt_send_data(unsigned char command, unsigned char data)
|
static void wdt_send_data(unsigned char command, unsigned char data)
|
||||||
{
|
{
|
||||||
outb(command, COMMAND_PORT);
|
|
||||||
msleep(100);
|
|
||||||
outb(data, DATA_PORT);
|
outb(data, DATA_PORT);
|
||||||
msleep(200);
|
msleep(200);
|
||||||
|
outb(command, COMMAND_PORT);
|
||||||
|
msleep(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wdt_enable(void)
|
static void wdt_enable(void)
|
||||||
{
|
{
|
||||||
spin_lock(&wdt_lock);
|
mutex_lock(&wdt_lock);
|
||||||
wdt_send_data(IFACE_ON_COMMAND, 1);
|
wdt_send_data(IFACE_ON_COMMAND, 1);
|
||||||
wdt_send_data(REBOOT_COMMAND, margin);
|
wdt_send_data(REBOOT_COMMAND, margin);
|
||||||
spin_unlock(&wdt_lock);
|
mutex_unlock(&wdt_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wdt_disable(void)
|
static void wdt_disable(void)
|
||||||
{
|
{
|
||||||
spin_lock(&wdt_lock);
|
mutex_lock(&wdt_lock);
|
||||||
wdt_send_data(IFACE_ON_COMMAND, 0);
|
wdt_send_data(IFACE_ON_COMMAND, 0);
|
||||||
wdt_send_data(REBOOT_COMMAND, 0);
|
wdt_send_data(REBOOT_COMMAND, 0);
|
||||||
spin_unlock(&wdt_lock);
|
mutex_unlock(&wdt_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fitpc2_wdt_open(struct inode *inode, struct file *file)
|
static int fitpc2_wdt_open(struct inode *inode, struct file *file)
|
||||||
|
Reference in New Issue
Block a user