Subject: Re: DMA buffers
To: Marcus Comstedt <marcus@idonex.se>
From: Jason R Thorpe <thorpej@zembu.com>
List: port-dreamcast
Date: 01/19/2001 11:20:54
On Fri, Jan 19, 2001 at 08:16:14PM +0100, Marcus Comstedt wrote:

 > Yes.  Actually, it may very well be specific to the ethernet adapter,
 > as the glue logic is inside the expansion module and not on the DC
 > mainboard.  Anyway, that work is for Monday, when I get my ethernet
 > adapter.  :-)

Cool :-)

 > Thanks for the code.  I'll put that in maple.c.  I'm a little
 > surprised that there isn't already a function like this in kern...

Sure -- you may want to implement a "free" routine, too.  Take a look
at the Alpha bus_dma(9) implementation... the Alpha's will be a good
model for the SuperH, since the Alpha also has a direct-mapped segment.

You can find the code in arch/alpha/common/bus_dma.c.

The reason there's not a routine for this in kern is because it's
machine-depenent -- Not all systems have a direct-mapped segment,
and not all systems can even DMA to host RAM (there is at least one
Alpha system like this!)

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>