Lines Matching refs:cfg
43 struct gen_pci_cfg_windows cfg; member
53 resource_size_t idx = bus->number - pci->cfg.bus_range->start; in gen_pci_map_cfg_bus_cam()
55 return pci->cfg.win[idx] + ((devfn << 8) | where); in gen_pci_map_cfg_bus_cam()
69 resource_size_t idx = bus->number - pci->cfg.bus_range->start; in gen_pci_map_cfg_bus_ecam()
71 return pci->cfg.win[idx] + ((devfn << 12) | where); in gen_pci_map_cfg_bus_ecam()
131 pci->cfg.bus_range = res; in gen_pci_parse_request_of_pci_ranges()
163 err = of_address_to_resource(np, 0, &pci->cfg.res); in gen_pci_parse_map_cfg_windows()
170 bus_max = pci->cfg.bus_range->start + in gen_pci_parse_map_cfg_windows()
171 (resource_size(&pci->cfg.res) >> pci->cfg.ops->bus_shift) - 1; in gen_pci_parse_map_cfg_windows()
172 pci->cfg.bus_range->end = min_t(resource_size_t, in gen_pci_parse_map_cfg_windows()
173 pci->cfg.bus_range->end, bus_max); in gen_pci_parse_map_cfg_windows()
175 pci->cfg.win = devm_kcalloc(dev, resource_size(pci->cfg.bus_range), in gen_pci_parse_map_cfg_windows()
176 sizeof(*pci->cfg.win), GFP_KERNEL); in gen_pci_parse_map_cfg_windows()
177 if (!pci->cfg.win) in gen_pci_parse_map_cfg_windows()
181 if (!devm_request_mem_region(dev, pci->cfg.res.start, in gen_pci_parse_map_cfg_windows()
182 resource_size(&pci->cfg.res), in gen_pci_parse_map_cfg_windows()
186 bus_range = pci->cfg.bus_range; in gen_pci_parse_map_cfg_windows()
189 u32 sz = 1 << pci->cfg.ops->bus_shift; in gen_pci_parse_map_cfg_windows()
191 pci->cfg.win[idx] = devm_ioremap(dev, in gen_pci_parse_map_cfg_windows()
192 pci->cfg.res.start + busn * sz, in gen_pci_parse_map_cfg_windows()
194 if (!pci->cfg.win[idx]) in gen_pci_parse_map_cfg_windows()
243 pci->cfg.ops = of_id->data; in gen_pci_probe()
244 gen_pci_ops.map_bus = pci->cfg.ops->map_bus; in gen_pci_probe()