From: Marcelo Tosatti Date: Mon, 5 Dec 2005 21:31:36 +0000 (-0200) Subject: [PATCH] powerpc/8xx: Fix m8xx_wdt issues X-Git-Tag: v2.6.16-rc1~666^2~83 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=398f68580f3edd99728028facf571e4a07f9a035;p=linux-2.6-omap-h63xx.git [PATCH] powerpc/8xx: Fix m8xx_wdt issues The following fixes some issues with the last mpc8xx_wdt update: - Adds missing #include - Use "uint __iomem" pointer for in_be32/out_be32 Signed-off-by: Marcelo Tosatti Signed-off-by: Paul Mackerras --- diff --git a/drivers/char/watchdog/mpc8xx_wdt.c b/drivers/char/watchdog/mpc8xx_wdt.c index ac6fbace472..b2fc71e2085 100644 --- a/drivers/char/watchdog/mpc8xx_wdt.c +++ b/drivers/char/watchdog/mpc8xx_wdt.c @@ -18,6 +18,7 @@ #include #include #include +#include #include 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"); }