Re: [PATCH v3 2/2] i2c: xiic: Use 32bit accesses only
From: Michal Simek <hidden>
Date: 2011-02-23 09:37:39
Also in:
linux-i2c, lkml
Arnd Bergmann wrote:
On Wednesday 23 February 2011 09:08:47 Michal Simek wrote:quoted
Grant Likely wrote:quoted
On Tue, Feb 22, 2011 at 10:49 AM, Michal Simek [off-list ref] wrote:quoted
i2c driver is used for LE/BE that's why is useful to use 32bit accesses. Then it is not necessary to solve any endian issues.Are you sure? I would expect the BE version needs to use io{read,write}32be variants of the accessors. What platforms have you tested on?iowrite32 is the same with iowrite32be for Microblaze. I have no problem to change it to iowrite32be if you like. I have tested it on microblaze big and little endian platforms.I think what Grant was saying is that iowrite32 being the same as iowrite32be is a bug, because iowrite32 is documented to be little-endian.
Can you pointed me to that documentation?
This is probably fine as long as you don't have any PCI devices, but if you ever get PCI support, it won't work.
Microblaze have PCI support but I don't have the board for testing.
Also, it heavily confuses other developers such as Grant and me if one architecture defines things to mean something completely different from the other architectures.
As I see will be good to review microblaze io.h and use generic one. Thanks, Michal -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian