aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2011-11-29 14:20:06 -0500
committerMichael S. Tsirkin <mst@redhat.com>2011-12-04 09:00:12 -0500
commit5322418502be4696ebdef2ed164bbd0a348d4816 (patch)
treef5a2e2ea9b1988c2ed811e46573f9bb0d8630b7c /arch/frv
parent845501213033d0058945776349f15502823359d8 (diff)
frv: switch to GENERIC_PCI_IOMAP
frv uses a version of pci_iomap that simply casts and returns back the start address. Looking closely, both ioremap and ioport_map seem to do this on this platform, so the generic pci_iomap will DTRT automatically. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'arch/frv')
-rw-r--r--arch/frv/Kconfig1
-rw-r--r--arch/frv/include/asm/io.h2
-rw-r--r--arch/frv/mb93090-mb00/Makefile2
-rw-r--r--arch/frv/mb93090-mb00/pci-iomap.c29
4 files changed, 3 insertions, 31 deletions
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index bad27a6ff407..dfde78b09322 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -317,6 +317,7 @@ config PCI
317 bool "Use PCI" 317 bool "Use PCI"
318 depends on MB93090_MB00 318 depends on MB93090_MB00
319 default y 319 default y
320 select GENERIC_PCI_IOMAP
320 help 321 help
321 Some FR-V systems (such as the MB93090-MB00 VDK) have PCI 322 Some FR-V systems (such as the MB93090-MB00 VDK) have PCI
322 onboard. If you have one of these boards and you wish to use the PCI 323 onboard. If you have one of these boards and you wish to use the PCI
diff --git a/arch/frv/include/asm/io.h b/arch/frv/include/asm/io.h
index ca7475e73b5e..8cb50a2fbcb2 100644
--- a/arch/frv/include/asm/io.h
+++ b/arch/frv/include/asm/io.h
@@ -21,6 +21,7 @@
21#include <asm/virtconvert.h> 21#include <asm/virtconvert.h>
22#include <asm/string.h> 22#include <asm/string.h>
23#include <asm/mb-regs.h> 23#include <asm/mb-regs.h>
24#include <asm-generic/pci_iomap.h>
24#include <linux/delay.h> 25#include <linux/delay.h>
25 26
26/* 27/*
@@ -370,7 +371,6 @@ static inline void iowrite32_rep(void __iomem *p, const void *src, unsigned long
370 371
371/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ 372/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
372struct pci_dev; 373struct pci_dev;
373extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
374static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p) 374static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
375{ 375{
376} 376}
diff --git a/arch/frv/mb93090-mb00/Makefile b/arch/frv/mb93090-mb00/Makefile
index b73b542f8f48..21f1df1b378a 100644
--- a/arch/frv/mb93090-mb00/Makefile
+++ b/arch/frv/mb93090-mb00/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5ifeq "$(CONFIG_PCI)" "y" 5ifeq "$(CONFIG_PCI)" "y"
6obj-y := pci-frv.o pci-irq.o pci-vdk.o pci-iomap.o 6obj-y := pci-frv.o pci-irq.o pci-vdk.o
7 7
8ifeq "$(CONFIG_MMU)" "y" 8ifeq "$(CONFIG_MMU)" "y"
9obj-y += pci-dma.o 9obj-y += pci-dma.o
diff --git a/arch/frv/mb93090-mb00/pci-iomap.c b/arch/frv/mb93090-mb00/pci-iomap.c
deleted file mode 100644
index 35f6df28351e..000000000000
--- a/arch/frv/mb93090-mb00/pci-iomap.c
+++ /dev/null
@@ -1,29 +0,0 @@
1/* pci-iomap.c: description
2 *
3 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11#include <linux/pci.h>
12#include <linux/module.h>
13
14void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
15{
16 resource_size_t start = pci_resource_start(dev, bar);
17 resource_size_t len = pci_resource_len(dev, bar);
18 unsigned long flags = pci_resource_flags(dev, bar);
19
20 if (!len || !start)
21 return NULL;
22
23 if ((flags & IORESOURCE_IO) || (flags & IORESOURCE_MEM))
24 return (void __iomem *) start;
25
26 return NULL;
27}
28
29EXPORT_SYMBOL(pci_iomap);