[PATCH 3/8] bsp/pc386: Use irq-generic.

Chris Johns chrisj at rtems.org
Fri May 6 22:23:47 UTC 2016


---
 c/src/lib/libbsp/i386/pc386/clock/ckinit.c |  5 ++---
 c/src/lib/libbsp/i386/pc386/timer/timer.c  | 10 +++++-----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/c/src/lib/libbsp/i386/pc386/clock/ckinit.c b/c/src/lib/libbsp/i386/pc386/clock/ckinit.c
index 2291839..67f4bf7 100644
--- a/c/src/lib/libbsp/i386/pc386/clock/ckinit.c
+++ b/c/src/lib/libbsp/i386/pc386/clock/ckinit.c
@@ -24,7 +24,7 @@
  */
 
 #include <bsp.h>
-#include <bsp/irq.h>
+#include <bsp/irq-generic.h>
 #include <bspopts.h>
 #include <libcpu/cpuModel.h>
 #include <assert.h>
@@ -150,7 +150,7 @@ static void clockOn(void)
   }
   pc386_clock_click_count = US_TO_TICK(pc386_microseconds_per_isr);
 
-  BSP_irq_enable_at_i8259s( BSP_PERIODIC_TIMER - BSP_IRQ_VECTOR_BASE );
+  bsp_interrupt_vector_enable( BSP_PERIODIC_TIMER - BSP_IRQ_VECTOR_BASE );
 
   #if 0
     printk( "configured usecs per tick=%d \n",
@@ -256,4 +256,3 @@ void Clock_driver_support_initialize_hardware(void)
   } while (0)
 
 #include "../../../shared/clockdrv_shell.h"
-
diff --git a/c/src/lib/libbsp/i386/pc386/timer/timer.c b/c/src/lib/libbsp/i386/pc386/timer/timer.c
index 541d2e3..0e4d6a9 100644
--- a/c/src/lib/libbsp/i386/pc386/timer/timer.c
+++ b/c/src/lib/libbsp/i386/pc386/timer/timer.c
@@ -16,7 +16,7 @@
  *  This file is provided "AS IS" without warranty of any kind, either
  *  expressed or implied.
  *
- *  Based upon code by 
+ *  Based upon code by
  *  COPYRIGHT (c) 1989-1999.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -28,7 +28,7 @@
 #include <stdlib.h>
 #include <bsp.h>
 #include <rtems/btimer.h>
-#include <bsp/irq.h>
+#include <bsp/irq-generic.h>
 #include <libcpu/cpuModel.h>
 
 /*
@@ -118,7 +118,7 @@ static void timerOff(const rtems_raw_irq_connect_data* used)
   /*
    * disable interrrupt at i8259 level
    */
-   BSP_irq_disable_at_i8259s(used->idtIndex - BSP_IRQ_VECTOR_BASE);
+   bsp_interrupt_vector_disable(used->idtIndex - BSP_IRQ_VECTOR_BASE);
    /* reset timer mode to standard (DOS) value */
    outport_byte(TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN);
    outport_byte(TIMER_CNTR0, 0);
@@ -135,12 +135,12 @@ static void timerOn(const rtems_raw_irq_connect_data* used)
   /*
    * enable interrrupt at i8259 level
    */
-  BSP_irq_enable_at_i8259s(used->idtIndex - BSP_IRQ_VECTOR_BASE);
+  bsp_interrupt_vector_enable(used->idtIndex - BSP_IRQ_VECTOR_BASE);
 }
 
 static int timerIsOn(const rtems_raw_irq_connect_data *used)
 {
-  return BSP_irq_enabled_at_i8259s(used->idtIndex - BSP_IRQ_VECTOR_BASE);
+  return bsp_interrupt_vector_enable(used->idtIndex - BSP_IRQ_VECTOR_BASE);
 }
 
 static rtems_raw_irq_connect_data timer_raw_irq_data = {
-- 
2.4.6




More information about the devel mailing list