2009-11-23 Joel Sherrill <joel.sherrill@OARcorp.com>

* clock/clockdrv.c: Split hardware initialization code into
	Clock_driver_support_initialize_hardware().
This commit is contained in:
Joel Sherrill
2009-11-23 20:07:55 +00:00
parent ef85611a8e
commit 90505853a8
2 changed files with 13 additions and 6 deletions

View File

@@ -1,3 +1,8 @@
2009-11-23 Joel Sherrill <joel.sherrill@OARcorp.com>
* clock/clockdrv.c: Split hardware initialization code into
Clock_driver_support_initialize_hardware().
2009-11-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* startup/bspstart.c: Remove nested externs.

View File

@@ -1,9 +1,9 @@
/*
* Instantiate the clock driver shell.
*
* The tx3904 simulator in gdb counts instructions.
* The TX3904 simulator in gdb counts instructions.
*
* COPYRIGHT (c) 1989-2006.
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -21,8 +21,6 @@
#define CLOCK_VECTOR TX3904_IRQ_TMR0
#define Clock_driver_support_at_tick()
/*
* 5000 clicks per tick ISR is HIGHLY arbitrary
*/
@@ -30,8 +28,12 @@
#define CLICKS 5000
#define Clock_driver_support_install_isr( _new, _old ) \
do { \
uint32_t _clicks = CLICKS; \
_old = set_vector( _new, CLOCK_VECTOR, 1 ); \
} while(0)
#define Clock_driver_support_initialize_hardware() \
do { \
uint32_t _clicks = CLICKS; \
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_TISR, 0x00 ); \
@@ -40,7 +42,7 @@
*((volatile uint32_t*) 0xFFFFC01C) = 0x00000700; \
} while(0)
#define Clock_driver_support_initialize_hardware()
#define Clock_driver_support_at_tick()
#define Clock_driver_support_shutdown_hardware()