Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
[pandora-kernel.git] / arch / mips / mips-boards / generic / reset.c
index 7213c39..583d468 100644 (file)
@@ -22,7 +22,6 @@
  * Reset the MIPS boards.
  *
  */
-#include <linux/config.h>
 #include <linux/pm.h>
 
 #include <asm/io.h>
@@ -40,24 +39,26 @@ static void atlas_machine_power_off(void);
 
 static void mips_machine_restart(char *command)
 {
-        volatile unsigned int *softres_reg = (unsigned int *)ioremap (SOFTRES_REG, sizeof(unsigned int));
+       unsigned int __iomem *softres_reg =
+               ioremap(SOFTRES_REG, sizeof(unsigned int));
 
-       *softres_reg = GORESET;
+       __raw_writel(GORESET, softres_reg);
 }
 
 static void mips_machine_halt(void)
 {
-        volatile unsigned int *softres_reg = (unsigned int *)ioremap (SOFTRES_REG, sizeof(unsigned int));
+       unsigned int __iomem *softres_reg =
+               ioremap(SOFTRES_REG, sizeof(unsigned int));
 
-       *softres_reg = GORESET;
+       __raw_writel(GORESET, softres_reg);
 }
 
 #if defined(CONFIG_MIPS_ATLAS)
 static void atlas_machine_power_off(void)
 {
-        volatile unsigned int *psustby_reg = (unsigned int *)ioremap(ATLAS_PSUSTBY_REG, sizeof(unsigned int));
+       unsigned int __iomem *psustby_reg = ioremap(ATLAS_PSUSTBY_REG, sizeof(unsigned int));
 
-       *psustby_reg = ATLAS_GOSTBY;
+       writew(ATLAS_GOSTBY, psustby_reg);
 }
 #endif