PCI endianess

Armin Schindler mac at melware.de
Wed Sep 4 18:27:44 EST 2002


On Wed, 4 Sep 2002, Anil K Prasad wrote:
> >Do you mean this happens without conversion (e.g. read/write{bwl]) ?
> >Then it is exactly what I need.
> >If I do on my big endian machine:
> > unsigned short val = 0x1234;
> > x->command = val;
> you must do something like this:
>
> out_le16(x->command, val); for 16 bit data
> and out_le32 for 32 bit data.
>
> Using these out_le16/32 will ensure portability across different endian
> platforms.
>
>
> >Is 0x1234 stored as little endian on the cards ram ?
> Yes.

Now I'm really confused. "Yes" with or without out_le16/32 ?

When I just do
 x->command = val;
without out_leXX, is 0x1234 on PCI cards ram in little endian ?

Armin


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list