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>
13 void __iomem
*ioport_map(unsigned long port
, unsigned int nr
)
17 EXPORT_SYMBOL(ioport_map
);
19 void ioport_unmap(void __iomem
*addr
)
22 EXPORT_SYMBOL(ioport_unmap
);
26 unsigned long pcibios_min_io
= 0x1000;
27 EXPORT_SYMBOL(pcibios_min_io
);
29 unsigned long pcibios_min_mem
= 0x01000000;
30 EXPORT_SYMBOL(pcibios_min_mem
);
32 unsigned int pci_flags
= PCI_REASSIGN_ALL_RSRC
;
33 EXPORT_SYMBOL(pci_flags
);
35 void __iomem
*pci_iomap(struct pci_dev
*dev
, int bar
, unsigned long maxlen
)
37 resource_size_t start
= pci_resource_start(dev
, bar
);
38 resource_size_t len
= pci_resource_len(dev
, bar
);
39 unsigned long flags
= pci_resource_flags(dev
, bar
);
43 if (maxlen
&& len
> maxlen
)
45 if (flags
& IORESOURCE_IO
)
46 return ioport_map(start
, len
);
47 if (flags
& IORESOURCE_MEM
) {
48 if (flags
& IORESOURCE_CACHEABLE
)
49 return ioremap(start
, len
);
50 return ioremap_nocache(start
, len
);
54 EXPORT_SYMBOL(pci_iomap
);
56 void pci_iounmap(struct pci_dev
*dev
, void __iomem
*addr
)
58 if ((unsigned long)addr
>= VMALLOC_START
&&
59 (unsigned long)addr
< VMALLOC_END
)
62 EXPORT_SYMBOL(pci_iounmap
);
This page took 0.032748 seconds and 5 git commands to generate.