From 99f67930c27d2dcc757b90aa9f3c15639456dde2 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 26 Nov 2007 23:02:03 +0000 Subject: 2007-11-26 Joel Sherrill * 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. --- c/src/lib/libcpu/sh/sh7032/clock/ckinit.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'c/src/lib/libcpu/sh/sh7032/clock/ckinit.c') 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 #include +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 ) -- cgit v1.2.3