public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Patrick Mochel <mochel@osdl.org>
Cc: Greg KH <greg@kroah.com>, <linux-kernel@vger.kernel.org>
Subject: Re: Removal of pci_find_* in 2.5
Date: 17 Jul 2002 06:41:23 -0600	[thread overview]
Message-ID: <m1it3eo7bg.fsf@frodo.biederman.org> (raw)
In-Reply-To: <Pine.LNX.4.33.0207161025230.14360-100000@geena.pdx.osdl.net>

Patrick Mochel <mochel@osdl.org> writes:

> On 16 Jul 2002, Eric W. Biederman wrote:
> 
> > Greg KH <greg@kroah.com> writes:
> > 
> > > I don't think there is a good way for you to convert over to
> > > _register_driver(), that's the main reason I'm keeping the pci_find_*
> > > functions around, they are quite useful for lots of situations.
> > > 
> > > It doesn't sound like you are worrying about your device working in a
> > > pci hotplug system, and you would probably be willing do any pci device
> > > conversion work to the new driver model yourself, right?  :)
> > 
> > Assuming I can actually fit in better with the new driver model.  As
> > far as hot-plug.  It is an abuse but I regularly hot-swap my rom chips
> > in my development system.
> 
> No, but you do do firmware, and you have a desire to tell the kernel about 
> which devices are in the system from the firmware. The code path once you 
> discover the device is exactly the same as if you were to actually plug 
> in the device, or probe for it natively.

A clarification here.  I am thinking of drivers/mtd/maps/ich2rom.c, or
drivers/mtd/maps/amd766rom.c.  (Should be in 2.4.19).  What the driver
do is find a pci bridge device behind which rom chips are usually
found, and then it probes for a rom chip, behind the bridge.  

Despite being LPC/ISA, there is a moderately standard way of getting a
chip id from a rom chip (see drivers/mtd/chips/jedec_probe.c).  Armed
with the chip id I dynamically select the chip driver.  

In practice my driver really is a driver for a subset of the bridge
chip, allowing access to the rom chip.  Besides giving a clue which
addresses to probe the map driver also enables writes to the rom chip.

>From the firmware side it is easy to tell the kernel there is a rom
chip at address xxx for yyy bytes behind zzz.  The challenging part is
what structure the driver should really take.  And for that I am
asking for advice, or at least some ideas.

> > In any case I would like to have code that fits in nicely with the
> > new driver system.  I can take about one change in kernel API.  For
> > the most part the drivers are trivial, and having non-trivial
> > maintenance for trivial code is less than ideal.
> 
> We don't want to make things difficult. It's a PITA right now, since the 
> documentation is lacking and not all the infrastructure is in place to 
> really start plowing ahead. But, it will get better..

Well I want to keep the reminders coming of weird things that are
actually supportable right now, and to ask for help in finding better
ways to construct the drivers.  If I could just do firmware my job
would be so much easier :)

Eric

  reply	other threads:[~2002-07-17 12:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-13  0:36 Removal of pci_find_* in 2.5 Greg KH
2002-07-13  2:23 ` Alan Cox
2002-07-13  1:12   ` David S. Miller
2002-07-13 14:46     ` Alan Cox
2002-07-13 20:52       ` David S. Miller
2002-07-13 13:45         ` Benjamin Herrenschmidt
2002-07-15  5:25           ` David S. Miller
2002-07-16  0:26             ` Greg KH
2002-07-14 20:07 ` Eric W. Biederman
2002-07-16  0:25   ` Greg KH
2002-07-16 10:56     ` Eric W. Biederman
2002-07-16 17:33       ` Patrick Mochel
2002-07-17 12:41         ` Eric W. Biederman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-13  4:04 Matt_Domsch
2002-07-13  4:41 ` Jeff Garzik
2002-07-13  5:09   ` Greg KH
2002-07-13 14:35   ` Alan Cox
2002-07-13 15:37     ` Jeff Garzik
2002-07-13 17:06       ` Alan Cox
2002-07-13 19:28         ` Jeff Garzik
2002-07-13 19:33           ` Jeff Garzik
2002-07-13 13:13 Matt_Domsch
2002-07-16 19:23 Matt_Domsch

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=m1it3eo7bg.fsf@frodo.biederman.org \
    --to=ebiederm@xmission.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.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