On Wed, Feb 22, 2006 at 03:47:40PM -0600, Kumar Gala wrote:The situation I have is an FPGA connected over PCI. The FPGA implements
various device functionality (serial ports, I2C controller, IR, etc.) as a
single PCI device/function. The FPGA breaks any notion of a true PCI
device, it uses PCI as a device interconnect more than anything else.
We have at least one example where we have a single PCI function
containing more than one type of functionality which are the parallel
port and serial cards [*]. Normally, the different types of
functionality are accessible via different BARs which at least gives
some logical separation.
It's not really a good model because you have to have a special PCI
probe driver to register the various functionalities with the subsystems
rather than using the generic 8250_pci and parport_pci drivers directly.
Also it can have problems if you want to have (eg) serial built-in and
i2c as a module.
The alternative as Greg points out is to implement a pseudo bus_type, but
I start to worry about the overhead associated with doing so.
Given the choice between a small PCI "probe" driver for a small number
of functionalities and a complete driver model infrastructure, I'd
prefer the former over the latter.