aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/io.h7
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
311__ixp4xx_outsl(u32 io_addr, const u32 *vaddr, u32 count) 311__ixp4xx_outsl(u32 io_addr, const u32 *vaddr, u32 count)
312{ 312{
313 while (count--) 313 while (count--)
314 outl(*vaddr++, io_addr); 314 outl(cpu_to_le32(*vaddr++), io_addr);
315} 315}
316 316
317static inline u8 317static inline u8
@@ -366,7 +366,7 @@ static inline void
366__ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count) 366__ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count)
367{ 367{
368 while (count--) 368 while (count--)
369 *vaddr++ = inl(io_addr); 369 *vaddr++ = le32_to_cpu(inl(io_addr));
370} 370}
371 371
372#define PIO_OFFSET 0x10000UL 372#define PIO_OFFSET 0x10000UL
@@ -374,12 +374,13 @@ __ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count)
374 374
375#define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \ 375#define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \
376 ((unsigned long)p <= (PIO_MASK + PIO_OFFSET))) 376 ((unsigned long)p <= (PIO_MASK + PIO_OFFSET)))
377
377static inline unsigned int 378static inline unsigned int
378__ixp4xx_ioread8(const void __iomem *addr) 379__ixp4xx_ioread8(const void __iomem *addr)
379{ 380{
380 unsigned long port = (unsigned long __force)addr; 381 unsigned long port = (unsigned long __force)addr;
381 if (__is_io_address(port)) 382 if (__is_io_address(port))
382 return (unsigned int)__ixp4xx_inb(port & PIO_MASK); 383 return (unsigned int)__ixp4xx_inb(port & PIO_MASK);
383 else 384 else
384#ifndef CONFIG_IXP4XX_INDIRECT_PCI 385#ifndef CONFIG_IXP4XX_INDIRECT_PCI
385 return (unsigned int)__raw_readb(port); 386 return (unsigned int)__raw_readb(port);