public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: Greg KH <greg@kroah.com>, linux-kernel@vger.kernel.org
Subject: Re: what's a platform device?
Date: Thu, 23 Feb 2006 09:33:48 +0000	[thread overview]
Message-ID: <20060223093348.GB6248@flint.arm.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0602221517370.21264-100000@gate.crashing.org>

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.


* - I'm slightly biased here because it seems I've ended up "owning" the
    serial parts of parport_serial, though I don't want to admit that in
    public.  (damn, I just did!)  I think that, provided the subsystems
    are sanely written such that there is very little or no code
    duplication, this method is as good as any other method.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  parent reply	other threads:[~2006-02-23  9:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-22 21:47 what's a platform device? Kumar Gala
2006-02-23  4:39 ` Greg KH
2006-02-23  4:55   ` Kumar Gala
2006-02-23  5:13     ` Greg KH
2006-02-23  7:04       ` Kumar Gala
2006-02-23 19:30         ` Kumar Gala
2006-02-24  1:42           ` Greg KH
2006-02-27 22:25             ` Kumar Gala
2006-03-02 15:39               ` Russell King
2006-02-23  9:33 ` Russell King [this message]
2006-02-23 16:13   ` Kumar Gala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060223093348.GB6248@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=galak@kernel.crashing.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox