summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/sh/sh7032
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-04 18:05:09 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-04 18:05:09 +0000
commitf817b0283cce904d0bcb48cf9e641c2b40ba8f38 (patch)
treef8d686387ff9cf0639e38887ad23aef46e57db94 /c/src/lib/libcpu/sh/sh7032
parentAdded first stab at mkgnatnewlib. (diff)
downloadrtems-f817b0283cce904d0bcb48cf9e641c2b40ba8f38.tar.bz2
The files in libcpu should not be directly dependent on any BSP. In
particular, using bsp.h, or getting information from the BSP which should properly be obtained from RTEMS is forbidden. This is necessary to strengthen the division between the BSP independent parts of RTEMS and the BSPs themselves. This started after comments and analysis by Ralf Corsepius <corsepiu@faw.uni-ulm.de>. The changes primarily eliminated the need to include bsp.h and peeking at BSP_Configuration. The use of Cpu_table in each BSP needs to be eliminated.
Diffstat (limited to 'c/src/lib/libcpu/sh/sh7032')
-rw-r--r--c/src/lib/libcpu/sh/sh7032/clock/ckinit.c10
-rw-r--r--c/src/lib/libcpu/sh/sh7032/console/console.c1
-rw-r--r--c/src/lib/libcpu/sh/sh7032/include/sci.h2
-rw-r--r--c/src/lib/libcpu/sh/sh7032/timer/timer.c2
4 files changed, 8 insertions, 7 deletions
diff --git a/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c b/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c
index 885cdbd752..7aef64ed99 100644
--- a/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c
+++ b/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c
@@ -22,7 +22,7 @@
* $Id$
*/
-#include <bsp.h>
+#include <rtems.h>
#include <stdlib.h>
@@ -143,7 +143,7 @@ void Install_clock(
*/
Clock_driver_ticks = 0;
- Clock_isrs_const = BSP_Configuration.microseconds_per_tick / 10000;
+ Clock_isrs_const = rtems_configuration_get_microseconds_per_tick() / 10000;
Clock_isrs = Clock_isrs_const;
/*
@@ -151,7 +151,7 @@ void Install_clock(
* wants a clock tick.
*/
- if ( BSP_Configuration.ticks_per_timeslice ) {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
rtems_interrupt_catch( Clock_isr, CLOCK_VECTOR, &Old_ticker );
/*
* Hardware specific initialize goes here
@@ -191,7 +191,7 @@ void Install_clock(
rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED);
/* set counter limits */
- write16( _ITU_COUNTER0_MICROSECOND * BSP_Configuration.microseconds_per_tick,
+ write16( _ITU_COUNTER0_MICROSECOND * rtems_configuration_get_microseconds_per_tick(),
ITU_GRA0);
/* start counter */
@@ -214,7 +214,7 @@ void Install_clock(
void Clock_exit( void )
{
unsigned8 temp8 = 0;
- if ( BSP_Configuration.ticks_per_timeslice ) {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
/* turn off the timer interrupts */
/* set interrupt priority to 0 */
diff --git a/c/src/lib/libcpu/sh/sh7032/console/console.c b/c/src/lib/libcpu/sh/sh7032/console/console.c
index db308cbb55..6c16adfa5f 100644
--- a/c/src/lib/libcpu/sh/sh7032/console/console.c
+++ b/c/src/lib/libcpu/sh/sh7032/console/console.c
@@ -30,6 +30,7 @@
*/
#include <bsp.h>
+#include <rtems.h>
#include <rtems/libio.h>
#include <iosupp.h>
diff --git a/c/src/lib/libcpu/sh/sh7032/include/sci.h b/c/src/lib/libcpu/sh/sh7032/include/sci.h
index 1b1633a488..d897003315 100644
--- a/c/src/lib/libcpu/sh/sh7032/include/sci.h
+++ b/c/src/lib/libcpu/sh/sh7032/include/sci.h
@@ -26,7 +26,7 @@
#define _sh_sci_h
#ifdef __cplusplus
-extern"C" {
+extern "C" {
#endif
/*
diff --git a/c/src/lib/libcpu/sh/sh7032/timer/timer.c b/c/src/lib/libcpu/sh/sh7032/timer/timer.c
index ddf8bfc06b..03ffdd7e56 100644
--- a/c/src/lib/libcpu/sh/sh7032/timer/timer.c
+++ b/c/src/lib/libcpu/sh/sh7032/timer/timer.c
@@ -29,7 +29,7 @@
* $Id$
*/
-#include <bsp.h>
+#include <rtems.h>
#include <rtems/score/sh_io.h>
#include <rtems/score/iosh7030.h>