]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[MIPS] MIPS Tech: Get rid of volatile in core code.
authorRalf Baechle <ralf@linux-mips.org>
Thu, 26 Apr 2007 14:46:24 +0000 (15:46 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 27 Apr 2007 15:20:24 +0000 (16:20 +0100)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mips-boards/generic/display.c
arch/mips/mips-boards/generic/reset.c
arch/mips/mips-boards/malta/malta_int.c
arch/mips/mips-boards/malta/malta_setup.c

index f653946afc23f64c82cd929971765eb513209fa1..548dbe5ce7c8c889447ee24df97e2987ceca5d28 100644 (file)
 
 void mips_display_message(const char *str)
 {
-       static volatile unsigned int *display = NULL;
+       static unsigned int __iomem *display = NULL;
        int i;
 
        if (unlikely(display == NULL))
-               display = (volatile unsigned int *)ioremap(ASCII_DISPLAY_POS_BASE, 16*sizeof(int));
+               display = ioremap(ASCII_DISPLAY_POS_BASE, 16*sizeof(int));
 
        for (i = 0; i <= 14; i=i+2) {
                 if (*str)
-                        display[i] = *str++;
+                        writel(*str++, display + i);
                 else
-                        display[i] = ' ';
+                        writel(' ', display + i);
        }
 }
index 0996ba368b2a26f32ad53f921e430798978ba4ad..7a1bb51f81ee150e1b5ec38d6b645da8bc1605c3 100644 (file)
@@ -39,24 +39,24 @@ 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;
+       writew(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;
+       writew(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
 
index 3c206bb171602ff3ce331586ee63a11fc7319825..38428566dce8b23ef84ac059cc3680e0a5f98531 100644 (file)
@@ -85,7 +85,7 @@ static inline int mips_pcibios_iack(void)
                dummy = BONITO_PCIMAP_CFG;
                iob();    /* sync */
 
-               irq = *(volatile u32 *)(_pcictrl_bonito_pcicfg);
+               irq = readl((u32 *)_pcictrl_bonito_pcicfg);
                iob();    /* sync */
                irq &= 0xff;
                BONITO_PCIMAP_CFG = 0;
index 56ea76679cd41d816313f0a1eec1b13c19a5900e..7873932532a10b9fc2c8186bf6bfdca2d6ef3923 100644 (file)
@@ -145,7 +145,8 @@ void __init plat_mem_setup(void)
 #ifdef CONFIG_BLK_DEV_IDE
        /* Check PCI clock */
        {
-               int jmpr = (*((volatile unsigned int *)ioremap(MALTA_JMPRS_REG, sizeof(unsigned int))) >> 2) & 0x07;
+               unsigned int __iomem *jmpr_p = (unsigned int *) ioremap(MALTA_JMPRS_REG, sizeof(unsigned int));
+               int jmpr = (readw(jmpr_p) >> 2) & 0x07;
                static const int pciclocks[] __initdata = {
                        33, 20, 25, 30, 12, 16, 37, 10
                };
@@ -179,7 +180,6 @@ void __init plat_mem_setup(void)
        };
 #endif
 #endif
-
        mips_reboot_setup();
 
        board_time_init = mips_time_init;