summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/sh/sh7750
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/sh7750
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 '')
-rw-r--r--c/src/lib/libcpu/sh/sh7750/clock/ckinit.c5
-rw-r--r--c/src/lib/libcpu/sh/sh7750/timer/timer.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/c/src/lib/libcpu/sh/sh7750/clock/ckinit.c b/c/src/lib/libcpu/sh/sh7750/clock/ckinit.c
index 9fb729bec6..02c0de4262 100644
--- a/c/src/lib/libcpu/sh/sh7750/clock/ckinit.c
+++ b/c/src/lib/libcpu/sh/sh7750/clock/ckinit.c
@@ -24,6 +24,8 @@
#include <rtems/score/ispsh7750.h>
#include <rtems/score/iosh7750.h>
+extern uint32_t bsp_clicks_per_second;
+
#ifndef CLOCKPRIO
#define CLOCKPRIO 10
#endif
@@ -176,8 +178,7 @@ Install_clock(rtems_isr_entry clock_isr)
rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED);
}
timer_divider =
- (rtems_cpu_configuration_get_clicks_per_second() *
- cpudiv / (tidiv*1000000)) *
+ (bsp_clicks_per_second * cpudiv / (tidiv*1000000)) *
rtems_configuration_get_microseconds_per_tick();
/*
diff --git a/c/src/lib/libcpu/sh/sh7750/timer/timer.c b/c/src/lib/libcpu/sh/sh7750/timer/timer.c
index 893e54a88f..8611bdb4fc 100644
--- a/c/src/lib/libcpu/sh/sh7750/timer/timer.c
+++ b/c/src/lib/libcpu/sh/sh7750/timer/timer.c
@@ -27,6 +27,8 @@
#include <rtems/score/sh_io.h>
#include <rtems/score/iosh7750.h>
+extern uint32_t bsp_clicks_per_second;
+
#ifndef TIMER_PRIO
#define TIMER_PRIO 15
#endif
@@ -133,9 +135,7 @@ Timer_initialize(void)
rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED);
}
- microseconds_divider =
- rtems_cpu_configuration_get_clicks_per_second() * cpudiv /
- (tidiv * 1000000);
+ microseconds_divider = bsp_clicks_per_second * cpudiv / (tidiv * 1000000);
microseconds_per_int = 0xFFFFFFFF / microseconds_divider;
/*