2 * linux/arch/arm/mm/iomap.c
4 * Map IO port and PCI memory spaces so that {read,write}[bwl] can
5 * be used to access this memory.
7 #include <linux/module.h>
9 #include <linux/ioport.h>
14 void __iomem
*ioport_map(unsigned long port
, unsigned int nr
)
18 EXPORT_SYMBOL(ioport_map
);
20 void ioport_unmap(void __iomem
*addr
)
23 EXPORT_SYMBOL(ioport_unmap
);
27 unsigned int pci_flags
= PCI_REASSIGN_ALL_RSRC
;
28 EXPORT_SYMBOL(pci_flags
);
30 void __iomem
*pci_iomap(struct pci_dev
*dev
, int bar
, unsigned long maxlen
)
32 resource_size_t start
= pci_resource_start(dev
, bar
);
33 resource_size_t len
= pci_resource_len(dev
, bar
);
34 unsigned long flags
= pci_resource_flags(dev
, bar
);
38 if (maxlen
&& len
> maxlen
)
40 if (flags
& IORESOURCE_IO
)
41 return ioport_map(start
, len
);
42 if (flags
& IORESOURCE_MEM
) {
43 if (flags
& IORESOURCE_CACHEABLE
)
44 return ioremap(start
, len
);
45 return ioremap_nocache(start
, len
);
49 EXPORT_SYMBOL(pci_iomap
);
51 void pci_iounmap(struct pci_dev
*dev
, void __iomem
*addr
)
53 if ((unsigned long)addr
>= VMALLOC_START
&&
54 (unsigned long)addr
< VMALLOC_END
)
57 EXPORT_SYMBOL(pci_iounmap
);
This page took 0.031879 seconds and 5 git commands to generate.