2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com>

* rtems/new-exceptions/cpu.h, rtems/old-exceptions/cpu.h,
	rtems/score/cpu.h: Eliminate PowerPC specific elements from the CPU
	Table. They have been replaced with variables named bsp_XXX as
	needed.
This commit is contained in:
Joel Sherrill
2007-11-28 21:43:56 +00:00
parent 901ebab4a7
commit e34ac1f3b8
4 changed files with 11 additions and 103 deletions

View File

@@ -1,3 +1,10 @@
2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* rtems/new-exceptions/cpu.h, rtems/old-exceptions/cpu.h,
rtems/score/cpu.h: Eliminate PowerPC specific elements from the CPU
Table. They have been replaced with variables named bsp_XXX as
needed.
2007-11-13 Till Straumann <strauman@slac.stanford.edu>
* rtems/score/powerpc.h: Added a '__ppc_generic' CPU variant.

View File

@@ -23,7 +23,7 @@
*
* Derived from c/src/exec/cpu/no_cpu/cpu.h:
*
* COPYRIGHT (c) 1989-2006.
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be found in
@@ -171,26 +171,6 @@ typedef struct {
void * (*stack_allocate_hook)( uint32_t );
void (*stack_free_hook)( void* );
/* end of fields required on all CPUs */
uint32_t clicks_per_usec; /* Timer clicks per microsecond */
boolean exceptions_in_RAM; /* TRUE if in RAM */
#if (defined(ppc403) || defined(ppc405) \
|| defined(mpc860) || defined(mpc821) || defined(mpc8260))
uint32_t serial_per_sec; /* Serial clocks per second */
boolean serial_external_clock;
boolean serial_xon_xoff;
boolean serial_cts_rts;
uint32_t serial_rate;
uint32_t timer_average_overhead; /* Average overhead of timer in ticks */
uint32_t timer_least_valid; /* Least valid number from timer */
boolean timer_internal_clock; /* TRUE, when timer runs with CPU clk */
#endif
#if (defined(mpc555) \
|| defined(mpc860) || defined(mpc821) || defined(mpc8260))
uint32_t clock_speed; /* Speed of CPU in Hz */
#endif
} rtems_cpu_table;
/*

View File

@@ -20,7 +20,7 @@
*
* Derived from c/src/exec/cpu/no_cpu/cpu.h:
*
* COPYRIGHT (c) 1989-2006.
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may in
@@ -194,29 +194,6 @@ typedef struct {
void * (*stack_allocate_hook)( uint32_t );
void (*stack_free_hook)( void* );
/* end of fields required on all CPUs */
#if 0
uint32_t clicks_per_usec; /* Timer clicks per microsecond */
void (*spurious_handler)(uint32_t vector, CPU_Interrupt_frame *);
boolean exceptions_in_RAM; /* TRUE if in RAM */
#if (defined(ppc403) || defined(ppc405) \
|| defined(mpc860) || defined(mpc821) || defined(mpc8260))
uint32_t serial_per_sec; /* Serial clocks per second */
boolean serial_external_clock;
boolean serial_xon_xoff;
boolean serial_cts_rts;
uint32_t serial_rate;
uint32_t timer_average_overhead; /* Average overhead of timer in ticks */
uint32_t timer_least_valid; /* Least valid number from timer */
boolean timer_internal_clock; /* TRUE, when timer runs with CPU clk */
#endif
#if (defined(mpc555) \
|| defined(mpc860) || defined(mpc821) || defined(mpc8260))
uint32_t clock_speed; /* Speed of CPU in Hz */
#endif
#endif
} rtems_cpu_table;
#endif
@@ -225,15 +202,6 @@ typedef struct {
* the file rtems/system.h.
*/
/*
* Macros to access PowerPC specific additions to the CPU Table
*/
#ifndef ASM
#define rtems_cpu_configuration_get_spurious_handler() \
(_CPU_Table.spurious_handler)
#endif /* ASM */
/*
* The following type defines an entry in the PPC's trap table.
*

View File

@@ -394,54 +394,6 @@ static inline uint32_t CPU_swap_u32(
#endif /* ASM */
#ifndef ASM
/*
* Macros to access PowerPC specific additions to the CPU Table
*/
#define rtems_cpu_configuration_get_clicks_per_usec() \
(_CPU_Table.clicks_per_usec)
#define rtems_cpu_configuration_get_exceptions_in_ram() \
(_CPU_Table.exceptions_in_RAM)
#if (defined(ppc403) || defined(ppc405) \
|| defined(mpc860) || defined(mpc821) || defined(mpc8260))
#define rtems_cpu_configuration_get_serial_per_sec() \
(_CPU_Table.serial_per_sec)
#define rtems_cpu_configuration_get_serial_external_clock() \
(_CPU_Table.serial_external_clock)
#define rtems_cpu_configuration_get_serial_xon_xoff() \
(_CPU_Table.serial_xon_xoff)
#define rtems_cpu_configuration_get_serial_cts_rts() \
(_CPU_Table.serial_cts_rts)
#define rtems_cpu_configuration_get_serial_rate() \
(_CPU_Table.serial_rate)
#define rtems_cpu_configuration_get_timer_average_overhead() \
(_CPU_Table.timer_average_overhead)
#define rtems_cpu_configuration_get_timer_least_valid() \
(_CPU_Table.timer_least_valid)
#define rtems_cpu_configuration_get_timer_internal_clock() \
(_CPU_Table.timer_internal_clock)
#endif
#if (defined(mpc555) \
|| defined(mpc860) || defined(mpc821) || defined(mpc8260))
#define rtems_cpu_configuration_get_clock_speed() \
(_CPU_Table.clock_speed)
#endif
#endif /* ASM */
#ifndef ASM
/*
* Simple spin delay in microsecond units for device drivers.
@@ -454,8 +406,9 @@ static inline uint32_t CPU_swap_u32(
#define rtems_bsp_delay( _microseconds ) \
do { \
uint32_t start, ticks, now; \
extern uint32_t bsp_clicks_per_usec; \
CPU_Get_timebase_low( start ) ; \
ticks = (_microseconds) * rtems_cpu_configuration_get_clicks_per_usec(); \
ticks = (_microseconds) * bsp_clicks_per_usec; \
do \
CPU_Get_timebase_low( now ) ; \
while (now - start < ticks); \