diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-11-26 23:02:03 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-11-26 23:02:03 +0000 |
commit | 99f67930c27d2dcc757b90aa9f3c15639456dde2 (patch) | |
tree | 9ee200ba474c123fd54edc8d0b92e04f6bf59e84 /c/src/lib/libcpu/sh/sh7032/clock/ckinit.c | |
parent | 2007-11-26 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-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/clock/ckinit.c')
-rw-r--r-- | c/src/lib/libcpu/sh/sh7032/clock/ckinit.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c b/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c index 96abdd3f46..7468d404a7 100644 --- a/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c +++ b/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c @@ -31,6 +31,8 @@ #include <rtems/score/ispsh7032.h> #include <rtems/score/iosh7032.h> +extern uint32_t bsp_clicks_per_second; + #ifndef CLOCKPRIO #define CLOCKPRIO 10 #endif @@ -80,7 +82,8 @@ */ static unsigned int sh_clicks_per_tick( unsigned int clicks_per_sec, - unsigned int usec_per_tick ) + unsigned int usec_per_tick +) { #if 1 unsigned int clicks_per_tick = 0 ; @@ -195,9 +198,9 @@ void Install_clock( ) { uint8_t temp8 = 0; - uint32_t microseconds_per_tick ; - uint32_t cclicks_per_tick ; - uint16_t Clock_limit ; + uint32_t microseconds_per_tick; + uint32_t cclicks_per_tick; + uint16_t Clock_limit; /* * Initialize the clock tick device driver variables @@ -211,10 +214,8 @@ void Install_clock( microseconds_per_tick = 10000 ; /* 10000 us */ /* clock clicks per tick */ - cclicks_per_tick = - sh_clicks_per_tick( - rtems_cpu_configuration_get_clicks_per_second() / CLOCK_SCALE, - microseconds_per_tick ); + cclicks_per_tick = sh_clicks_per_tick( + bsp_clicks_per_second / CLOCK_SCALE, microseconds_per_tick ); Clock_isrs_const = cclicks_per_tick >> 16 ; if ( ( cclicks_per_tick | 0xffff ) > 0 ) |