Subject: Re: bus.h style question
To: Leo Weppelman <email@example.com>
From: Martin Husemann <firstname.lastname@example.org>
Date: 08/15/1997 16:18:37
Leo Weppelman wrote:
> No, you can't use a 'read_4' here. AFAIK, the bus interface does not specify
> endian conversion. Besides, the conversion is dependent on the _card_ and
> not on the machine or bus (some network cards allow endian selection).
But it's my driver talking to the card (and probably selecting endianess mode).
So, as it seems to be, I can't rely on any byte ordering for any situation
and simply can not use bus_space_read_N for N > 1, right?
I certainly know the endianess of the card. I can swap bytes as appropriate.
And, in this case at least, I can always use bus_space_read_1, since the card's
interface allows it. I will do that, just to be sure.
What are the bus_space_read_2/4/8 functions for, if they don't work in MI
drivers? And what about cards requiring the use of 2-byte or 4-byte IO
instructions to get the correct behaviour?