diff options
author | Marcelo Tosatti <marcelo.tosatti@cyclades.com> | 2005-11-05 10:01:16 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-06 20:36:42 -0500 |
commit | c6d95044a2e124b606b78896a3a2d512e90ef65c (patch) | |
tree | 1b83a1f83df6895c26962e4deeb49d06c60187df /arch/ppc/syslib/m8xx_wdt.c | |
parent | 9d2ba6faa1c2e10546a4bdf0f9687436d7681b2f (diff) |
[PATCH] ppc32 8xx: fix m8xx_wdt accessor macro update
The following patch against m8xx_wdt.c adds <asm/io.h> (required for
out,in_be32/16) and fixes syntatic problems introduced with the IO
accessor macro update.
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/syslib/m8xx_wdt.c')
-rw-r--r-- | arch/ppc/syslib/m8xx_wdt.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/ppc/syslib/m8xx_wdt.c b/arch/ppc/syslib/m8xx_wdt.c index c5ac5ce5d7d2..a21632d37e5a 100644 --- a/arch/ppc/syslib/m8xx_wdt.c +++ b/arch/ppc/syslib/m8xx_wdt.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <asm/io.h> | ||
17 | #include <asm/8xx_immap.h> | 18 | #include <asm/8xx_immap.h> |
18 | #include <syslib/m8xx_wdt.h> | 19 | #include <syslib/m8xx_wdt.h> |
19 | 20 | ||
@@ -29,8 +30,8 @@ void m8xx_wdt_reset(void) | |||
29 | { | 30 | { |
30 | volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; | 31 | volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; |
31 | 32 | ||
32 | out_be16(imap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ | 33 | out_be16(&imap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ |
33 | out_be16(imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ | 34 | out_be16(&imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ |
34 | } | 35 | } |
35 | 36 | ||
36 | static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) | 37 | static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) |
@@ -39,7 +40,7 @@ static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) | |||
39 | 40 | ||
40 | m8xx_wdt_reset(); | 41 | m8xx_wdt_reset(); |
41 | 42 | ||
42 | out_be16(imap->im_sit.sit_piscr, in_be16(imap->im_sit.sit_piscr | PISCR_PS)); /* clear irq */ | 43 | out_be16(&imap->im_sit.sit_piscr, in_be16(&imap->im_sit.sit_piscr) | PISCR_PS); /* clear irq */ |
43 | 44 | ||
44 | return IRQ_HANDLED; | 45 | return IRQ_HANDLED; |
45 | } | 46 | } |
@@ -51,7 +52,7 @@ void __init m8xx_wdt_handler_install(bd_t * binfo) | |||
51 | u32 sypcr; | 52 | u32 sypcr; |
52 | u32 pitrtclk; | 53 | u32 pitrtclk; |
53 | 54 | ||
54 | sypcr = in_be32(imap->im_siu_conf.sc_sypcr); | 55 | sypcr = in_be32(&imap->im_siu_conf.sc_sypcr); |
55 | 56 | ||
56 | if (!(sypcr & 0x04)) { | 57 | if (!(sypcr & 0x04)) { |
57 | printk(KERN_NOTICE "m8xx_wdt: wdt disabled (SYPCR: 0x%08X)\n", | 58 | printk(KERN_NOTICE "m8xx_wdt: wdt disabled (SYPCR: 0x%08X)\n", |
@@ -87,9 +88,9 @@ void __init m8xx_wdt_handler_install(bd_t * binfo) | |||
87 | else | 88 | else |
88 | pitc = pitrtclk * wdt_timeout / binfo->bi_intfreq / 2; | 89 | pitc = pitrtclk * wdt_timeout / binfo->bi_intfreq / 2; |
89 | 90 | ||
90 | out_be32(imap->im_sit.sit_pitc, pitc << 16); | 91 | out_be32(&imap->im_sit.sit_pitc, pitc << 16); |
91 | 92 | ||
92 | out_be16(imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE); | 93 | out_be16(&imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE); |
93 | 94 | ||
94 | if (setup_irq(PIT_INTERRUPT, &m8xx_wdt_irqaction)) | 95 | if (setup_irq(PIT_INTERRUPT, &m8xx_wdt_irqaction)) |
95 | panic("m8xx_wdt: error setting up the watchdog irq!"); | 96 | panic("m8xx_wdt: error setting up the watchdog irq!"); |