PCI/PCI-e Linux driver - Linux
This is a discussion on PCI/PCI-e Linux driver - Linux ; Hi all
I am a masters student at UCT (University of Cape Town). I designed
and implemented a high speed digitizer that uses the x4 PCI-e
interface for communications to the PC.
I am now trying to develop a PCI/PCI-e ...
-
PCI/PCI-e Linux driver
Hi all
I am a masters student at UCT (University of Cape Town). I designed
and implemented a high speed digitizer that uses the x4 PCI-e
interface for communications to the PC.
I am now trying to develop a PCI/PCI-e Linux driver. Does anyone know
of any good coding examples that I could look at as I am a novice?
I have also been given some advice that the driver should also support
DMA?
Thanks in advance...
Jas
-
Re: PCI/PCI-e Linux driver
JSalk wrote:
>
>I am a masters student at UCT (University of Cape Town). I designed
>and implemented a high speed digitizer that uses the x4 PCI-e
>interface for communications to the PC.
>
>I am now trying to develop a PCI/PCI-e Linux driver. Does anyone know
>of any good coding examples that I could look at as I am a novice?
>
>I have also been given some advice that the driver should also support
>DMA?
I presume you created a 4-lane device because you need high bandwidth. In
order to get high bandwidth, your device must do bus mastering. That's
DMA.
Otherwise, you're copying bytes essentially one at a time from the CPU. You
can't get performance that way.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
-
Re: PCI/PCI-e Linux driver
JSalk wrote:
> Hi all
> I am now trying to develop a PCI/PCI-e Linux driver. Does anyone know
> of any good coding examples that I could look at as I am a novice?
I think Linux Device Drivers-3rd by Greg KH is valuable, and under your
kernel source, `Documentation/PCI/pci.txt' provides a brief description
about how to write Linux PCI drivers.
There is also a `pci-skeleton.c' under drivers/net, but it is about
ethernet driver in details.
> I have also been given some advice that the driver should also support
> DMA?
DMA is necessary for high performance, and `Documentation/DMA-mapping.txt'
in kernel source documents PCI DMA well.
Good luck