]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-powerpc/delay.h
powerpc: Fix delay functions for 601 processors
[linux-2.6-omap-h63xx.git] / include / asm-powerpc / delay.h
index 1492aa9ab716414aa98b17dec31f5840e0a37b02..54fe1f4f8fd069bdaa121aa6bd90e7e855f2e8eb 100644 (file)
  * Anton Blanchard.
  */
 
-extern unsigned long tb_ticks_per_usec;
-
-#ifdef CONFIG_PPC64
-/* define these here to prevent circular dependencies */
-/* these instructions control the thread priority on multi-threaded cpus */
-#define __HMT_low()    asm volatile("or 1,1,1")
-#define __HMT_medium() asm volatile("or 2,2,2")
-#else
-#define __HMT_low()
-#define __HMT_medium()
-#endif
-
-#define __barrier()    asm volatile("" ::: "memory")
-
-static inline unsigned long __get_tb(void)
-{
-       unsigned long rval;
-
-       asm volatile("mftb %0" : "=r" (rval));
-       return rval;
-}
-
-static inline void __delay(unsigned long loops)
-{
-       unsigned long start = __get_tb();
-
-       while((__get_tb() - start) < loops)
-               __HMT_low();
-       __HMT_medium();
-       __barrier();
-}
-
-static inline void udelay(unsigned long usecs)
-{
-       unsigned long loops = tb_ticks_per_usec * usecs;
-
-       __delay(loops);
-}
+extern void __delay(unsigned long loops);
+extern void udelay(unsigned long usecs);
 
 #endif /* _ASM_POWERPC_DELAY_H */