PCI enumeration and IRQ_CONNECT ?
Marcus Shawcroft <marcus.shawcroft@...>
A question has come up in one of the config_info refactor patches
about the relationship between PCI enumeration and IRQ_CONNECT.... (
Can anyone shed some light on how PCI enumeration and IRQ_CONNECT
interact in the DW GPIO, I2C and SPI drivers?
Specifically, the initialization of these drivers appears to be that:
- PCI enumeration populates driver_data->pci_dev via a call to pci_bus_scan()
- irq_num is pulled out of the pci_dev structure and stored in the
- irq_enable() is called to enable the irq_num
- IRQ_CONNECT() is called to connect a hardwired (static) IRQ number
(e.g CONFIG_INTEL_PORT_0_IRQ) to the interrupt service routine.
Hence we have an statically configured interrupt number passed to
IRQ_CONNECT() and an irq_num returned from PCI enumeration, and no
obvious connection between the two.
How does the isr get connected to the interrupt from pci enumeration?