[lkml]   [2013]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] drivers/block/xsysace - replace in(out)_8/in(out)_be16/in(out)_le16 with generic iowrite(read)8/16(be)
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


 \ /
  Last update: 2013-02-05 14:21    [W:0.131 / U:3.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site