Re: ioread32 endianess.

2007-02-27 Thread Alexey Zaytsev
On 2/27/07, Kyle McMartin <[EMAIL PROTECTED]> wrote: On Tue, Feb 27, 2007 at 08:20:21AM -0500, Kyle McMartin wrote: > PCI is always little endian, unless it's not. In which case you're probably PCI is always LE, but the host may be different. If you read some data from a PCI device on a LE host,

Re: ioread32 endianess.

2007-02-27 Thread Haavard Skinnemoen
On 2/27/07, Kyle McMartin <[EMAIL PROTECTED]> wrote: __raw_(read|write){b,w,l} are also old style accessors. They always operate in host endianness. Are there any "new style" accessors operating in host endianness? Haavard - To unsubscribe from this list: send the line "unsubscribe linux-kerne

Re: ioread32 endianess.

2007-02-27 Thread Kyle McMartin
On Tue, Feb 27, 2007 at 08:20:21AM -0500, Kyle McMartin wrote: > PCI is always little endian, unless it's not. In which case you're probably > dealing with a graphics card which likely has some kind of palindromic > register which you can read and write to set the endianness of the host > interface

Re: ioread32 endianess.

2007-02-27 Thread Kyle McMartin
On Tue, Feb 27, 2007 at 03:31:20PM +0300, Alexey Zaytsev wrote: > Than how should one write a portable endian-independent driver? Should > I wrap ioread32 with an le32_to_cpu? > PCI is always little endian, unless it's not. In which case you're probably dealing with a graphics card which likely h

Re: ioread32 endianess.

2007-02-27 Thread Alexey Zaytsev
On 2/26/07, Kyle McMartin <[EMAIL PROTECTED]> wrote: On Mon, Feb 26, 2007 at 06:36:05PM +0300, Alexey Zaytsev wrote: > Hello. > > May I ask you, guys, if ioread32 and his friends should treat the data > as host-endian or bus-endian? E.g, should the data read from PCI on a > big-endian host be byt

Re: ioread32 endianess.

2007-02-26 Thread Kyle McMartin
On Mon, Feb 26, 2007 at 06:36:05PM +0300, Alexey Zaytsev wrote: > Hello. > > May I ask you, guys, if ioread32 and his friends should treat the data > as host-endian or bus-endian? E.g, should the data read from PCI on a > big-endian host be byte swapped or not? > It should be in bus-endian. This

ioread32 endianess.

2007-02-26 Thread Alexey Zaytsev
Hello. May I ask you, guys, if ioread32 and his friends should treat the data as host-endian or bus-endian? E.g, should the data read from PCI on a big-endian host be byte swapped or not? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL