diff options
author | Marcelo Tosatti <marcelo.tosatti@cyclades.com> | 2005-12-06 00:31:36 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-09 06:52:01 +0300 |
commit | 398f68580f3edd99728028facf571e4a07f9a035 (patch) | |
tree | c789dc4c5d71225c38748cc9d9af82c800951bc0 | |
parent | 237a0989e2902b7d43c4228a36d82f8691fb2118 (diff) | |
download | linux-398f68580f3edd99728028facf571e4a07f9a035.tar.xz |
[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>
-rw-r--r-- | drivers/char/watchdog/mpc8xx_wdt.c | 11 |
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 @@ #include <linux/watchdog.h> #include <asm/8xx_immap.h> #include <asm/uaccess.h> +#include <asm/io.h> #include <syslib/m8xx_wdt.h> static unsigned long wdt_opened; @@ -25,24 +26,26 @@ static int wdt_status; static void mpc8xx_wdt_handler_disable(void) { - volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; + volatile uint __iomem *piscr; + piscr = (uint *)&((immap_t*)IMAP_ADDR)->im_sit.sit_piscr; if (!m8xx_has_internal_rtc) m8xx_wdt_stop_timer(); else - out_be32(imap->im_sit.sit_piscr, in_be32(&imap->im_sit.sit_piscr) & ~(PISCR_PIE | PISCR_PTE)); + out_be32(piscr, in_be32(piscr) & ~(PISCR_PIE | PISCR_PTE)); printk(KERN_NOTICE "mpc8xx_wdt: keep-alive handler deactivated\n"); } static void mpc8xx_wdt_handler_enable(void) { - volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; + volatile uint __iomem *piscr; + piscr = (uint *)&((immap_t*)IMAP_ADDR)->im_sit.sit_piscr; if (!m8xx_has_internal_rtc) m8xx_wdt_install_timer(); else - out_be32(&imap->im_sit.sit_piscr, in_be32(&imap->im_sit.sit_piscr) | PISCR_PIE | PISCR_PTE); + out_be32(piscr, in_be32(piscr) | PISCR_PIE | PISCR_PTE); printk(KERN_NOTICE "mpc8xx_wdt: keep-alive handler activated\n"); } |