ransh
ransh

Reputation: 1702

PCIe with multiple devices in kernel

When using PCIe with multiple devices on it (for example: serial, canbus, i2c, etc.):

  1. Is it that there is a single kernel pci driver which handles all these devices ?

  2. 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

Answers (1)

user656347
user656347

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.

  1. 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.

  2. There will not be multiple PCIe device drivers.

See my response to one of your another queries here.

Upvotes: 1

Related Questions