forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
*
|
||||
* Derived from c/src/lib/libcpu/hppa1_1/timer/timer.c:
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1998.
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -69,18 +69,12 @@ void Timer_initialize(void)
|
||||
Timer_starting = get_itimer();
|
||||
}
|
||||
|
||||
#ifndef rtems_cpu_configuration_get_timer_least_valid
|
||||
#define rtems_cpu_configuration_get_timer_least_valid() 0
|
||||
#endif
|
||||
|
||||
#ifndef rtems_cpu_configuration_get_timer_average_overhead
|
||||
#define rtems_cpu_configuration_get_timer_average_overhead() 0
|
||||
#endif
|
||||
|
||||
int Read_timer(void)
|
||||
{
|
||||
uint32_t clicks;
|
||||
uint32_t total;
|
||||
extern uint32_t bsp_timer_least_valid;
|
||||
extern uint32_t bsp_timer_average_overhead;
|
||||
|
||||
clicks = get_itimer();
|
||||
|
||||
@@ -90,10 +84,10 @@ int Read_timer(void)
|
||||
return total; /* in XXX microsecond units */
|
||||
|
||||
else {
|
||||
if ( total < rtems_cpu_configuration_get_timer_least_valid() ) {
|
||||
if ( total < bsp_timer_least_valid ) {
|
||||
return 0; /* below timer resolution */
|
||||
}
|
||||
return (total - rtems_cpu_configuration_get_timer_average_overhead());
|
||||
return (total - bsp_timer_average_overhead);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user