aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorTom Rini <trini@kernel.crashing.org>2005-04-16 18:24:23 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:24:23 -0400
commitfd16230a05751af5a221a1f1c988bb519fd66679 (patch)
treedbe3fd46c4bbe02a96d97e2599733287f455cfd3 /arch/ppc
parentf50b153b1966230e78034d5ab1641ca4bb5db56d (diff)
[PATCH] ppc32: Fix mpc8xx watchdog
The CONFIG_8xx_WDT option got broken in the generic hardirq update as ppc32 had its own different request_irq that worked when other arches used setup_irq. This is the trivial fix for the problem. From: Carsten Juttner <carjay@gmx.net> Signed-off-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/syslib/m8xx_wdt.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/ppc/syslib/m8xx_wdt.c b/arch/ppc/syslib/m8xx_wdt.c
index 7838a44bfd1d..2ddc857e7fc7 100644
--- a/arch/ppc/syslib/m8xx_wdt.c
+++ b/arch/ppc/syslib/m8xx_wdt.c
@@ -11,6 +11,7 @@
11 11
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/interrupt.h> 13#include <linux/interrupt.h>
14#include <linux/irq.h>
14#include <linux/kernel.h> 15#include <linux/kernel.h>
15#include <linux/sched.h> 16#include <linux/sched.h>
16#include <asm/8xx_immap.h> 17#include <asm/8xx_immap.h>
@@ -18,6 +19,12 @@
18 19
19static int wdt_timeout; 20static int wdt_timeout;
20 21
22static irqreturn_t m8xx_wdt_interrupt(int, void *, struct pt_regs *);
23static struct irqaction m8xx_wdt_irqaction = {
24 .handler = m8xx_wdt_interrupt,
25 .name = "watchdog",
26};
27
21void m8xx_wdt_reset(void) 28void m8xx_wdt_reset(void)
22{ 29{
23 volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; 30 volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR;
@@ -84,8 +91,8 @@ void __init m8xx_wdt_handler_install(bd_t * binfo)
84 imap->im_sit.sit_piscr = 91 imap->im_sit.sit_piscr =
85 (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE; 92 (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE;
86 93
87 if (request_irq(PIT_INTERRUPT, m8xx_wdt_interrupt, 0, "watchdog", NULL)) 94 if (setup_irq(PIT_INTERRUPT, &m8xx_wdt_irqaction))
88 panic("m8xx_wdt: could not allocate watchdog irq!"); 95 panic("m8xx_wdt: error setting up the watchdog irq!");
89 96
90 printk(KERN_NOTICE 97 printk(KERN_NOTICE
91 "m8xx_wdt: keep-alive trigger installed (PITC: 0x%04X)\n", pitc); 98 "m8xx_wdt: keep-alive trigger installed (PITC: 0x%04X)\n", pitc);