
3 Porting a BSP to Custom Hardware
3.3 Finalizing Your BSP
93
3
struct PciIntIrq
{
UINT8 bus;
UINT8 device;
UINT8 intPin;
UINT8 irq;
};
static struct PciIntIrq intIrqTable[] =
{
/* on-board Ethernet */
{ MAIN_BUS, MAIN_DEV_ETHER, PCI_INT_LINE_A, INUM_TO_IRQ(INTVEC_ETHER_NUM) },
/* on-board USB */
{ MAIN_BUS, MAIN_DEV_USB, PCI_INT_LINE_A, INUM_TO_IRQ(INTVEC_USB_NUM) },
/* 3.3V PCI slot on main board */
{ MAIN_BUS, MAIN_DEV_SLOT, PCI_INT_LINE_A, INTVEC_PCI_INTA_IRQ },
{ MAIN_BUS, MAIN_DEV_SLOT, PCI_INT_LINE_B, INTVEC_PCI_INTB_IRQ },
{ MAIN_BUS, MAIN_DEV_SLOT, PCI_INT_LINE_C, INTVEC_PCI_INTC_IRQ },
{ MAIN_BUS, MAIN_DEV_SLOT, PCI_INT_LINE_D, INTVEC_PCI_INTD_IRQ },
/* Devices on Compact 3-slot PCI extender board on bus 1 */
{ CPCI_BUS, CPCI_DEV_SLOT_PJ1, PCI_INT_LINE_A, INTVEC_CPCI_INTA_IRQ },
{ CPCI_BUS, CPCI_DEV_SLOT_PJ1, PCI_INT_LINE_B, INTVEC_CPCI_INTB_IRQ },
{ CPCI_BUS, CPCI_DEV_SLOT_PJ1, PCI_INT_LINE_C, INTVEC_CPCI_INTC_IRQ },
{ CPCI_BUS, CPCI_DEV_SLOT_PJ1, PCI_INT_LINE_D, INTVEC_CPCI_INTD_IRQ },
{ CPCI_BUS, CPCI_DEV_SLOT_PJ2, PCI_INT_LINE_A, INTVEC_CPCI_INTC_IRQ },
{ CPCI_BUS, CPCI_DEV_SLOT_PJ2, PCI_INT_LINE_B, INTVEC_CPCI_INTD_IRQ },
{ CPCI_BUS, CPCI_DEV_SLOT_PJ2, PCI_INT_LINE_C, INTVEC_CPCI_INTA_IRQ },
{ CPCI_BUS, CPCI_DEV_SLOT_PJ2, PCI_INT_LINE_D, INTVEC_CPCI_INTB_IRQ },
{ CPCI_BUS, CPCI_DEV_SLOT_PJ3, PCI_INT_LINE_A, INTVEC_CPCI_INTD_IRQ },
{ CPCI_BUS, CPCI_DEV_SLOT_PJ3, PCI_INT_LINE_B, INTVEC_CPCI_INTA_IRQ },
{ CPCI_BUS, CPCI_DEV_SLOT_PJ3, PCI_INT_LINE_C, INTVEC_CPCI_INTB_IRQ },
{ CPCI_BUS, CPCI_DEV_SLOT_PJ3, PCI_INT_LINE_D, INTVEC_CPCI_INTC_IRQ },
{ 0 } /* sentinel */
};
/************************************************************
* sysPciAutoconfigIntrAssign - assign PCI interrupts
*
* This routine returns the interrupt value for PCI auto
* configuration to store in each device/routine’s control
* space. This value will be used later to determine the
* vector to use with intConnect().
*
* This routine is written so that each on-board device
* and each slot that can have a card plugged into it must
* be listed in intIrqTable[]. Because some boards are
* designed with optimized interrupt configuration, the
* automatic interrupt assignment sometimes cannot handle
Comentarios a estos manuales