public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kumar Gala <kumar.gala@freescale.com>
To: Linux Kernel Development <linux-kernel@vger.kernel.org>
Cc: Embedded PPC Linux list <linuxppc-embedded@ozlabs.org>,
	linux-arm-kernel@lists.arm.linux.org.uk,
	Linux/PPC Development <linuxppc-dev@ozlabs.org>
Subject: Second Attempt: Driver model usage on embedded processors
Date: Mon, 6 Dec 2004 23:03:07 -0600	[thread overview]
Message-ID: <48C50EC3-480D-11D9-8A5A-000393DBC2E8@freescale.com> (raw)

I'm looking at moving support for PowerPC System on a Chip devices to 
using the 2.6 driver model.  I think may issues may apply to any system 
on a chip device. I have a few issues, however one is holding up 
progress.  I think the best way to ask my question is with an example:

On a given chip we have an ethernet controller that is directly 
available to the CPU.  The ideas is that this device would be a 
platform device.  The issue is that this controller may have several 
minor variations on the same chip or between chip models.  We have 
written a single driver to handle these variants.  Variants may 
include, support for Gigabit, support for RMON, support for interrupt 
coalescing.  Additionally, the driver needs to be based some 
information that is board specific.  Such as which PHY, at what PHY id, 
does the PHY have an interrupt, etc.

The intent was that I would use the platform_data pointer to pass board 
specific information to the driver.  We would have board specific code 
which would fill in the information.  The question I have is how to 
handle the device variant information which is really static?

Possible solutions I've come up with:
1. use a struct resource for the flags that describe ethernet variants
- Add a new resource type
- steal a bus specific resource type
2. create a super structure that platform_data points to which contains 
the flags and a board_data pointer

The issue I've got with #2 is that some of these devices (and therefor 
drivers) will end up existing on various parts from Freescale that 
might have an ARM core or PPC core.  I'd prefer a solution that did not 
impose restrictions on how an arch does things.

I a few other questions about headers and were to put things, but 
that's secondary.

- kumar


             reply	other threads:[~2004-12-07  5:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-07  5:03 Kumar Gala [this message]
2004-12-07 10:55 ` Second Attempt: Driver model usage on embedded processors Erik Mouw
2004-12-07 12:09 ` Jason McMullan
2004-12-07 14:53 ` Dan Malek
2004-12-08 14:53   ` Sylvain Munaut
2004-12-08 16:10   ` Andy Fleming
2004-12-08 17:11     ` Dan Malek

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=48C50EC3-480D-11D9-8A5A-000393DBC2E8@freescale.com \
    --to=kumar.gala@freescale.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=linuxppc-embedded@ozlabs.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