diff options
author | Dan Williams <dan.j.williams@intel.com> | 2006-12-28 19:30:24 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-12-30 12:05:08 -0500 |
commit | b0b1d60a64054697ef828e0565f006cc0f823590 (patch) | |
tree | 3ca024704b8f7967d460f954db68f0aaadaf7d25 /arch/arm/mach-iop13xx | |
parent | 4cc2f7a84d64d25a16bb9383148c1467284e2356 (diff) |
[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 <dan.j.williams@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-iop13xx')
-rw-r--r-- | arch/arm/mach-iop13xx/io.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c index fbf9f88e46ea..e79a1b62600f 100644 --- a/arch/arm/mach-iop13xx/io.c +++ b/arch/arm/mach-iop13xx/io.c | |||
@@ -21,6 +21,25 @@ | |||
21 | #include <asm/hardware.h> | 21 | #include <asm/hardware.h> |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | 23 | ||
24 | void * __iomem __iop13xx_io(unsigned long io_addr) | ||
25 | { | ||
26 | void __iomem * io_virt; | ||
27 | |||
28 | switch (io_addr) { | ||
29 | case IOP13XX_PCIE_LOWER_IO_PA ... IOP13XX_PCIE_UPPER_IO_PA: | ||
30 | io_virt = (void *) IOP13XX_PCIE_IO_PHYS_TO_VIRT(io_addr); | ||
31 | break; | ||
32 | case IOP13XX_PCIX_LOWER_IO_PA ... IOP13XX_PCIX_UPPER_IO_PA: | ||
33 | io_virt = (void *) IOP13XX_PCIX_IO_PHYS_TO_VIRT(io_addr); | ||
34 | break; | ||
35 | default: | ||
36 | BUG(); | ||
37 | } | ||
38 | |||
39 | return io_virt; | ||
40 | } | ||
41 | EXPORT_SYMBOL(__iop13xx_io); | ||
42 | |||
24 | void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size, | 43 | void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size, |
25 | unsigned long flags) | 44 | unsigned long flags) |
26 | { | 45 | { |