Lines Matching refs:cfg
19 struct pci_config_window *cfg; member
31 struct pci_config_window *cfg = bridge->bus->sysdata; in pcibios_root_bridge_prepare() local
34 adev = to_acpi_device(cfg->parent); in pcibios_root_bridge_prepare()
37 set_dev_node(bus_dev, pa_to_nid(cfg->res.start)); in pcibios_root_bridge_prepare()
44 struct pci_config_window *cfg = bus->sysdata; in acpi_pci_bus_find_domain_nr() local
45 struct acpi_device *adev = to_acpi_device(cfg->parent); in acpi_pci_bus_find_domain_nr()
56 pci_ecam_free(info->cfg); in acpi_release_root_info()
99 struct pci_config_window *cfg; in arch_pci_ecam_create() local
104 cfg = kzalloc(sizeof(*cfg), GFP_KERNEL); in arch_pci_ecam_create()
105 if (!cfg) in arch_pci_ecam_create()
108 cfg->parent = dev; in arch_pci_ecam_create()
109 cfg->ops = ops; in arch_pci_ecam_create()
110 cfg->busr.start = busr->start; in arch_pci_ecam_create()
111 cfg->busr.end = busr->end; in arch_pci_ecam_create()
112 cfg->busr.flags = IORESOURCE_BUS; in arch_pci_ecam_create()
117 cfg->res.start = cfgres->start; in arch_pci_ecam_create()
118 cfg->res.end = cfgres->end; in arch_pci_ecam_create()
119 cfg->res.flags = IORESOURCE_MEM | IORESOURCE_BUSY; in arch_pci_ecam_create()
120 cfg->res.name = "PCI ECAM"; in arch_pci_ecam_create()
122 conflict = request_resource_conflict(&iomem_resource, &cfg->res); in arch_pci_ecam_create()
126 &cfg->res, conflict->name, conflict); in arch_pci_ecam_create()
130 cfg->win = pci_remap_cfgspace(cfgres->start, bus_range * bsz); in arch_pci_ecam_create()
131 if (!cfg->win) in arch_pci_ecam_create()
135 err = ops->init(cfg); in arch_pci_ecam_create()
139 dev_info(dev, "ECAM at %pR for %pR\n", &cfg->res, &cfg->busr); in arch_pci_ecam_create()
141 return cfg; in arch_pci_ecam_create()
147 pci_ecam_free(cfg); in arch_pci_ecam_create()
163 struct pci_config_window *cfg; in pci_acpi_setup_ecam_mapping() local
176 cfg = pci_ecam_create(dev, &cfgres, bus_res, ecam_ops); in pci_acpi_setup_ecam_mapping()
182 cfg = arch_pci_ecam_create(dev, &cfgres, bus_res, ecam_ops); in pci_acpi_setup_ecam_mapping()
185 if (IS_ERR(cfg)) { in pci_acpi_setup_ecam_mapping()
186 dev_err(dev, "%04x:%pR error %ld mapping ECAM\n", seg, bus_res, PTR_ERR(cfg)); in pci_acpi_setup_ecam_mapping()
190 return cfg; in pci_acpi_setup_ecam_mapping()
213 info->cfg = pci_acpi_setup_ecam_mapping(root); in pci_acpi_scan_root()
214 if (!info->cfg) { in pci_acpi_scan_root()
222 root_ops->pci_ops = (struct pci_ops *)&info->cfg->ops->pci_ops; in pci_acpi_scan_root()
226 memcpy(bus->sysdata, info->cfg, sizeof(struct pci_config_window)); in pci_acpi_scan_root()
232 &info->common, info->cfg); in pci_acpi_scan_root()