diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2011-11-24 14:06:41 -0500 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2011-11-28 14:13:10 -0500 |
commit | 1b34d16073430671513b5231fb81cbe725b1a0de (patch) | |
tree | cb9c153a8bbb21c7e1491d433fe3d0be0f3399c3 /arch/microblaze | |
parent | e5bfb72ce2ce558b5a5a46cc5694001f0479c7f2 (diff) |
microblaze: switch to GENERIC_PCI_IOMAP
microblaze copied pci_iomap from generic code, probably to avoid
pulling the rest of iomap.c in. Since that's in
a separate file now, we can reuse the common implementation.
The only difference is handling of nocache flag,
that turns out to be done correctly by the
generic code since arch/microblaze/include/asm/io.h
defines ioremap_nocache same as ioremap.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/Kconfig | 1 | ||||
-rw-r--r-- | arch/microblaze/pci/iomap.c | 19 |
2 files changed, 1 insertions, 19 deletions
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index e446bab2427b..f0eead74fff6 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -17,6 +17,7 @@ config MICROBLAZE | |||
17 | select HAVE_GENERIC_HARDIRQS | 17 | select HAVE_GENERIC_HARDIRQS |
18 | select GENERIC_IRQ_PROBE | 18 | select GENERIC_IRQ_PROBE |
19 | select GENERIC_IRQ_SHOW | 19 | select GENERIC_IRQ_SHOW |
20 | select GENERIC_PCI_IOMAP | ||
20 | 21 | ||
21 | config SWAP | 22 | config SWAP |
22 | def_bool n | 23 | def_bool n |
diff --git a/arch/microblaze/pci/iomap.c b/arch/microblaze/pci/iomap.c index 57acda852f5a..b07abbac0319 100644 --- a/arch/microblaze/pci/iomap.c +++ b/arch/microblaze/pci/iomap.c | |||
@@ -10,25 +10,6 @@ | |||
10 | #include <asm/io.h> | 10 | #include <asm/io.h> |
11 | #include <asm/pci-bridge.h> | 11 | #include <asm/pci-bridge.h> |
12 | 12 | ||
13 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | ||
14 | { | ||
15 | resource_size_t start = pci_resource_start(dev, bar); | ||
16 | resource_size_t len = pci_resource_len(dev, bar); | ||
17 | unsigned long flags = pci_resource_flags(dev, bar); | ||
18 | |||
19 | if (!len) | ||
20 | return NULL; | ||
21 | if (max && len > max) | ||
22 | len = max; | ||
23 | if (flags & IORESOURCE_IO) | ||
24 | return ioport_map(start, len); | ||
25 | if (flags & IORESOURCE_MEM) | ||
26 | return ioremap(start, len); | ||
27 | /* What? */ | ||
28 | return NULL; | ||
29 | } | ||
30 | EXPORT_SYMBOL(pci_iomap); | ||
31 | |||
32 | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) | 13 | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) |
33 | { | 14 | { |
34 | if (isa_vaddr_is_ioport(addr)) | 15 | if (isa_vaddr_is_ioport(addr)) |