Commit 4c2924b7 authored by Wolfgang Grandegger's avatar Wolfgang Grandegger Committed by Ralf Baechle

MIPS: PCI: Use pci_resource_to_user to map pci memory space properly

[ This only matters to Alchemy platforms.  On other
platforms fixup_bigphys_addr is just an identidy mapping.]
Signed-off-by: default avatarWolfgang Grandegger <>
Cc: tiejun.chen <>
Cc: Linux-MIPS <>
Patchwork: default avatarRalf Baechle <>
parent 9213ad77
......@@ -83,6 +83,18 @@ static inline void pcibios_penalize_isa_irq(int irq, int active)
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
static inline void pci_resource_to_user(const struct pci_dev *dev, int bar,
const struct resource *rsrc, resource_size_t *start,
resource_size_t *end)
phys_t size = resource_size(rsrc);
*start = fixup_bigphys_addr(rsrc->start, size);
*end = rsrc->start + size;
* Dynamic DMA mapping stuff.
* MIPS has everything mapped statically.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment