diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-10-10 21:33:22 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-10-10 21:33:58 +0200 |
commit | 5a0d0e65379256b4da2c9092e197a2c761f51c01 (patch) | |
tree | 4dbac2b5498ad7ce1bd88d8bdfe6303169b9560c /arch/s390/lib | |
parent | b2300b9efe1b8174833e17f37e975c9da00c388a (diff) | |
download | kernel_samsung_smdk4412-5a0d0e65379256b4da2c9092e197a2c761f51c01.zip kernel_samsung_smdk4412-5a0d0e65379256b4da2c9092e197a2c761f51c01.tar.gz kernel_samsung_smdk4412-5a0d0e65379256b4da2c9092e197a2c761f51c01.tar.bz2 |
[S390] Move private simple udelay function to arch/s390/lib/delay.c.
Move cio's private simple udelay function to lib/delay.c and turn it
into something much more readable. So we have all implementations
at one place.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/lib')
-rw-r--r-- | arch/s390/lib/delay.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c index 0953cee..6ccb9fa 100644 --- a/arch/s390/lib/delay.c +++ b/arch/s390/lib/delay.c @@ -92,3 +92,16 @@ out: local_irq_restore(flags); preempt_enable(); } + +/* + * Simple udelay variant. To be used on startup and reboot + * when the interrupt handler isn't working. + */ +void udelay_simple(unsigned long usecs) +{ + u64 end; + + end = get_clock() + ((u64) usecs << 12); + while (get_clock() < end) + cpu_relax(); +} |