Skip to contentSkip to conversation

PCI Interrupt

U-Boot-Users Marco Schramel 3 participants 3 messages Jan 19, 2005

lore
Share & tools
lore
#0 lore raw

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

Signature · 10 lines
---------
Marco Schramel
R&D
Bartec GmbH
Schulstr. 30
94239 Gotteszell, Germany
www.bartec.de
Marco.Schramel at go.bartec.de
Phone:  +49 (0)9929/301332
Fax:    +49 (0)9929/301112
#1 lore raw
Quoted 2 lines · In message <[email protected]> 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

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
At the source of every error which is blamed on the computer you will
find at least two human errors, including the error of blaming it  on
the computer.
#2 lore raw
In reply to Marco Schramel
Quoted 6 lines · Marco Schramel

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