Reputation: 1702
When using PCIe with multiple devices on it (for example: serial, canbus, i2c, etc.):
Is it that there is a single kernel pci driver which handles all these devices ?
Or should it be implemented by using multiple pci device drivers, each using the same DEVICE_ID and VENDOR_ID ?
If we use the first method:
Does it mean we need not call "request_region
" becuase the same resource are used in different drivers ?
If we use the second method above:
What about the interrupt routine ? Is it a single interrupt routine for all these devices ?
Can anyone reference an example from kernel source tree ?
Upvotes: 0
Views: 1134
Reputation:
Based on one of your other questions, I am assuming you are talking about FPGA with custom IP blocks connected over PCIe to a ARM CPU complex.
PCIe driver does not handle any of these devices. The memory map/space for these IP blocks would be exposed over PCIe. When any of these peripheral devices trigger an IRQ, the IRQ would become a PCIe MSI IRQ and given to the respective peripheral driver's IRQ handler.
There will not be multiple PCIe device drivers.
See my response to one of your another queries here.
Upvotes: 1