diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2014-12-14 07:54:17 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-01-21 00:58:48 -0500 |
commit | 54cfe08b5f352d9aa4979e2434e85907c84af07a (patch) | |
tree | e2112933759a5f84076466a0cc31b206c9f63580 /arch/mn10300 | |
parent | 2d9becc1e0c6f86e222e1955e39302d304ad274b (diff) |
mn10300: drop dead code
pci-iomap.c was (apparently, mistakenly) reintroduced as part of
commit 83c2dc15ce824450e7044b9f90cd529c25747ae0
MN10300: Handle cacheable PCI regions in pci_iomap()
probably as side-effect of forward-porting the patch
from an old kernel.
It's not really needed: the generic pci_iomap does the right thing here.
The new file isn't compiled so it's safe to drop.
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Cc: trivial@kernel.org
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/mn10300')
-rw-r--r-- | arch/mn10300/unit-asb2305/pci-iomap.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/arch/mn10300/unit-asb2305/pci-iomap.c b/arch/mn10300/unit-asb2305/pci-iomap.c deleted file mode 100644 index bd65dae17f32..000000000000 --- a/arch/mn10300/unit-asb2305/pci-iomap.c +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* ASB2305 PCI I/O mapping handler | ||
2 | * | ||
3 | * Copyright (C) 2007 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 Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | #include <linux/pci.h> | ||
12 | #include <linux/module.h> | ||
13 | |||
14 | /* | ||
15 | * Create a virtual mapping cookie for a PCI BAR (memory or IO) | ||
16 | */ | ||
17 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | ||
18 | { | ||
19 | resource_size_t start = pci_resource_start(dev, bar); | ||
20 | resource_size_t len = pci_resource_len(dev, bar); | ||
21 | unsigned long flags = pci_resource_flags(dev, bar); | ||
22 | |||
23 | if (!len || !start) | ||
24 | return NULL; | ||
25 | |||
26 | if ((flags & IORESOURCE_IO) || (flags & IORESOURCE_MEM)) { | ||
27 | if (flags & IORESOURCE_CACHEABLE && !(flags & IORESOURCE_IO)) | ||
28 | return ioremap(start, len); | ||
29 | else | ||
30 | return ioremap_nocache(start, len); | ||
31 | } | ||
32 | |||
33 | return NULL; | ||
34 | } | ||
35 | EXPORT_SYMBOL(pci_iomap); | ||