2004-09-08 21:25:27

by Pierre Ossman

[permalink] [raw]
Subject: ISA DMA

I'm trying to figure out how to do ISA DMA transfers. I can't figure out
how to satisfy all the requirements the ISA DMA controller sets. I've
set a DMA mask of 0x00ffffff but mappings end up above the 16MB limit
nonetheless. And I have no idea how to keep transfers within the same
64k boundary.

I've been trying to figure out how other drivers do it but I can't see
what I'm missing. And the documentation doesn't cover ISA DMA.

I'm basically stuck now so I'd appreciate any tips you can give me.

Rgds
Pierre Ossman


2004-09-08 22:55:21

by Tommy Reynolds

[permalink] [raw]
Subject: Re: ISA DMA

Uttered Pierre Ossman <[email protected]>, spake thus:

> I've been trying to figure out how other drivers do it but I can't see
> what I'm missing. And the documentation doesn't cover ISA DMA.

Allocate your DMA buffer area by OR'ing in the "GFP_DMA" flag. This
keeps your DMA buffer below the magical 16MB limit. Also be sure to
use "virt_to_bus()" to convert the kernel buffer address into one
that you can give to the DMA engine.

HTH.


Attachments:
(No filename) (447.00 B)
(No filename) (189.00 B)
Download all attachments

2004-09-08 23:33:52

by Alan

[permalink] [raw]
Subject: Re: ISA DMA

On Mer, 2004-09-08 at 22:28, Pierre Ossman wrote:
> I'm trying to figure out how to do ISA DMA transfers. I can't figure out
> how to satisfy all the requirements the ISA DMA controller sets. I've
> set a DMA mask of 0x00ffffff but mappings end up above the 16MB limit
> nonetheless. And I have no idea how to keep transfers within the same
> 64k boundary.

drivers/net/lance.c is a pretty good worked example of driving the old
ISA bus grunge.


2004-09-09 15:14:56

by Pierre Ossman

[permalink] [raw]
Subject: Re: ISA DMA

Alan Cox wrote:

>drivers/net/lance.c is a pretty good worked example of driving the old
>ISA bus grunge.
>
>
>
Thanks. That helped solve some of the problems at least. The transfers
still only work some of the time. Everything seems ok but only junk in
the buffers. Not sure which part is causing it so it'll require some
more research.

Rgds
Pierre