lkml.org 
[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)
From
Date
On Tue, 2013-02-05 at 11:54 +0100, Michal Simek wrote:
>
> xilinx ppc is big endian
> xilinx arm is little endian
> xilinx microblaze is little endian and big endian

You are talking about the core, why should the xsysace block driver be
synthesized with the same endianness as the core ? That's not terribly
useful, especially since reverse load/stores on ppc are essentially
free...

> It is just sharing the same IP across all platforms. Which is better
> than create new devices and new device drivers for it. It means that
> all of them are register compatible but require access with native
> platform endianness as I listed above.

Every attempt at doing "native platform endianness" has always been a
misguided attempt turning into a trainwreck (see OHCI USB).

Just pick one endian for the device and stick to it.

> It is not a problem to create runtime wrapper and even detect endian
> directly in the driver
> but the point if this is the proper design.
> Also ioread32 and ioread32be shouldn't be used on ARM because there
> are missing memory barriers.

Then fix them, they shouldn't be, it's a bug, it will break many other
drivers. They should be fully equivalent to readl.

Ben.




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