Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3efdd5fe authored by David Woodhouse's avatar David Woodhouse Committed by Bjorn Helgaas
Browse files

cris/PCI: Use generic pci_mmap_resource_range()

parent 00d2904f
Loading
Loading
Loading
Loading
+0 −23
Original line number Original line Diff line number Diff line
@@ -14,29 +14,6 @@ void pcibios_set_master(struct pci_dev *dev)
	pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
	pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
}
}


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 prot;

	/* Leave vm_pgoff as-is, the PCI space address is the physical
	 * address on this platform.
	 */
	prot = pgprot_val(vma->vm_page_prot);
	vma->vm_page_prot = __pgprot(prot);

	/* Write-combine setting is ignored, it is changed via the mtrr
	 * interfaces on this platform.
	 */
	if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
			     vma->vm_end - vma->vm_start,
			     vma->vm_page_prot))
		return -EAGAIN;

	return 0;
}

resource_size_t
resource_size_t
pcibios_align_resource(void *data, const struct resource *res,
pcibios_align_resource(void *data, const struct resource *res,
		       resource_size_t size, resource_size_t align)
		       resource_size_t size, resource_size_t align)
+1 −0
Original line number Original line Diff line number Diff line
@@ -42,6 +42,7 @@ struct pci_dev;
#define PCI_DMA_BUS_IS_PHYS	(1)
#define PCI_DMA_BUS_IS_PHYS	(1)


#define HAVE_PCI_MMAP
#define HAVE_PCI_MMAP
#define ARCH_GENERIC_PCI_MMAP_RESOURCE


#endif /* __KERNEL__ */
#endif /* __KERNEL__ */