Subject: Re: ncr53cxxx driver design issues
To: Eduardo Horvath <eeh@turbolinux.com>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 04/17/2000 02:25:22
Eduardo Horvath wrote:

> If we're talking about DMA memory then we should add an equivalent set of
> bus_dma_{read,write}*() routines rather than use htole()/htobe().

I agree.  Right now it's (almost) impossible to write a driver that is independent
of the endianness of the bus.  I've made the same observation when writing
the host controller drivers for USB.  You need to make some data structures
in memory that will later be accessed by DMA, but to make these have the
right endianness you need to know then endianness of the bus.  Which is something
that a bus independent driver cannot have built in.

So I'd like to see some bus_dma_mem_{read,write}*()  (or whatever you want
to call them) that encapsulates this knowledge.


--

        -- Lennart