[U-Boot-Users] PCI Interrupt

Andrew E. Mileski andrewm at isoar.ca
Wed Jan 19 15:56:28 CET 2005


Marco Schramel wrote:
> Hi,
> 
> Our custom board is designed with a mpc8270. U-Boot is running on it.
> The pci-bridge on the 8270 seems to be initialized. The pci command works and shows me the bridge.
> On the pci-bus is a pci target connect. Its interrupt is routed to IRQ2.
> How i can tell U-Boot that my pci interrupt is IRQ2 ??

Are refering to the interrupt value displayed by the scan done by
pci_hose_scan_bus() in drivers/pci.c?  If not, ignore this message :)

If so, it's probably only relevant if the OS booted doesn't configure
the PCI devices.  I've booted Linux without sane values, as I modded it
to do the config for my board.

If it bugs you in u-boot ...

Initialize the PCI device's PCI_INTERRUPT_LINE config register.  I do
this through a board specific pci_fixup_irq() routine that is registered
with the hose.

I'm using a custom 440GX board, but your's may be similar.  Here's an
excerpt from the board specific init file (not saying it's "right" just
that it seems to work):

/* Called if CFG_PCI_PRE_INIT defined in board config */
int pci_pre_init(struct pci_controller *hose)
{
         /* Install the configuration call-back table */
         hose->config_table = custom_config_table;

         /* Install interrupt map */
         hose->fixup_irq = pci_fixup_irq;

	return 1;
}

static void pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
{
         u16 vendor_id, device_id;

         pci_hose_read_config_word(hose, dev, PCI_VENDOR_ID, &vendor_id);
         pci_hose_read_config_word(hose, dev, PCI_DEVICE_ID, &device_id);

         if (vendor_id == PCI_VENDOR_ID_XILINX) {
                 if (device_id == PCI_DEVICE_ID_XILINX_V2PRO) {
                         /* Xilinx V2Pro - IRQ29 */
                         pci_hose_write_config_byte(hose, dev,
                                 PCI_INTERRUPT_LINE, 29);
                         return;
                 }
	}
}


--
Andrew E. Mileski




More information about the U-Boot mailing list