diff options
author | Krzysztof Hałasa <khc@pm.waw.pl> | 2009-11-11 00:21:48 +0100 |
---|---|---|
committer | Krzysztof Hałasa <khc@pm.waw.pl> | 2009-12-05 16:58:38 +0100 |
commit | 9f2c94928a0d713d223b53909734877fe4f340ab (patch) | |
tree | b032519da6e3ec23c4f57e133be42481ff822bab /arch/arm/mach-ixp4xx | |
parent | 8ae45a535b172d350759eec2fcecf4368d4c13d1 (diff) | |
download | linux-stable-9f2c94928a0d713d223b53909734877fe4f340ab.tar.gz linux-stable-9f2c94928a0d713d223b53909734877fe4f340ab.tar.bz2 linux-stable-9f2c94928a0d713d223b53909734877fe4f340ab.zip |
ARM: fix insl() and outsl() endianness on IXP4xx architecture.
The repetitive in/out functions must preserve order, not value.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Diffstat (limited to 'arch/arm/mach-ixp4xx')
-rw-r--r-- | arch/arm/mach-ixp4xx/include/mach/io.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index 8a947d42a6f1..eb9c7489a999 100644 --- a/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/arch/arm/mach-ixp4xx/include/mach/io.h @@ -311,7 +311,7 @@ static inline void __ixp4xx_outsl(u32 io_addr, const u32 *vaddr, u32 count) { while (count--) - outl(*vaddr++, io_addr); + outl(cpu_to_le32(*vaddr++), io_addr); } static inline u8 @@ -366,7 +366,7 @@ static inline void __ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count) { while (count--) - *vaddr++ = inl(io_addr); + *vaddr++ = le32_to_cpu(inl(io_addr)); } #define PIO_OFFSET 0x10000UL @@ -374,12 +374,13 @@ __ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count) #define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \ ((unsigned long)p <= (PIO_MASK + PIO_OFFSET))) + static inline unsigned int __ixp4xx_ioread8(const void __iomem *addr) { unsigned long port = (unsigned long __force)addr; if (__is_io_address(port)) - return (unsigned int)__ixp4xx_inb(port & PIO_MASK); + return (unsigned int)__ixp4xx_inb(port & PIO_MASK); else #ifndef CONFIG_IXP4XX_INDIRECT_PCI return (unsigned int)__raw_readb(port); |