summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-28 21:43:56 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-28 21:43:56 +0000
commite34ac1f3b826342fb73eb02f06a1f3d3c35cea05 (patch)
treea8059f5e23340590421bf1544c0ff97c75b1a515 /cpukit
parent2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-e34ac1f3b826342fb73eb02f06a1f3d3c35cea05.tar.bz2
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.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/score/cpu/powerpc/ChangeLog7
-rw-r--r--cpukit/score/cpu/powerpc/rtems/new-exceptions/cpu.h22
-rw-r--r--cpukit/score/cpu/powerpc/rtems/old-exceptions/cpu.h34
-rw-r--r--cpukit/score/cpu/powerpc/rtems/score/cpu.h51
4 files changed, 11 insertions, 103 deletions
diff --git a/cpukit/score/cpu/powerpc/ChangeLog b/cpukit/score/cpu/powerpc/ChangeLog
index 7ae0910fbd..0d16d6710d 100644
--- a/cpukit/score/cpu/powerpc/ChangeLog
+++ b/cpukit/score/cpu/powerpc/ChangeLog
@@ -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.
diff --git a/cpukit/score/cpu/powerpc/rtems/new-exceptions/cpu.h b/cpukit/score/cpu/powerpc/rtems/new-exceptions/cpu.h
index 23db538a7f..e0de9d13bd 100644
--- a/cpukit/score/cpu/powerpc/rtems/new-exceptions/cpu.h
+++ b/cpukit/score/cpu/powerpc/rtems/new-exceptions/cpu.h
@@ -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;
/*
diff --git a/cpukit/score/cpu/powerpc/rtems/old-exceptions/cpu.h b/cpukit/score/cpu/powerpc/rtems/old-exceptions/cpu.h
index 66538db944..dcd837080c 100644
--- a/cpukit/score/cpu/powerpc/rtems/old-exceptions/cpu.h
+++ b/cpukit/score/cpu/powerpc/rtems/old-exceptions/cpu.h
@@ -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
@@ -226,15 +203,6 @@ typedef struct {
*/
/*
- * 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.
*
* NOTE: The instructions chosen are RTEMS dependent although one is
diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
index a022a61bf7..ef1213d46f 100644
--- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
@@ -396,54 +396,6 @@ static inline uint32_t CPU_swap_u32(
#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.
* This is very dependent on the clock speed of the target.
*/
@@ -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); \