diff options
author | Chen Liqin <liqin.chen@sunplusct.com> | 2009-06-19 13:53:49 +0800 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2009-06-19 11:40:13 +0200 |
commit | 0402c91af944c61bf788370f03326959a35cb8be (patch) | |
tree | 1f522cec2d62050e7fcaed676005b7d43922276e /arch/score/include/asm/delay.h | |
parent | 6bcf67374137f433e85aa42a18fde9f0e8562901 (diff) | |
download | kernel_samsung_smdk4412-0402c91af944c61bf788370f03326959a35cb8be.zip kernel_samsung_smdk4412-0402c91af944c61bf788370f03326959a35cb8be.tar.gz kernel_samsung_smdk4412-0402c91af944c61bf788370f03326959a35cb8be.tar.bz2 |
score: update files according to review comments
modified: arch/score/include/asm/cacheflush.h
modified: arch/score/include/asm/delay.h
modified: arch/score/include/asm/errno.h
modified: arch/score/include/asm/pgtable-bits.h
modified: arch/score/include/asm/pgtable.h
modified: arch/score/include/asm/ptrace.h
modified: arch/score/include/asm/unistd.h
modified: arch/score/kernel/entry.S
modified: arch/score/kernel/process.c
modified: arch/score/kernel/ptrace.c
modified: arch/score/kernel/signal.c
modified: arch/score/kernel/sys_score.c
modified: arch/score/kernel/traps.c
modified: arch/score/mm/cache.c
Signed-off-by: Chen Liqin <liqin.chen@sunplusct.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/score/include/asm/delay.h')
-rw-r--r-- | arch/score/include/asm/delay.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/score/include/asm/delay.h b/arch/score/include/asm/delay.h index ad716f6..6726ec1 100644 --- a/arch/score/include/asm/delay.h +++ b/arch/score/include/asm/delay.h @@ -3,17 +3,22 @@ static inline void __delay(unsigned long loops) { + /* 3 cycles per loop. */ __asm__ __volatile__ ( - "1:\tsubi\t%0,1\n\t" + "1:\tsubi\t%0, 3\n\t" "cmpz.c\t%0\n\t" - "bne\t1b\n\t" + "ble\t1b\n\t" : "=r" (loops) : "0" (loops)); } static inline void __udelay(unsigned long usecs) { - __delay(usecs); + unsigned long loops_per_usec; + + loops_per_usec = (loops_per_jiffy * HZ) / 1000000; + + __delay(usecs * loops_per_usec); } #define udelay(usecs) __udelay(usecs) |