2007-11-26 Joel Sherrill <joel.sherrill@oarcorp.com>

* clock/ckinit.c, startup/bspstart.c: Eliminate the
	clicks_per_microsecond field in the MIPS CPU Table and define another
	mechanism for drivers to obtain this information.
This commit is contained in:
Joel Sherrill
2007-11-26 22:36:18 +00:00
parent e4d4eb9c54
commit c63f6e2efc
3 changed files with 45 additions and 45 deletions

View File

@@ -1,3 +1,9 @@
2007-11-26 Joel Sherrill <joel.sherrill@oarcorp.com>
* clock/ckinit.c, startup/bspstart.c: Eliminate the
clicks_per_microsecond field in the MIPS CPU Table and define another
mechanism for drivers to obtain this information.
2007-04-12 Ralf Corsépius <ralf.corsepius@rtems.org> 2007-04-12 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Remove qrtems_debug. * bsp_specs: Remove qrtems_debug.

View File

@@ -43,17 +43,12 @@
#include <rtems.h> #include <rtems.h>
#include <rtems/libio.h> #include <rtems/libio.h>
extern uint32_t bsp_clicks_per_microsecond;
#define EXT_INT1 0x800 /* external interrupt 5 */ #define EXT_INT1 0x800 /* external interrupt 5 */
#include "clock.h" #include "clock.h"
/* formerly in the BSP */
#if 0
#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
#endif
#define CLOCKS_PER_MICROSECOND \
rtems_cpu_configuration_get_clicks_per_microsecond()
/* to avoid including the bsp */ /* to avoid including the bsp */
mips_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int ); mips_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
@@ -163,8 +158,8 @@ void Install_clock(
Clock_driver_ticks = 0; Clock_driver_ticks = 0;
Clock_isrs = rtems_configuration_get_milliseconds_per_tick(); Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
mips_timer_rate = mips_timer_rate = rtems_configuration_get_microseconds_per_tick() *
rtems_configuration_get_microseconds_per_tick() * CLOCKS_PER_MICROSECOND; bsp_clicks_per_microsecond;
/* /*
* Hardware specific initialize goes here * Hardware specific initialize goes here

View File

@@ -20,6 +20,8 @@
#include <rtems/libio.h> #include <rtems/libio.h>
#include <rtems/libcsupport.h> #include <rtems/libcsupport.h>
uint32_t bsp_clicks_per_microsecond;
/* /*
* The original table from the application and our copy of it with * The original table from the application and our copy of it with
* some changes. * some changes.
@@ -108,10 +110,7 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */ Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook; Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY; Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.clicks_per_microsecond = CPU_CLOCK_RATE_MHZ; bsp_clicks_per_microsecond = CPU_CLOCK_RATE_MHZ;
mips_install_isr_entries(); /* Install generic MIPS exception handler */ mips_install_isr_entries(); /* Install generic MIPS exception handler */
/* init_exc_vecs(); */ /* Install BSP specific exception handler */
} }