summaryrefslogtreecommitdiffstats
path: root/arch/mn10300/unit-asb2305
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2011-12-01 12:41:36 +0200
committerMichael S. Tsirkin <mst@redhat.com>2011-12-04 16:00:17 +0200
commit34f1bdee1910f7efe3c32e1a891dba4fd21cb3b6 (patch)
treeff3b52d4ab12ae907117d8d1064fab94acbc11e3 /arch/mn10300/unit-asb2305
parent2ebf5d0d79087005e1042df2cd0f7594782746d8 (diff)
downloadop-kernel-dev-34f1bdee1910f7efe3c32e1a891dba4fd21cb3b6.zip
op-kernel-dev-34f1bdee1910f7efe3c32e1a891dba4fd21cb3b6.tar.gz
mn10300: switch to GENERIC_PCI_IOMAP
The pci_iomap variant that arch/mn10300/unit-asb2305/pci-iomap.c uses differs from the generic one in that it does not use ioremap_nocache for PCI addresses. However, it turns out that PCI addresses are automatically noncached, so switching to ioremap_nocache and to the generic implementation is safe. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'arch/mn10300/unit-asb2305')
-rw-r--r--arch/mn10300/unit-asb2305/Makefile2
-rw-r--r--arch/mn10300/unit-asb2305/pci-iomap.c31
2 files changed, 1 insertions, 32 deletions
diff --git a/arch/mn10300/unit-asb2305/Makefile b/arch/mn10300/unit-asb2305/Makefile
index 0551022..cbc5aba 100644
--- a/arch/mn10300/unit-asb2305/Makefile
+++ b/arch/mn10300/unit-asb2305/Makefile
@@ -5,4 +5,4 @@
###############################################################################
obj-y := unit-init.o leds.o
-obj-$(CONFIG_PCI) += pci.o pci-asb2305.o pci-irq.o pci-iomap.o
+obj-$(CONFIG_PCI) += pci.o pci-asb2305.o pci-irq.o
diff --git a/arch/mn10300/unit-asb2305/pci-iomap.c b/arch/mn10300/unit-asb2305/pci-iomap.c
deleted file mode 100644
index c1a8d8f..0000000
--- a/arch/mn10300/unit-asb2305/pci-iomap.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* ASB2305 PCI I/O mapping handler
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#include <linux/pci.h>
-#include <linux/module.h>
-
-/*
- * Create a virtual mapping cookie for a PCI BAR (memory or IO)
- */
-void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
-{
- resource_size_t start = pci_resource_start(dev, bar);
- resource_size_t len = pci_resource_len(dev, bar);
- unsigned long flags = pci_resource_flags(dev, bar);
-
- if (!len || !start)
- return NULL;
-
- if ((flags & IORESOURCE_IO) || (flags & IORESOURCE_MEM))
- return (void __iomem *) start;
-
- return NULL;
-}
-EXPORT_SYMBOL(pci_iomap);
OpenPOWER on IntegriCloud