diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 20:32:09 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 20:32:09 -0500 |
| commit | 591eb85ecd7e6eb8596c6129ae074e16636b99f4 (patch) | |
| tree | 535fb7e9bc29113ff62fd70b0dcd8ad197ab51e2 /arch/arm/lib/delay.S | |
| parent | 4658f79bec0b51222e769e328c2923f39f3bda77 (diff) | |
| parent | 3a2916aa289504d694072a98876d23ca31d6401e (diff) | |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (45 commits)
[ARM] 3389/1: typo and grammar fix
[ARM] 3386/1: AT91RM9200 Clock update
[ARM] 3384/1: AT91RM9200: Timer
[ARM] 3382/1: ixp2000: unify defconfigs
[ARM] 3381/1: ixp2000: fix slowport write timing control register fields
[ARM] 3380/1: ixp2000: simplify ixdp2x00_master_npu() check
[ARM] 3379/1: ixp2000: use generic 8250 debug macros
[ARM] 3378/1: ixp2000: fix gpio interrupt handling
[ARM] Quieten spurious IRQ detection
[ARM] Use kcalloc to allocate counter_config array rather than kmalloc
[ARM] Oprofile: dynamically allocate counter_config
[ARM] Oprofile: Convert semaphore to mutex
[ARM] 3376/2: S3C2410 - update defconfig
[ARM] 3375/1: S3C2440 - fix osiris machine build
[ARM] 3374/1: ep93xx: gpio interrupt support
[ARM] 3361/1: S3C24XX - add USB bus clock source
[ARM] 3360/1: S3C2440 - add set rate methods and camera clock
[ARM] 3359/1: S3C24XX - add support for clk_set_rate
[ARM] Convert kmalloc+memset to kzalloc
[ARM] 3373/1: move uengine loader to arch/arm/common
...
Diffstat (limited to 'arch/arm/lib/delay.S')
| -rw-r--r-- | arch/arm/lib/delay.S | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/arch/arm/lib/delay.S b/arch/arm/lib/delay.S index b3fb475b4120..9183b06c0e2f 100644 --- a/arch/arm/lib/delay.S +++ b/arch/arm/lib/delay.S | |||
| @@ -9,28 +9,32 @@ | |||
| 9 | */ | 9 | */ |
| 10 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
| 11 | #include <asm/assembler.h> | 11 | #include <asm/assembler.h> |
| 12 | #include <asm/param.h> | ||
| 12 | .text | 13 | .text |
| 13 | 14 | ||
| 14 | .LC0: .word loops_per_jiffy | 15 | .LC0: .word loops_per_jiffy |
| 16 | .LC1: .word (2199023*HZ)>>11 | ||
| 15 | 17 | ||
| 16 | /* | 18 | /* |
| 17 | * 0 <= r0 <= 2000 | 19 | * r0 <= 2000 |
| 20 | * lpj <= 0x01ffffff (max. 3355 bogomips) | ||
| 21 | * HZ <= 1000 | ||
| 18 | */ | 22 | */ |
| 23 | |||
| 19 | ENTRY(__udelay) | 24 | ENTRY(__udelay) |
| 20 | mov r2, #0x6800 | 25 | ldr r2, .LC1 |
| 21 | orr r2, r2, #0x00db | ||
| 22 | mul r0, r2, r0 | 26 | mul r0, r2, r0 |
| 23 | ENTRY(__const_udelay) @ 0 <= r0 <= 0x01ffffff | 27 | ENTRY(__const_udelay) @ 0 <= r0 <= 0x7fffff06 |
| 24 | ldr r2, .LC0 | 28 | ldr r2, .LC0 |
| 25 | ldr r2, [r2] @ max = 0x0fffffff | 29 | ldr r2, [r2] @ max = 0x01ffffff |
| 26 | mov r0, r0, lsr #11 @ max = 0x00003fff | 30 | mov r0, r0, lsr #14 @ max = 0x0001ffff |
| 27 | mov r2, r2, lsr #11 @ max = 0x0003ffff | 31 | mov r2, r2, lsr #10 @ max = 0x00007fff |
| 28 | mul r0, r2, r0 @ max = 2^32-1 | 32 | mul r0, r2, r0 @ max = 2^32-1 |
| 29 | movs r0, r0, lsr #6 | 33 | movs r0, r0, lsr #6 |
| 30 | RETINSTR(moveq,pc,lr) | 34 | RETINSTR(moveq,pc,lr) |
| 31 | 35 | ||
| 32 | /* | 36 | /* |
| 33 | * loops = (r0 * 0x10c6 * 100 * loops_per_jiffy) / 2^32 | 37 | * loops = r0 * HZ * loops_per_jiffy / 1000000 |
| 34 | * | 38 | * |
| 35 | * Oh, if only we had a cycle counter... | 39 | * Oh, if only we had a cycle counter... |
| 36 | */ | 40 | */ |
