summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-11-23 20:07:55 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-11-23 20:07:55 +0000
commit90505853a8f1389264cf72276afb21caf2c36479 (patch)
treeb78e54842b1b1333c03b64c7ba5133b2c9f3fe51 /c
parent2009-11-23 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-90505853a8f1389264cf72276afb21caf2c36479.tar.bz2
2009-11-23 Joel Sherrill <joel.sherrill@OARcorp.com>
* clock/clockdrv.c: Split hardware initialization code into Clock_driver_support_initialize_hardware().
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/mips/jmr3904/ChangeLog5
-rw-r--r--c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c14
2 files changed, 13 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/mips/jmr3904/ChangeLog b/c/src/lib/libbsp/mips/jmr3904/ChangeLog
index 54d8240901..1e03c86049 100644
--- a/c/src/lib/libbsp/mips/jmr3904/ChangeLog
+++ b/c/src/lib/libbsp/mips/jmr3904/ChangeLog
@@ -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.
diff --git a/c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c b/c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c
index b603ab3115..d564b0831e 100644
--- a/c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c
+++ b/c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c
@@ -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()