Lines Matching refs:baridx
93 static inline void octeon_unmap_pci_barx(struct octeon_device *oct, int baridx) in octeon_unmap_pci_barx() argument
96 baridx); in octeon_unmap_pci_barx()
98 if (oct->mmio[baridx].done) in octeon_unmap_pci_barx()
99 iounmap(oct->mmio[baridx].hw_addr); in octeon_unmap_pci_barx()
101 if (oct->mmio[baridx].start) in octeon_unmap_pci_barx()
102 pci_release_region(oct->pci_dev, baridx * 2); in octeon_unmap_pci_barx()
112 int baridx, int max_map_len) in octeon_map_pci_barx() argument
116 if (pci_request_region(oct->pci_dev, baridx * 2, DRV_NAME)) { in octeon_map_pci_barx()
118 baridx); in octeon_map_pci_barx()
122 oct->mmio[baridx].start = pci_resource_start(oct->pci_dev, baridx * 2); in octeon_map_pci_barx()
123 oct->mmio[baridx].len = pci_resource_len(oct->pci_dev, baridx * 2); in octeon_map_pci_barx()
125 mapped_len = oct->mmio[baridx].len; in octeon_map_pci_barx()
132 oct->mmio[baridx].hw_addr = in octeon_map_pci_barx()
133 ioremap(oct->mmio[baridx].start, mapped_len); in octeon_map_pci_barx()
134 oct->mmio[baridx].mapped_len = mapped_len; in octeon_map_pci_barx()
137 baridx, oct->mmio[baridx].start, mapped_len, in octeon_map_pci_barx()
138 oct->mmio[baridx].len); in octeon_map_pci_barx()
140 if (!oct->mmio[baridx].hw_addr) { in octeon_map_pci_barx()
142 baridx); in octeon_map_pci_barx()
145 oct->mmio[baridx].done = 1; in octeon_map_pci_barx()
150 pci_release_region(oct->pci_dev, baridx * 2); in octeon_map_pci_barx()