mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-25 22:07:15 +00:00
sparc: Remove BSP specifics from <pci/irq.h>
Update #3254. Update #3260. Update #3269.
This commit is contained in:
@@ -177,13 +177,6 @@ void rtems_bsp_delay(int usecs);
|
||||
void console_outbyte_polled(int port, unsigned char ch);
|
||||
int console_inbyte_nonblocking(int port);
|
||||
|
||||
/* BSP PCI Interrupt support - to avoid warnings by libpci */
|
||||
#define BSP_PCI_shared_interrupt_register BSP_shared_interrupt_register
|
||||
#define BSP_PCI_shared_interrupt_unregister BSP_shared_interrupt_unregister
|
||||
#define BSP_PCI_shared_interrupt_unmask BSP_shared_interrupt_unmask
|
||||
#define BSP_PCI_shared_interrupt_mask BSP_shared_interrupt_mask
|
||||
#define BSP_PCI_shared_interrupt_clear BSP_shared_interrupt_clear
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -201,13 +201,6 @@ void rtems_bsp_delay(int usecs);
|
||||
*/
|
||||
int cchip1_register(void);
|
||||
|
||||
/* BSP PCI Interrupt support */
|
||||
#define BSP_PCI_shared_interrupt_register BSP_shared_interrupt_register
|
||||
#define BSP_PCI_shared_interrupt_unregister BSP_shared_interrupt_unregister
|
||||
#define BSP_PCI_shared_interrupt_unmask BSP_shared_interrupt_unmask
|
||||
#define BSP_PCI_shared_interrupt_mask BSP_shared_interrupt_mask
|
||||
#define BSP_PCI_shared_interrupt_clear BSP_shared_interrupt_clear
|
||||
|
||||
/* AT697 has PCI defined as big endian */
|
||||
#define BSP_PCI_BIG_ENDIAN
|
||||
|
||||
|
||||
@@ -233,13 +233,6 @@ extern const unsigned char LEON3_mp_irq;
|
||||
extern const unsigned char LEON3_irq_to_cpu[32];
|
||||
#endif
|
||||
|
||||
/* BSP PCI Interrupt support */
|
||||
#define BSP_PCI_shared_interrupt_register BSP_shared_interrupt_register
|
||||
#define BSP_PCI_shared_interrupt_unregister BSP_shared_interrupt_unregister
|
||||
#define BSP_PCI_shared_interrupt_unmask BSP_shared_interrupt_unmask
|
||||
#define BSP_PCI_shared_interrupt_mask BSP_shared_interrupt_mask
|
||||
#define BSP_PCI_shared_interrupt_clear BSP_shared_interrupt_clear
|
||||
|
||||
/* Common driver build-time configurations. On small systems undefine
|
||||
* [DRIVER]_INFO_AVAIL to avoid info routines get dragged in. It is good
|
||||
* for debugging and printing information about the system, but makes the
|
||||
|
||||
@@ -14,10 +14,18 @@
|
||||
#ifndef __PCI_IRQ_H__
|
||||
#define __PCI_IRQ_H__
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/irq-extension.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
|
||||
@@ -43,7 +51,9 @@ extern int pci_dev_irq(pci_dev_t dev);
|
||||
RTEMS_INLINE_ROUTINE int pci_interrupt_register(int irq, const char *info,
|
||||
pci_isr isr, void *arg)
|
||||
{
|
||||
return BSP_PCI_shared_interrupt_register(irq, info, isr, arg);
|
||||
return rtems_interrupt_handler_install(irq, info,
|
||||
RTEMS_INTERRUPT_SHARED, isr,
|
||||
arg);
|
||||
}
|
||||
|
||||
/* Unregister previously registered shared PCI IRQ handler
|
||||
@@ -56,7 +66,7 @@ RTEMS_INLINE_ROUTINE int pci_interrupt_register(int irq, const char *info,
|
||||
RTEMS_INLINE_ROUTINE int pci_interrupt_unregister(int irq, pci_isr isr,
|
||||
void *arg)
|
||||
{
|
||||
return BSP_PCI_shared_interrupt_unregister(irq, isr, arg);
|
||||
return rtems_interrupt_handler_remove(irq, isr, arg);
|
||||
}
|
||||
|
||||
/* Enable shared PCI IRQ handler. This function will unmask the interrupt
|
||||
@@ -72,7 +82,7 @@ RTEMS_INLINE_ROUTINE int pci_interrupt_unregister(int irq, pci_isr isr,
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void pci_interrupt_unmask(int irq)
|
||||
{
|
||||
BSP_PCI_shared_interrupt_unmask(irq);
|
||||
BSP_shared_interrupt_unmask(irq);
|
||||
}
|
||||
|
||||
/* Disable shared PCI IRQ handler. This function will mask the interrupt
|
||||
@@ -88,7 +98,7 @@ RTEMS_INLINE_ROUTINE void pci_interrupt_unmask(int irq)
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void pci_interrupt_mask(int irq)
|
||||
{
|
||||
BSP_PCI_shared_interrupt_mask(irq);
|
||||
BSP_shared_interrupt_mask(irq);
|
||||
}
|
||||
|
||||
/* Acknowledge the interrupt controller by writing to the interrupt controller.
|
||||
@@ -102,7 +112,7 @@ RTEMS_INLINE_ROUTINE void pci_interrupt_mask(int irq)
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void pci_interrupt_clear(int irq)
|
||||
{
|
||||
BSP_PCI_shared_interrupt_clear(irq);
|
||||
BSP_shared_interrupt_clear(irq);
|
||||
}
|
||||
|
||||
#endif /* !__PCI_IRQ_H__ */
|
||||
|
||||
Reference in New Issue
Block a user