2001-01-09 Joel Sherrill <joel@OARcorp.com>

* clock/clockdrv.c: Clean up.
	* include/bsp.h: Uncomment and fix set_vector() prototype.
This commit is contained in:
Joel Sherrill
2001-01-09 17:05:57 +00:00
parent 16ad7eafed
commit 026f4aa247
3 changed files with 13 additions and 5 deletions

View File

@@ -1,3 +1,8 @@
2001-01-09 Joel Sherrill <joel@OARcorp.com>
* clock/clockdrv.c: Clean up.
* include/bsp.h: Uncomment and fix set_vector() prototype.
2001-01-03 Joel Sherrill <joel@OARcorp.com> 2001-01-03 Joel Sherrill <joel@OARcorp.com>
* console/console-io.c: Removed unused variable initialized. * console/console-io.c: Removed unused variable initialized.

View File

@@ -1,14 +1,14 @@
/* /*
* Instantiate the clock driver shell. * Instantiate the clock driver shell.
* *
* Since there is no clock source on the simulator, all we do is * The tx3904 simulator in gdb counts instructions.
* make sure it will build.
* *
* $Id$ * $Id$
*/ */
#include <rtems.h> #include <rtems.h>
#include <libcpu/tx3904.h> #include <libcpu/tx3904.h>
#include <bsp.h>
#define CLOCK_DRIVER_USE_FAST_IDLE #define CLOCK_DRIVER_USE_FAST_IDLE
@@ -16,12 +16,15 @@
#define Clock_driver_support_at_tick() #define Clock_driver_support_at_tick()
/* XXX */ /*
* 5000 clicks per tick ISR is HIGHLY arbitrary
*/
#define CLICKS 5000 #define CLICKS 5000
#define Clock_driver_support_install_isr( _new, _old ) \ #define Clock_driver_support_install_isr( _new, _old ) \
do { \ do { \
unsigned32 _clicks = CLICKS; \ unsigned32 _clicks = CLICKS; \
_old = (rtems_isr_entry) set_vector( _new, CLOCK_VECTOR, 1 ); \ _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CCDR, 0x3 ); \ TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CCDR, 0x3 ); \
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CPRA, _clicks ); \ TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CPRA, _clicks ); \
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_TISR, 0x00 ); \ TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_TISR, 0x00 ); \

View File

@@ -77,7 +77,7 @@ extern rtems_configuration_table BSP_Configuration;
void bsp_cleanup( void ); void bsp_cleanup( void );
/* i960_isr_entry set_vector( rtems_isr_entry, unsigned int, unsigned int ); */ rtems_isr_entry set_vector( rtems_isr_entry, unsigned int, unsigned int );
#ifdef __cplusplus #ifdef __cplusplus
} }