diff options
-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 @@ | |||
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 | ||
23 | static unsigned long wdt_opened; | 24 | static unsigned long wdt_opened; |
@@ -25,24 +26,26 @@ static int wdt_status; | |||
25 | 26 | ||
26 | static void mpc8xx_wdt_handler_disable(void) | 27 | static 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 | ||
38 | static void mpc8xx_wdt_handler_enable(void) | 40 | static 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 | } |