summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-28 21:45:06 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-28 21:45:06 +0000
commitc4cc81993a324a6416cb92f8c1b78ff501654dbf (patch)
tree190fbb3656e871c93f4d4fd5c8ff11a81262c0c5 /c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled
parent2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-c4cc81993a324a6416cb92f8c1b78ff501654dbf.tar.bz2
2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* mpc5xx/clock/clock.c, mpc5xx/timer/timer.c, mpc8260/clock/clock.c, mpc8260/cpm/brg.c, mpc8260/timer/timer.c, mpc8xx/clock/clock.c, mpc8xx/console-generic/console-generic.c, mpc8xx/timer/timer.c, new-exceptions/raw_exception.c, old-exceptions/cpu.c, ppc403/clock/clock.c, ppc403/console/console.c, ppc403/console/console.c.polled, ppc403/console/console405.c, ppc403/ictrl/ictrl.c, ppc403/irq/ictrl.c, ppc403/timer/timer.c, ppc403/tty_drv/tty_drv.c: Eliminate PowerPC specific elements from the CPU Table. They have been replaced with variables named bsp_XXX as needed.
Diffstat (limited to 'c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled')
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled16
1 files changed, 10 insertions, 6 deletions
diff --git a/c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled b/c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled
index 2a16a6d410..a90da86432 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled
+++ b/c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled
@@ -18,7 +18,7 @@
*
* Derived from c/src/lib/libbsp/no_cpu/no_bsp/console/console.c:
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -140,17 +140,20 @@ rtems_device_driver console_initialize(
{
rtems_status_code status;
register unsigned tmp;
+ extern uint32_t bsp_serial_per_sec;
+ extern boolean bsp_serial_external_clock;
+ extern boolean bsp_serial_cts_rts;
+ extern uint32_t bsp_serial_rate;
/* Initialise the serial port */
asm volatile ("mfdcr %0, 0xa0" : "=r" (tmp)); /* IOCR */
tmp &= ~3;
- tmp |= (rtems_cpu_configuration_get_serial_external_clock() ? 2 : 0) |
- (rtems_cpu_configuration_get_serial_cts_rts() ? 1 : 0);
+ tmp |= (bsp_serial_external_clock ? 2 : 0) |
+ (bsp_serial_cts_rts ? 1 : 0);
asm volatile ("mtdcr 0xa0, %0" : "=r" (tmp) : "0" (tmp)); /* IOCR */
port->SPLS = (LSRDataReady | LSRFramingError | LSROverrunError |
LSRParityError | LSRBreakInterrupt);
- tmp = rtems_cpu_configuration_get_serial_per_sec() /
- rtems_cpu_configuration_get_serial_rate();
+ tmp = bsp_serial_per_sec / bsp_get_serial_rate;
#if 0 /* replaced by IMD... */
tmp = ((tmp + 8) >> 4) - 1;
port->BRDL = tmp & 0x255;
@@ -262,6 +265,7 @@ void outbyte(
)
{
unsigned char status;
+ extern boolean bsp_serial_xon_xoff;
while (port->SPHS)
port->SPHS = (HSRDsr | HSRCts);
@@ -276,7 +280,7 @@ void outbyte(
break;
}
- if (rtems_cpu_configuration_get_serial_xon_xoff())
+ if (bsp_serial_xon_xoff)
while (is_character_ready(&status))
{
if (status == XOFFchar)