summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/sh/sh7032/delay
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-26 23:02:03 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-26 23:02:03 +0000
commit99f67930c27d2dcc757b90aa9f3c15639456dde2 (patch)
tree9ee200ba474c123fd54edc8d0b92e04f6bf59e84 /c/src/lib/libcpu/sh/sh7032/delay
parent2007-11-26 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-99f67930c27d2dcc757b90aa9f3c15639456dde2.tar.bz2
2007-11-26 Joel Sherrill <joel.sherrill@oarcorp.com>
* sh7032/clock/ckinit.c, sh7032/delay/delay.c, sh7032/timer/timer.c, sh7045/clock/ckinit.c, sh7045/timer/timer.c, sh7750/clock/ckinit.c, sh7750/timer/timer.c: Eliminate the clicks_per_microsecond field in the SuperH CPU Table and define another mechanism for drivers to obtain this information.
Diffstat (limited to 'c/src/lib/libcpu/sh/sh7032/delay')
-rw-r--r--c/src/lib/libcpu/sh/sh7032/delay/delay.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/c/src/lib/libcpu/sh/sh7032/delay/delay.c b/c/src/lib/libcpu/sh/sh7032/delay/delay.c
index 41d4753908..16645ea200 100644
--- a/c/src/lib/libcpu/sh/sh7032/delay/delay.c
+++ b/c/src/lib/libcpu/sh/sh7032/delay/delay.c
@@ -23,6 +23,8 @@
#include <rtems.h>
+extern uint32_t bsp_clicks_per_second;
+
/*
* Simple spin delay in microsecond units for device drivers.
* This is very dependent on the clock speed of the target.
@@ -38,10 +40,9 @@
void CPU_delay( uint32_t microseconds )
{
- register uint32_t clicks_per_usec =
- rtems_cpu_configuration_get_clicks_per_second() / 1000000 ;
- register uint32_t _delay =
- (microseconds) * (clicks_per_usec);
+ register uint32_t clicks_per_usec = bsp_clicks_per_second / 1000000;
+ register uint32_t _delay = (microseconds) * (clicks_per_usec);
+
asm volatile (
"0: add #-4,%0\n\
nop\n\