pci: Do not use BSP-specific interrupt API

Update #3269.
This commit is contained in:
Sebastian Huber
2023-06-15 14:43:30 +02:00
parent bbc9f7ef13
commit 83305f5050

View File

@@ -38,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
@@ -106,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
@@ -122,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.
@@ -136,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__ */