Lines Matching full:bar

214  * @bar: the BAR number corresponding to the register space
219 void pci_epf_free_space(struct pci_epf *epf, void *addr, enum pci_barno bar, in pci_epf_free_space() argument
231 epf_bar = epf->bar; in pci_epf_free_space()
238 dma_free_coherent(dev, epf_bar[bar].size, addr, in pci_epf_free_space()
239 epf_bar[bar].phys_addr); in pci_epf_free_space()
241 epf_bar[bar].phys_addr = 0; in pci_epf_free_space()
242 epf_bar[bar].addr = NULL; in pci_epf_free_space()
243 epf_bar[bar].size = 0; in pci_epf_free_space()
244 epf_bar[bar].barno = 0; in pci_epf_free_space()
245 epf_bar[bar].flags = 0; in pci_epf_free_space()
253 * @bar: the BAR number corresponding to the allocated register space
258 * Flag PCI_BASE_ADDRESS_MEM_TYPE_64 will automatically get set if the BAR
259 * can only be a 64-bit BAR, or if the requested size is larger than 2 GB.
261 void *pci_epf_alloc_space(struct pci_epf *epf, size_t size, enum pci_barno bar, in pci_epf_alloc_space() argument
265 u64 bar_fixed_size = epc_features->bar[bar].fixed_size; in pci_epf_alloc_space()
276 if (epc_features->bar[bar].type == BAR_FIXED && bar_fixed_size) { in pci_epf_alloc_space()
279 "requested BAR size is larger than fixed size\n"); in pci_epf_alloc_space()
292 epf_bar = epf->bar; in pci_epf_alloc_space()
305 epf_bar[bar].phys_addr = phys_addr; in pci_epf_alloc_space()
306 epf_bar[bar].addr = space; in pci_epf_alloc_space()
307 epf_bar[bar].size = size; in pci_epf_alloc_space()
308 epf_bar[bar].barno = bar; in pci_epf_alloc_space()
309 if (upper_32_bits(size) || epc_features->bar[bar].only_64bit) in pci_epf_alloc_space()
310 epf_bar[bar].flags |= PCI_BASE_ADDRESS_MEM_TYPE_64; in pci_epf_alloc_space()
312 epf_bar[bar].flags |= PCI_BASE_ADDRESS_MEM_TYPE_32; in pci_epf_alloc_space()