Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / m32r / boot / compressed / m32r_sio.c
index bad5475..8f9a572 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <linux/config.h>
+#include <asm/processor.h>
 
 static void putc(char c);
 
@@ -38,16 +39,17 @@ static int puts(const char *s)
 
 static void putc(char c)
 {
-
-       while ((*BOOT_SIO0STS & 0x3) != 0x3) ;
+       while ((*BOOT_SIO0STS & 0x3) != 0x3)
+               cpu_relax();
        if (c == '\n') {
                *BOOT_SIO0TXB = '\r';
-               while ((*BOOT_SIO0STS & 0x3) != 0x3) ;
+               while ((*BOOT_SIO0STS & 0x3) != 0x3)
+                       cpu_relax();
        }
        *BOOT_SIO0TXB = c;
 }
-#else /* defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) */
-#ifdef CONFIG_MMU
+#else /* !(CONFIG_PLAT_M32700UT_Alpha) && !(CONFIG_PLAT_M32700UT) */
+#if defined(CONFIG_PLAT_MAPPI2)
 #define SIO0STS        (volatile unsigned short *)(0xa0efd000 + 14)
 #define SIO0TXB        (volatile unsigned short *)(0xa0efd000 + 30)
 #else
@@ -57,11 +59,12 @@ static void putc(char c)
 
 static void putc(char c)
 {
-
-       while ((*SIO0STS & 0x1) == 0) ;
+       while ((*SIO0STS & 0x1) == 0)
+               cpu_relax();
        if (c == '\n') {
                *SIO0TXB = '\r';
-               while ((*SIO0STS & 0x1) == 0) ;
+               while ((*SIO0STS & 0x1) == 0)
+                       cpu_relax();
        }
        *SIO0TXB = c;
 }