[U-Boot-Users] PCI Interrupt

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 ??
Thanks in advance
Marco Schramel

In message 200501190712.49778.Schramel.Linux@go.bartec.de you wrote:
How i can tell U-Boot that my pci interrupt is IRQ2 ??
What for? U-Boot does not use interrupts.
Best regards,
Wolfgang Denk

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
participants (3)
-
Andrew E. Mileski
-
Marco Schramel
-
Wolfgang Denk