diff options
Diffstat (limited to 'c/src/lib/libcpu/powerpc/ppc403')
-rw-r--r-- | c/src/lib/libcpu/powerpc/ppc403/clock/clock.c | 6 | ||||
-rw-r--r-- | c/src/lib/libcpu/powerpc/ppc403/console/console.c | 9 | ||||
-rw-r--r-- | c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled | 11 | ||||
-rw-r--r-- | c/src/lib/libcpu/powerpc/ppc403/ictrl/ictrl.c | 6 | ||||
-rw-r--r-- | c/src/lib/libcpu/powerpc/ppc403/timer/timer.c | 6 |
5 files changed, 16 insertions, 22 deletions
diff --git a/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c b/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c index dfcbea5535..dc019d6b7e 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c +++ b/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c @@ -43,8 +43,6 @@ #include <stdlib.h> /* for atexit() */ -extern rtems_cpu_table Cpu_table; /* owned by BSP */ - volatile rtems_unsigned32 Clock_driver_ticks; static rtems_unsigned32 pit_value, tick_time; static rtems_boolean auto_restart; @@ -140,7 +138,7 @@ void Install_clock(rtems_isr_entry clock_isr) asm volatile ("mfdcr %0, 0xa0" : "=r" (iocr)); /* IOCR */ - if (Cpu_table.timer_internal_clock) { + if (rtems_cpu_configuration_get_timer_internal_clock()) { iocr &= ~4; /* timer clocked from system clock */ } else { @@ -165,7 +163,7 @@ void Install_clock(rtems_isr_entry clock_isr) auto_restart = 1; pit_value = rtems_configuration_get_microseconds_per_tick() * - Cpu_table.clicks_per_usec; + rtems_cpu_configuration_get_clicks_per_usec(); if ( rtems_configuration_get_ticks_per_timeslice() ) { register rtems_unsigned32 tcr; 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 | 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 e5d3b6fbce..976b5f975c 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled +++ b/c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled @@ -34,8 +34,6 @@ #include <rtems.h> #include <rtems/libio.h> -extern rtems_cpu_table Cpu_table; /* owned by BSP */ - struct async { /*-----------------------------------------------------------------------------+ | Line Status Register. @@ -147,12 +145,13 @@ rtems_device_driver console_initialize( /* Initialise the serial port */ asm volatile ("mfdcr %0, 0xa0" : "=r" (tmp)); /* IOCR */ tmp &= ~3; - tmp |= (Cpu_table.serial_external_clock ? 2 : 0) | - (Cpu_table.serial_cts_rts ? 1 : 0); + tmp |= (rtems_cpu_configuration_get_serial_external_clock() ? 2 : 0) | + (rtems_cpu_configuration_get_serial_cts_rts() ? 1 : 0); asm volatile ("mtdcr 0xa0, %0" : "=r" (tmp) : "0" (tmp)); /* IOCR */ port->SPLS = (LSRDataReady | LSRFramingError | LSROverrunError | LSRParityError | LSRBreakInterrupt); - tmp = Cpu_table.serial_per_sec / Cpu_table.serial_rate; + tmp = rtems_cpu_configuration_get_serial_per_sec() / + rtems_cpu_configuration_get_serial_rate(); #if 0 /* replaced by IMD... */ tmp = ((tmp + 8) >> 4) - 1; port->BRDL = tmp & 0x255; @@ -278,7 +277,7 @@ void outbyte( break; } - if (Cpu_table.serial_xon_xoff) + if (rtems_cpu_configuration_get_serial_xon_xoff()) while (is_character_ready(&status)) { if (status == XOFFchar) diff --git a/c/src/lib/libcpu/powerpc/ppc403/ictrl/ictrl.c b/c/src/lib/libcpu/powerpc/ppc403/ictrl/ictrl.c index 8f808d432d..6ba3947bc8 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/ictrl/ictrl.c +++ b/c/src/lib/libcpu/powerpc/ppc403/ictrl/ictrl.c @@ -108,7 +108,7 @@ disable_ext_irq( unsigned32 mask) * this function is called, when a external interrupt is present and * enabled but there is no handler installed. It will clear * the corresponding enable bits and call the spurious handler - * present in the _CPU_Table, if any. + * present in the CPU Configuration Table, if any. * */ void @@ -125,8 +125,8 @@ ictrl_spurious_handler(unsigned32 spurious_mask, printf("spurious external interrupt: %d at pc 0x%x; disabling\n", vector, cpu_frame->Interrupt.pcoqfront); #endif - if (_CPU_Table.spurious_handler) { - _CPU_Table.spurious_handler(v + PPC_IRQ_EXT_BASE,cpu_frame); + if (rtems_cpu_configuration_get_spurious_handler()) { + rtems_cpu_configuration_get_spurious_handler()(v + PPC_IRQ_EXT_BASE,cpu_frame); } } } diff --git a/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c b/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c index 0ff48aec90..a45f2b396f 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c +++ b/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c @@ -36,8 +36,6 @@ #include <rtems.h> -extern rtems_cpu_table Cpu_table; /* owned by BSP */ - static volatile rtems_unsigned32 Timer_starting; static rtems_boolean Timer_driver_Find_average_overhead; @@ -78,9 +76,9 @@ int Read_timer() return total; /* in XXX microsecond units */ else { - if ( total < Cpu_table.timer_least_valid ) + if ( total < rtems_cpu_configuration_get_timer_least_valid() ) return 0; /* below timer resolution */ - return (total - Cpu_table.timer_average_overhead); + return (total - rtems_cpu_configuration_get_timer_average_overhead()); } } |