Re: [PATCH] drivers/block/xsysace - replacein(out)_8/in(out)_be16/in(out)_le16 with generic iowrite(read)8/16(be)
From: Benjamin Herrenschmidt
Date: Tue Feb 05 2013 - 07:30:53 EST
On Tue, 2013-02-05 at 17:39 +0530, Vineet Gupta wrote:
> Am I correct in understanding that "be" suffix here reflects the byte ordering of
> the device and not the CPU. So for a BE device, driver using ioread32be on LE
> processor will get MSB first data - and accessor will swap the bytes to make it
> lsb first in register, while on BE processor, the lanes to memory are swapped,
> causing the msb first word to be flipped before ending up in the cpu register - so
> in the end, CPU register on either will have the exact same value. Correct ?
Yes. That's how ioread32 and ioread32be are defined. They relate to the device
endianness regardless of the CPU endianness.
ioread32 -> little endian device
ioread32be -> big endian device
Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/