I don't actually have that much experience using the parallel port in
the more recent modes, but I know for a fact that DMA writes do work. I
think you have to tell your parport_pc module about it though if you
want to use it. Here is an excerpt from my parport_pc file:
options parport_pc io=0x378 irq=7 dma=3
If you load the module with options similar to these,
/proc/sys/dev/parport/parport0/modes should tell you what modes the
parallel port supports. I get:
A quick look through the parport_pc.c code shows that there are
functions that seem to apply to superio and that do DMA stuff so you
might be in luck.
I don't know if the application software has to do anything special to
use the DMA, I think it might get selected automatically when you
negociate the correct ECP mode. So if your device follows the standard
you should be able to get it working in DMA mode even from user space,
with very little extra work. But I really am beyond what I know, so
you will have to poke around and try things out. The parport_pc.c code
is pretty informative from what I remember.
Quoted from Bob Tanner on Fri, May 02, 2003 at 10:40:51PM -0500.
> On Friday 02 May 2003 08:38 pm, Blaise Gassend wrote:
> > There is some DMA code in parport_pc.c. For writing to the port it works
> > well. For reading from the port there is some code that I hacked up that
> > is circulating with the CPiA webcam drivers, but it only works for those
> > webcams. For the webcam it produces a HUGE improvement in performance.
> > What exactly are you trying to do?
> Writing bytes to a custom piece of hardware. Speed is #1 priority and dma was
> brought up as a factor in speed.
> It's a bit if a screwy situation, since the code is in user-space, and I'd
> think a kernel driver would be much faster.
> Bob Tanner <firstname.lastname@example.org> | Phone : (952)943-8700
> http://www.mn-linux.org, Minnesota, Linux | Fax : (952)943-8500
> http://www.linuxjustworks.com | Linux Just Works!
> Key fingerprint = AB15 0BDF BCDE 4369 5B42 1973 7CF1 A709 2CC1 B288
-- To unsubscribe, send mail to: email@example.com --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Sat May 03 2003 - 01:32:12 EDT