summaryrefslogtreecommitdiffstats
path: root/cpukit/include/pci/irq.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/pci/irq.h')
-rw-r--r--cpukit/include/pci/irq.h42
1 files changed, 26 insertions, 16 deletions
diff --git a/cpukit/include/pci/irq.h b/cpukit/include/pci/irq.h
index 190c68a723..8617dd1680 100644
--- a/cpukit/include/pci/irq.h
+++ b/cpukit/include/pci/irq.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,9 +9,26 @@
/*
* COPYRIGHT (c) 2010 Cobham Gaisler AB.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
/* IRQ handling does not have so much with PCI to do, this library depends
@@ -19,18 +38,9 @@
#ifndef __PCI_IRQ_H__
#define __PCI_IRQ_H__
-#include <rtems/irq-extension.h>
+#include <rtems/rtems/intr.h>
#include <rtems/score/basedefs.h>
-/*
- * FIXME: This should be available via the IRQ extensions API.
- *
- * https://devel.rtems.org/ticket/3269
- */
-void BSP_shared_interrupt_clear(int irq);
-void BSP_shared_interrupt_unmask(int irq);
-void BSP_shared_interrupt_mask(int irq);
-
/* PCI Handler (ISR) called when IRQ is generated by any of the PCI devices
* connected to the same PCI IRQ Pin. This has been defined the same way as
* rtems_interrupt_handler in order for BSPs to "direct-map" the register
@@ -87,7 +97,7 @@ static inline int pci_interrupt_unregister(int irq, pci_isr isr,
*/
static inline void pci_interrupt_unmask(int irq)
{
- BSP_shared_interrupt_unmask(irq);
+ (void)rtems_interrupt_vector_enable((rtems_vector_number)irq);
}
/* Disable shared PCI IRQ handler. This function will mask the interrupt
@@ -103,7 +113,7 @@ static inline void pci_interrupt_unmask(int irq)
*/
static inline void pci_interrupt_mask(int irq)
{
- BSP_shared_interrupt_mask(irq);
+ (void)rtems_interrupt_vector_disable((rtems_vector_number)irq);
}
/* Acknowledge the interrupt controller by writing to the interrupt controller.
@@ -117,7 +127,7 @@ static inline void pci_interrupt_mask(int irq)
*/
static inline void pci_interrupt_clear(int irq)
{
- BSP_shared_interrupt_clear(irq);
+ (void)rtems_interrupt_clear((rtems_vector_number)irq);
}
#endif /* !__PCI_IRQ_H__ */