Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[pandora-kernel.git] / include / asm-mips / delay.h
index 48d00cc..ea77050 100644 (file)
@@ -10,7 +10,6 @@
 #ifndef _ASM_DELAY_H
 #define _ASM_DELAY_H
 
-#include <linux/config.h>
 #include <linux/param.h>
 #include <linux/smp.h>
 #include <asm/compiler.h>
@@ -19,20 +18,22 @@ static inline void __delay(unsigned long loops)
 {
        if (sizeof(long) == 4)
                __asm__ __volatile__ (
-               ".set\tnoreorder\n"
-               "1:\tbnez\t%0,1b\n\t"
-               "subu\t%0,1\n\t"
-               ".set\treorder"
+               "       .set    noreorder                               \n"
+               "       .align  3                                       \n"
+               "1:     bnez    %0, 1b                                  \n"
+               "       subu    %0, 1                                   \n"
+               "       .set    reorder                                 \n"
                : "=r" (loops)
                : "0" (loops));
        else if (sizeof(long) == 8)
                __asm__ __volatile__ (
-               ".set\tnoreorder\n"
-               "1:\tbnez\t%0,1b\n\t"
-               "dsubu\t%0,1\n\t"
-               ".set\treorder"
-               :"=r" (loops)
-               :"0" (loops));
+               "       .set    noreorder                               \n"
+               "       .align  3                                       \n"
+               "1:     bnez    %0, 1b                                  \n"
+               "       dsubu   %0, 1                                   \n"
+               "       .set    reorder                                 \n"
+               : "=r" (loops)
+               : "0" (loops));
 }
 
 
@@ -52,13 +53,11 @@ static inline void __udelay(unsigned long usecs, unsigned long lpj)
        unsigned long lo;
 
        /*
-        * The common rates of 1000 and 128 are rounded wrongly by the
-        * catchall case for 64-bit.  Excessive precission?  Probably ...
+        * The rates of 128 is rounded wrongly by the catchall case
+        * for 64-bit.  Excessive precission?  Probably ...
         */
 #if defined(CONFIG_64BIT) && (HZ == 128)
        usecs *= 0x0008637bd05af6c7UL;          /* 2**64 / (1000000 / HZ) */
-#elif defined(CONFIG_64BIT) && (HZ == 1000)
-       usecs *= 0x004189374BC6A7f0UL;          /* 2**64 / (1000000 / HZ) */
 #elif defined(CONFIG_64BIT)
        usecs *= (0x8000000000000000UL / (500000 / HZ));
 #else /* 32-bit junk follows here */