Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b0b1d60a64054697ef828e0565f006cc0f823590
Commit:     b0b1d60a64054697ef828e0565f006cc0f823590
Parent:     4cc2f7a84d64d25a16bb9383148c1467284e2356
Author:     Dan Williams <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 29 01:30:24 2006 +0100
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Sat Dec 30 17:05:08 2006 +0000

    [ARM] 4077/1: iop13xx: fix __io() macro
    
    Since iop13xx defines the PCI I/O spaces with physical resource addresses
    the __io macro needs to perform the physical to virtual conversion.  I
    incorrectly assumed that this would be handled by ioremap, but drivers
    (like e1000) directly dereference the address returned from __io.
    
    Signed-off-by: Dan Williams <[EMAIL PROTECTED]>
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 arch/arm/mach-iop13xx/io.c        |   19 +++++++++++++++++++
 include/asm-arm/arch-iop13xx/io.h |    3 ++-
 2 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c
index fbf9f88..e79a1b6 100644
--- a/arch/arm/mach-iop13xx/io.c
+++ b/arch/arm/mach-iop13xx/io.c
@@ -21,6 +21,25 @@
 #include <asm/hardware.h>
 #include <asm/io.h>
 
+void * __iomem __iop13xx_io(unsigned long io_addr)
+{
+       void __iomem * io_virt;
+
+       switch (io_addr) {
+       case IOP13XX_PCIE_LOWER_IO_PA ... IOP13XX_PCIE_UPPER_IO_PA:
+               io_virt = (void *) IOP13XX_PCIE_IO_PHYS_TO_VIRT(io_addr);
+               break;
+       case IOP13XX_PCIX_LOWER_IO_PA ... IOP13XX_PCIX_UPPER_IO_PA:
+               io_virt = (void *) IOP13XX_PCIX_IO_PHYS_TO_VIRT(io_addr);
+               break;
+       default:
+               BUG();
+       }
+
+       return io_virt;
+}
+EXPORT_SYMBOL(__iop13xx_io);
+
 void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size,
        unsigned long flags)
 {
diff --git a/include/asm-arm/arch-iop13xx/io.h 
b/include/asm-arm/arch-iop13xx/io.h
index db6de24..5a7bdb5 100644
--- a/include/asm-arm/arch-iop13xx/io.h
+++ b/include/asm-arm/arch-iop13xx/io.h
@@ -21,10 +21,11 @@
 
 #define IO_SPACE_LIMIT 0xffffffff
 
-#define __io(a)      (a)
+#define __io(a) __iop13xx_io(a)
 #define __mem_pci(a) (a)
 #define __mem_isa(a) (a)
 
+extern void __iomem * __iop13xx_io(unsigned long io_addr);
 extern void __iomem * __ioremap(unsigned long, size_t, unsigned long);
 extern void __iomem *__iop13xx_ioremap(unsigned long cookie, size_t size,
        unsigned long flags);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to