diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-05 16:44:02 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-05 16:44:02 +0000 |
commit | 458bd343e24cda7169c75f079705979891c9abc1 (patch) | |
tree | a9e584c28211674b28d1e37aec005e0e3a25afa1 /c/src/lib/libcpu/powerpc/ppc403/console/console.c | |
parent | Eliminated references to stack checker related #defines. (diff) | |
download | rtems-458bd343e24cda7169c75f079705979891c9abc1.tar.bz2 |
This is another pass at making sure that nothing outside the BSP
unnecessarily uses any variables defined by the BSP. On this
sweep, use of BSP_Configuration and Cpu_table was eliminated.
A significant part of this modification was the addition of
macros to access fields in the RTEMS configuration structures.
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>.
Diffstat (limited to 'c/src/lib/libcpu/powerpc/ppc403/console/console.c')
-rw-r--r-- | c/src/lib/libcpu/powerpc/ppc403/console/console.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/c/src/lib/libcpu/powerpc/ppc403/console/console.c b/c/src/lib/libcpu/powerpc/ppc403/console/console.c index b1fc7bfe9c..11177c8a42 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/console/console.c +++ b/c/src/lib/libcpu/powerpc/ppc403/console/console.c @@ -60,7 +60,6 @@ #include <rtems/libio.h> #include "../ictrl/ictrl.h" #include <stdlib.h> /* for atexit() */ -extern rtems_cpu_table Cpu_table; /* owned by BSP */ struct async { /*---------------------------------------------------------------------------+ @@ -215,7 +214,7 @@ void spiBaudSet(unsigned32 baudrate) { unsigned32 tmp; - tmp = Cpu_table.serial_per_sec / baudrate; + tmp = rtems_cpu_configuration_get_serial_per_sec() / baudrate; tmp = ((tmp) >> 4) - 1; port->BRDL = tmp & 0xff; port->BRDH = tmp >> 8; @@ -314,7 +313,7 @@ spiDeInit(void) */ /* set up baud rate to original state */ - spiBaudSet(Cpu_table.serial_rate); + spiBaudSet(rtems_cpu_configuration_get_serial_rate()); /* clear any receive (error) status */ port->SPLS = (LSRDataReady | LSRFramingError | LSROverrunError | @@ -356,7 +355,7 @@ spiInitialize(void) asm volatile ("mfdcr %0, 0xa0" : "=r" (tmp)); /* IOCR */ tmp &= ~3; - tmp |= (Cpu_table.serial_external_clock ? 2 : 0) | 1; + tmp |= (rtems_cpu_configuration_get_serial_external_clock() ? 2 : 0) | 1; asm volatile ("mtdcr 0xa0, %0" : "=r" (tmp) : "0" (tmp)); /* IOCR */ @@ -365,7 +364,7 @@ spiInitialize(void) LSRParityError | LSRBreakInterrupt); /* set up baud rate */ - spiBaudSet(Cpu_table.serial_rate); + spiBaudSet(rtems_cpu_configuration_get_serial_rate()); /* set up port control: DTR/RTS active,8 bit,1 stop,no parity */ port->SPCTL = (CRNormal | |