Subject: Re: ncr53cxxx driver design issues
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Eduardo Horvath <eeh@turbolinux.com>
List: tech-kern
Date: 04/16/2000 13:33:57
On Sun, 16 Apr 2000, Manuel Bouyer wrote:
> Another issue is endianess: all 53c8xx are assumed to be little endian (as
> they live behind a PCI bus); but I guess the 720 can be either big or little
> depending on which bus it's connected. A flag set by the bus front end
> will probably be needed so that the bus-independant part can use htole/htobe
> as appropriate.
If we're talking about registers then this should already be handled by
bus_space_{read,write}*() routines and no htole()/htobe() should be
needed.
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().
One *VERY IMPORTANT* thing to remember is that UltraSPARC machines can
support both SBus (big-endian) and PCI (little-endian) on the same
machine, and it is even possible to have the same device on both SBus and
PCI so you cannot hardcode bitswapping for a particular device based on
the architecture.
Eduardo Horvath