aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorMarcelo Tosatti <marcelo.tosatti@cyclades.com>2005-12-05 16:31:36 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 22:52:01 -0500
commit398f68580f3edd99728028facf571e4a07f9a035 (patch)
treec789dc4c5d71225c38748cc9d9af82c800951bc0 /drivers/char
parent237a0989e2902b7d43c4228a36d82f8691fb2118 (diff)
[PATCH] powerpc/8xx: Fix m8xx_wdt issues
The following fixes some issues with the last mpc8xx_wdt update: - Adds missing #include <asm/io.h> - Use "uint __iomem" pointer for in_be32/out_be32 Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/watchdog/mpc8xx_wdt.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/char/watchdog/mpc8xx_wdt.c b/drivers/char/watchdog/mpc8xx_wdt.c
index ac6fbace4724..b2fc71e20850 100644
--- a/drivers/char/watchdog/mpc8xx_wdt.c
+++ b/drivers/char/watchdog/mpc8xx_wdt.c
@@ -18,6 +18,7 @@
18#include <linux/watchdog.h> 18#include <linux/watchdog.h>
19#include <asm/8xx_immap.h> 19#include <asm/8xx_immap.h>
20#include <asm/uaccess.h> 20#include <asm/uaccess.h>
21#include <asm/io.h>
21#include <syslib/m8xx_wdt.h> 22#include <syslib/m8xx_wdt.h>
22 23
23static unsigned long wdt_opened; 24static unsigned long wdt_opened;
@@ -25,24 +26,26 @@ static int wdt_status;
25 26
26static void mpc8xx_wdt_handler_disable(void) 27static void mpc8xx_wdt_handler_disable(void)
27{ 28{
28 volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; 29 volatile uint __iomem *piscr;
30 piscr = (uint *)&((immap_t*)IMAP_ADDR)->im_sit.sit_piscr;
29 31
30 if (!m8xx_has_internal_rtc) 32 if (!m8xx_has_internal_rtc)
31 m8xx_wdt_stop_timer(); 33 m8xx_wdt_stop_timer();
32 else 34 else
33 out_be32(imap->im_sit.sit_piscr, in_be32(&imap->im_sit.sit_piscr) & ~(PISCR_PIE | PISCR_PTE)); 35 out_be32(piscr, in_be32(piscr) & ~(PISCR_PIE | PISCR_PTE));
34 36
35 printk(KERN_NOTICE "mpc8xx_wdt: keep-alive handler deactivated\n"); 37 printk(KERN_NOTICE "mpc8xx_wdt: keep-alive handler deactivated\n");
36} 38}
37 39
38static void mpc8xx_wdt_handler_enable(void) 40static void mpc8xx_wdt_handler_enable(void)
39{ 41{
40 volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; 42 volatile uint __iomem *piscr;
43 piscr = (uint *)&((immap_t*)IMAP_ADDR)->im_sit.sit_piscr;
41 44
42 if (!m8xx_has_internal_rtc) 45 if (!m8xx_has_internal_rtc)
43 m8xx_wdt_install_timer(); 46 m8xx_wdt_install_timer();
44 else 47 else
45 out_be32(&imap->im_sit.sit_piscr, in_be32(&imap->im_sit.sit_piscr) | PISCR_PIE | PISCR_PTE); 48 out_be32(piscr, in_be32(piscr) | PISCR_PIE | PISCR_PTE);
46 49
47 printk(KERN_NOTICE "mpc8xx_wdt: keep-alive handler activated\n"); 50 printk(KERN_NOTICE "mpc8xx_wdt: keep-alive handler activated\n");
48} 51}