Skip to content

Commit

Permalink
sh/PCI: Use generic pci_mmap_resource_range()
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
dwmw2 authored and bjorn-helgaas committed Apr 20, 2017
1 parent 6a94ca1 commit adf7bde
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
22 changes: 0 additions & 22 deletions arch/sh/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,28 +269,6 @@ void __ref pcibios_report_status(unsigned int status_mask, int warn)
}
}

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)
{
/*
* I/O space can be accessed via normal processor loads and stores on
* this platform but for now we elect not to do this and portable
* drivers should not do this anyway.
*/
if (mmap_state == pci_mmap_io)
return -EINVAL;

/*
* Ignore write-combine; for now only return uncached mappings.
*/
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);

return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
vma->vm_end - vma->vm_start,
vma->vm_page_prot);
}

#ifndef CONFIG_GENERIC_IOMAP

void __iomem *__pci_ioport_map(struct pci_dev *dev,
Expand Down
1 change: 1 addition & 0 deletions arch/sh/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ extern unsigned long PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM;
struct pci_dev;

#define HAVE_PCI_MMAP
#define ARCH_GENERIC_PCI_MMAP_RESOURCE

extern void pcibios_set_master(struct pci_dev *dev);

Expand Down

0 comments on commit adf7bde

Please sign in to comment.