[rtems commit] jmr3904 - Correct tm27.h to use PIC Interrupt Model

Joel Sherrill joel at rtems.org
Mon May 7 22:00:29 UTC 2012


Module:    rtems
Branch:    master
Commit:    19a3f501bb68492c333f6fe0e26176e323a86387
Changeset: http://git.rtems.org/rtems/commit/?id=19a3f501bb68492c333f6fe0e26176e323a86387

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Mon May  7 17:02:07 2012 -0500

jmr3904 - Correct tm27.h to use PIC Interrupt Model

---

 c/src/lib/libbsp/mips/jmr3904/include/tm27.h |   29 ++++++++-----------------
 1 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/c/src/lib/libbsp/mips/jmr3904/include/tm27.h b/c/src/lib/libbsp/mips/jmr3904/include/tm27.h
index baf0baa..027d26c 100644
--- a/c/src/lib/libbsp/mips/jmr3904/include/tm27.h
+++ b/c/src/lib/libbsp/mips/jmr3904/include/tm27.h
@@ -1,11 +1,11 @@
+/**
+ *  @file
+ */
+
 /*
- *  tm27.h
- *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
  *  http://www.rtems.com/license/LICENSE.
- *
- *  $Id$
  */
 
 #ifndef _RTEMS_TMTEST27
@@ -19,23 +19,14 @@
  *  Define the interrupt mechanism for Time Test 27
  */
 
-#define MUST_WAIT_FOR_INTERRUPT 1
-
-#if 0
-#define Install_tm27_vector( handler ) \
-    (void) set_vector( handler, TX3904_IRQ_SOFTWARE_1, 1 ); \
+#include <bsp/irq.h>
 
-#define Cause_tm27_intr() \
-    __asm__ volatile ( "syscall 0x01" : : );
-
-#define CLOCK_VECTOR TX3904_IRQ_TMR0
-
-#define Clear_tm27_intr() /* empty */
+#define MUST_WAIT_FOR_INTERRUPT 1
 
-#define Lower_tm27_intr() /* empty */
-#else
 #define Install_tm27_vector( handler ) \
-    (void) set_vector( handler, TX3904_IRQ_TMR0, 1 ); \
+   rtems_interrupt_handler_install( \
+      TX3904_IRQ_TMR0, "benchmark", 0, \
+      (rtems_interrupt_handler)handler, NULL );
 
 #define Cause_tm27_intr() \
   do { \
@@ -59,5 +50,3 @@
   mips_enable_in_interrupt_mask( 0xff01 );
 
 #endif
-
-#endif




More information about the vc mailing list