mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Igmar Palsenberg <i.palsenberg@jdimedia.nl>,
	<linux-kernel@vger.kernel.org>
Subject: Re: New PCI device
Date: Sun, 22 Jul 2001 20:02:43 +0200	[thread overview]
Message-ID: <20010722180243.22142@smtp.wanadoo.fr> (raw)
In-Reply-To: <Pine.LNX.4.33.0107221342140.1363-100000@jdi.jdimedia.nl>
In-Reply-To: <Pine.LNX.4.33.0107221342140.1363-100000@jdi.jdimedia.nl>

>
>I'm still thinking about what driver to create.. A driver that
>emulates a PCMCIA controller is a knightmare, but so is an ethernet driver
>for this setup.

I didn't follow closely, but Imy understanding is that the prismII is
not removable on the PCI card, that's it ? The PLX chip is probably 
used to bridge the 16 bits PIO prism device, It doesn't make much sense
to emulate PCMCIA.

>The 2.4.x kernel has support for the wireless card itself, but in a PCMCIA
>context. Creating a ethernet driver creates a lot of duplicate code.

First, get a recent 2.4.x, 2.4.6 should you give you the latest version.

The kernel driver for those chipsets is designed in a way that should allow
you to easily add new interface types. Look at what's in drivers/net/wireless,
more specifically the files hermes.c, orinoco.c, orinoco_cs.c and airport.c.

The drivers's layout is basically;

     - hermes    : low level routines for talking to the controller,
                   you initialize this layer by passing it an IO base
                   for use with inx/outx routines. You shouldn't have
                   to modify it.
 
     - orinoco   : core driver. Implements the interface to the kernel
                   network stack, the wireless interface, etc...
                   You shouldn't need to change it neither

Now are the bus interfaces :

     - orinoco_cs : PCMCIA interface
     - airport    : Apple "Airport" interface

What you have to do is basically add a module for your card. You should
write a basic PCI driver that mostly does what airport does (except
the powermac specific stuffs , mostly calls to feature_xxx() functions,
just ignore them). That is get the card's IO base address and request
an interrupt, implement open() and close() wrappers, and that's it.

HOWEVER, the low-level hermes layer can only do PIO for now (inx/outx).
If you card requires MMIO, then it will not be that simple. You'll probably
have to work on the hermes layer to provide 2 implementations, a PIO one
and an MMIO one.
For the Airport driver, which is MMIO based, we can "fake" this because
the Airport interface exist only on PowerMacs, and on PPC, PIO is actually
MMIO in a specific address range.

I don't know if the PLX bridge provides anything like GPIOs and/or if
there's a separate PLD on your card. In these cases, it's possible that
some card-specific IO magic be needed to properly initialize the prism.
That's the case with Apple airport on which you have to "emulate" some
PCMCIA stuffs for powering it up and resetting the chip.

So if you have problems getting the chip up, you may have to ask the
card manufacturer for some specs.

Ben.



  reply	other threads:[~2001-07-22 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-21 15:39 Igmar Palsenberg
2001-07-21 16:07 ` Igmar Palsenberg
2001-07-22 11:39 ` Robert J.Dunlop
2001-07-22 11:48   ` Igmar Palsenberg
2001-07-22 18:02     ` Benjamin Herrenschmidt [this message]
2001-07-22 21:55       ` Igmar Palsenberg

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=20010722180243.22142@smtp.wanadoo.fr \
    --to=benh@kernel.crashing.org \
    --cc=i.palsenberg@jdimedia.nl \
    --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

all inboxes | Powered by JetHome®