2002-04-10 07:13:00

by Gabor Kerenyi

[permalink] [raw]
Subject: how to write driver for PCI cards

Hi all!

There is a good news (at least for me), my company would like to have a Linux
driver for its card. And this great task is mine. So I'm going to write a
driver.
But I don't know where to start. OK, the interface and how the driver should
be written is clear(more or less) but I don't have any documents for it. It
is a PCI card. I've got the card and the documentation. But I can say I have
only the card, the documentation is in Japanese... :-(((

There is a win driver for it but the source code is not available.

Can anyone give me some online docs about PCI bus? (I found some info about
PCI-9050 chip but it doesn't contain what I need.) Or some advice? (no, I
don't want to learn Japanese :)

Thx

Gabor




2002-04-10 16:18:11

by Ed Vance

[permalink] [raw]
Subject: RE: how to write driver for PCI cards

Hi Gabor,

> There is a good news (at least for me), my company would like to
> have a Linux driver for its card. And this great task is mine.
> So I'm going to write a driver.

What kind of card is it? serial, SCSI, network? ...

> But I don't know where to start. OK, the interface and how the
> driver should be written is clear(more or less) but I don't have
> any documents for it.

A good place to start is to find and study an existing Linux driver
for a similar device.

> Can anyone give me some online docs about PCI bus? (I found some
> info about PCI-9050 chip but it doesn't contain what I need.)

Did you mean PLX-9050 PCI interface chip? This is a widely used chip
and should have several examples. If your device uses interrupts, you
will need to know how the kind of interrupt sources (edge, level) and
how they are connected to the 9050.

A Linux PCI HOW-TO file is at http://www.tldp.org/HOWTO/PCI-HOWTO.html.
General Linux PCI driver info is in /usr/src/linux*/Documentation/pci.txt.
See also /usr/src/linux*/Documentation/devices.txt. That's a start.

Good luck,
Ed Vance

2002-04-11 04:47:32

by Gabor Kerenyi

[permalink] [raw]
Subject: Re: how to write driver for PCI cards

On Thursday 11 April 2002 01:18, Ed Vance wrote:

> > There is a good news (at least for me), my company would like to
> > have a Linux driver for its card. And this great task is mine.
> > So I'm going to write a driver.
>
> What kind of card is it? serial, SCSI, network? ...

It is a PLC/NC (Programmable Logic Controller) now for Compact PCI.

> > Can anyone give me some online docs about PCI bus? (I found some
> > info about PCI-9050 chip but it doesn't contain what I need.)
>
> Did you mean PLX-9050 PCI interface chip? This is a widely used chip
> and should have several examples. If your device uses interrupts, you
> will need to know how the kind of interrupt sources (edge, level) and
> how they are connected to the 9050.

Yes it is a PLX-9050. The device uses interrupts, but why should I have to
know that what type of interrupt it is? Until now I haven't found anything
describing it.
I could find out from the docs that it uses memory I/O and everything is done
through a 8K buffer.

Gabor