Messages in this thread |  | | From | Arnd Bergmann <> | Subject | Re: [PATCH] drivers/block/xsysace - replace in(out)_8/in(out)_be16/in(out)_le16 with generic iowrite(read)8/16(be) | Date | Thu, 07 Feb 2013 01:34:37 +0100 |
| |
On Wednesday 06 February 2013 17:21:37 Michal Simek wrote:
> I have looked at the patches from more practical side and I have tested it on > microblaze big endian in 16bit mode and I have found that sysace driver > stop to work. > After that I have looked at ioread/iowrite microblaze implementation > and implementation of that functions is wrong. > I have fixed it but looking at using asm-generic/io.h for microblaze. > > I will do more tests and let you know.
Well, I think they are only wrong in the way that they ignore endianess. You can fix that by changing them to be identical to the in_le/in_be families.
However, I would also recommend changing your __raw_* accessors to inline assembly functions rather than pointer dereferences, because we have had problems in the past where gcc (when faced with undefined C) silently turned 32-bit accesses into multiples of byte accesses, which can be fatal for MMIO. The asm-generic version obviously cannot get this right.
The PCI I/O space handling, as mentioned, is completely broken on microblaze, and you can either use the approach from asm-generic when you set PCI_IOBASE match your isa_io_base.
Arnd
|  |