summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/sh/sh7045
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libcpu/sh/sh7045')
-rw-r--r--c/src/lib/libcpu/sh/sh7045/clock/ckinit.c4
-rw-r--r--c/src/lib/libcpu/sh/sh7045/timer/timer.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/c/src/lib/libcpu/sh/sh7045/clock/ckinit.c b/c/src/lib/libcpu/sh/sh7045/clock/ckinit.c
index 76c08a690e..6a43c5fc54 100644
--- a/c/src/lib/libcpu/sh/sh7045/clock/ckinit.c
+++ b/c/src/lib/libcpu/sh/sh7045/clock/ckinit.c
@@ -43,6 +43,8 @@
#include <rtems/score/ispsh7045.h>
#include <rtems/score/iosh7045.h>
+extern uint32_t bsp_clicks_per_second;
+
#define _MTU_COUNTER0_MICROSECOND (Clock_MHZ/16)
#ifndef CLOCKPRIO
@@ -161,7 +163,7 @@ void Install_clock(
Clock_isrs = Clock_isrs_const;
factor /= rtems_configuration_get_microseconds_per_tick(); /* minimalization of integer division error */
- Clock_MHZ = rtems_cpu_configuration_get_clicks_per_second() / factor ;
+ Clock_MHZ = bsp_clicks_per_second / factor ;
rtems_interrupt_catch( Clock_isr, CLOCK_VECTOR, &Old_ticker );
diff --git a/c/src/lib/libcpu/sh/sh7045/timer/timer.c b/c/src/lib/libcpu/sh/sh7045/timer/timer.c
index aa889f39c8..0ed7f19da8 100644
--- a/c/src/lib/libcpu/sh/sh7045/timer/timer.c
+++ b/c/src/lib/libcpu/sh/sh7045/timer/timer.c
@@ -33,6 +33,8 @@
#include <rtems/score/sh_io.h>
#include <rtems/score/iosh7045.h>
+extern uint32_t bsp_clicks_per_second;
+
/*
* We use a Phi/4 timer
*/
@@ -68,7 +70,7 @@ void Timer_initialize( void )
rtems_interrupt_level level;
rtems_isr *ignored;
- Timer_MHZ = rtems_cpu_configuration_get_clicks_per_second() / 1000000 ;
+ Timer_MHZ = bsp_clicks_per_second / 1000000 ;
/*
* Timer has never overflowed. This may not be necessary on some