Subject: Re: bus.h style question
To: Jason Thorpe <email@example.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 08/18/1997 00:50:17
On Sun, 17 Aug 1997 04:02:43 -0700,
Jason Thorpe <firstname.lastname@example.org> writes:
> For a given bus, you know the bus's "native byte order". Seems like
> #if BYTE_ORDER == BIG_ENDIAN
> /* Fixup multi-byte streams */
> /* Don't do fixups. */
...might be appropriate.
That works when you know the intended _bus_ byte order, and bus
byteorder is always the same as the driver hardware byte-order.
I don't see how it would work, in general, in chipset-level drivers,
for chips that appear on busses with different endian-ness.
> Or, additional bus.h entry points which are
>explicitly designed to do multi-byte streams.
Hey, that makes me happy, as long as the methods are wide enough to do
efficient access to bytestreams accessed via 16-bit, 32-bit or (even
64-bit) device registers.