VxWorks API Reference : Driver Libraries

pciIntLib

NAME

pciIntLib - PCI Shared Interrupt support

ROUTINES

pciIntLibInit( ) - initialize the pciIntLib module
pciInt( ) - interrupt handler for shared PCI interrupt.
pciIntConnect( ) - connect the interrupt handler to the PCI interrupt.
pciIntDisconnect( ) - disconnect the interrupt handler (OBSOLETE)
pciIntDisconnect2( ) - disconnect an interrupt handler from the PCI interrupt.

DESCRIPTION

This component is PCI Revision 2.1 compliant.

The functions addressed here include:

Shared PCI interrupts are supported by three functions: pciInt( ), pciIntConnect( ), and pciIntDisconnect2( ). pciIntConnect( ) adds the specified interrupt handler to the link list and pciIntDisconnect2( ) removes it from the link list. The master interrupt handler pciInt( ) executes these interrupt handlers in the link list for a PCI interrupt. Each interrupt handler must check the device dependent interrupt status bit to determine the source of the interrupt, since it simply execute all interrupt handlers in the link list. pciInt( ) should be attached by intConnect( ) function in the BSP initialization with its parameter. The parameter is an vector number associated to the PCI interrupt.


Driver Libraries : Routines

pciIntLibInit( )

NAME

pciIntLibInit( ) - initialize the pciIntLib module

SYNOPSIS

STATUS pciIntLibInit (void)

DESCRIPTION

This routine initializes the linked lists used to chain together the PCI interrupt service routines.

RETURNS

OK, or ERROR upon link list failures.

SEE ALSO

pciIntLib


Driver Libraries : Routines

pciInt( )

NAME

pciInt( ) - interrupt handler for shared PCI interrupt.

SYNOPSIS

VOID pciInt
    (
    int irq                   /* IRQ associated to the PCI interrupt */
    )

DESCRIPTION

This routine executes multiple interrupt handlers for a PCI interrupt. Each interrupt handler must check the device dependent interrupt status bit to determine the source of the interrupt, since it simply execute all interrupt handlers in the link list.

This is not a user callable routine

RETURNS

N/A

SEE ALSO

pciIntLib


Driver Libraries : Routines

pciIntConnect( )

NAME

pciIntConnect( ) - connect the interrupt handler to the PCI interrupt.

SYNOPSIS

STATUS pciIntConnect
    (
    VOIDFUNCPTR * vector,     /* interrupt vector to attach to */
    VOIDFUNCPTR   routine,    /* routine to be called */
    int           parameter   /* parameter to be passed to routine */
    )

DESCRIPTION

This routine connects an interrupt handler to a shared PCI interrupt vector. A link list is created for each shared interrupt used in the system. It is created when the first interrupt handler is attached to the vector. Subseqent calls to pciIntConnect just add their routines to the linked list for that vector.

RETURNS

OK, or ERROR if the interrupt handler cannot be built.

SEE ALSO

pciIntLib


Driver Libraries : Routines

pciIntDisconnect( )

NAME

pciIntDisconnect( ) - disconnect the interrupt handler (OBSOLETE)

SYNOPSIS

STATUS pciIntDisconnect
    (
    VOIDFUNCPTR * vector,     /* interrupt vector to attach to */
    VOIDFUNCPTR   routine     /* routine to be called */
    )

DESCRIPTION

This routine disconnects the interrupt handler from the PCI interrupt line.

In a system where one driver and one ISR services multiple devices, this routine removes all instances of the ISR because it completely ignores the parameter argument used to install the handler.

NOTE

Use of this routine is discouraged and will be obsoleted in the future. New code should use the pciIntDisconnect2( ) routine instead.

RETURNS

OK, or ERROR if the interrupt handler cannot be removed.

SEE ALSO

pciIntLib


Driver Libraries : Routines

pciIntDisconnect2( )

NAME

pciIntDisconnect2( ) - disconnect an interrupt handler from the PCI interrupt.

SYNOPSIS

STATUS pciIntDisconnect2
    (
    VOIDFUNCPTR * vector,     /* interrupt vector to attach to */
    VOIDFUNCPTR   routine,    /* routine to be called */
    int           parameter   /* routine parameter */
    )

DESCRIPTION

This routine disconnects a single instance of an interrupt handler from the PCI interrupt line.

NOTE

This routine should be used in preference to the original pciIntDisconnect( ) routine. This routine is compatible with drivers that are managing multiple device instances, using the same basic ISR, but with different parameters.

RETURNS

OK, or ERROR if the interrupt handler cannot be removed.

SEE ALSO

pciIntLib