unicore32/PCI: Use generic pci_mmap_resource_range()
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 12 Apr 2017 12:26:06 +0000 (13:26 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 20 Apr 2017 13:47:47 +0000 (08:47 -0500)
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
arch/unicore32/include/asm/pci.h
arch/unicore32/kernel/pci.c

index a51290862acdd5303677d8cb14dcf45f6a507c27..ac5acdf4c4d01d35c49adcdd3142df513feaf48f 100644 (file)
@@ -17,6 +17,7 @@
 #include <mach/hardware.h> /* for PCIBIOS_MIN_* */
 
 #define HAVE_PCI_MMAP
+#define ARCH_GENERIC_PCI_MMAP_RESOURCE
 
 #endif /* __KERNEL__ */
 #endif
index 1b438857e91f2472bdb29de5a2ce44ed1d05f27f..1053bca1f8aa1592f03c8bff0759d8673b3f3217 100644 (file)
@@ -356,27 +356,3 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
        }
        return 0;
 }
-
-int pci_mmap_page_range(struct pci_dev *dev, int bar,
-                       struct vm_area_struct *vma,
-                       enum pci_mmap_state mmap_state, int write_combine)
-{
-       unsigned long phys;
-
-       if (mmap_state == pci_mmap_io)
-               return -EINVAL;
-
-       phys = vma->vm_pgoff;
-
-       /*
-        * Mark this as IO
-        */
-       vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-
-       if (remap_pfn_range(vma, vma->vm_start, phys,
-                            vma->vm_end - vma->vm_start,
-                            vma->vm_page_prot))
-               return -EAGAIN;
-
-       return 0;
-}