Lines Matching refs:phb

45 	struct pci_controller *phb;  in cxl_pci_enable_device_hook()  local
49 phb = pci_bus_to_host(dev->bus); in cxl_pci_enable_device_hook()
50 afu = (struct cxl_afu *)phb->private_data; in cxl_pci_enable_device_hook()
102 static unsigned long cxl_pcie_cfg_addr(struct pci_controller* phb, in cxl_pcie_cfg_addr() argument
107 return (unsigned long)phb->cfg_addr + ((unsigned long)phb->cfg_data * record) + offset; in cxl_pcie_cfg_addr()
116 struct pci_controller *phb; in cxl_pcie_config_info() local
120 phb = pci_bus_to_host(bus); in cxl_pcie_config_info()
121 if (phb == NULL) in cxl_pcie_config_info()
123 afu = (struct cxl_afu *)phb->private_data; in cxl_pcie_config_info()
127 if (offset >= (unsigned long)phb->cfg_data) in cxl_pcie_config_info()
129 addr = cxl_pcie_cfg_addr(phb, bus->number, devfn, offset); in cxl_pcie_config_info()
150 struct pci_controller *phb; in cxl_config_link_ok() local
160 phb = pci_bus_to_host(bus); in cxl_config_link_ok()
161 if (phb == NULL) in cxl_config_link_ok()
163 afu = (struct cxl_afu *)phb->private_data; in cxl_config_link_ok()
235 struct pci_controller *phb, *phys_phb; in cxl_pci_vphb_add() local
241 phb = pcibios_alloc_controller(phys_phb->dn); in cxl_pci_vphb_add()
243 if (!phb) in cxl_pci_vphb_add()
247 phb->parent = &phys_dev->dev; in cxl_pci_vphb_add()
250 phb->ops = &cxl_pcie_pci_ops; in cxl_pci_vphb_add()
251 phb->cfg_addr = afu->afu_desc_mmio + afu->crs_offset; in cxl_pci_vphb_add()
252 phb->cfg_data = (void *)(u64)afu->crs_len; in cxl_pci_vphb_add()
253 phb->private_data = afu; in cxl_pci_vphb_add()
254 phb->controller_ops = cxl_pci_controller_ops; in cxl_pci_vphb_add()
257 pcibios_scan_phb(phb); in cxl_pci_vphb_add()
258 if (phb->bus == NULL) in cxl_pci_vphb_add()
265 pcibios_claim_one_bus(phb->bus); in cxl_pci_vphb_add()
268 pci_bus_add_devices(phb->bus); in cxl_pci_vphb_add()
270 afu->phb = phb; in cxl_pci_vphb_add()
281 afu->phb->cfg_addr = afu->afu_desc_mmio + afu->crs_offset; in cxl_pci_vphb_reconfigure()
286 struct pci_controller *phb; in cxl_pci_vphb_remove() local
289 if (!afu || !afu->phb) in cxl_pci_vphb_remove()
292 phb = afu->phb; in cxl_pci_vphb_remove()
293 afu->phb = NULL; in cxl_pci_vphb_remove()
295 pci_remove_root_bus(phb->bus); in cxl_pci_vphb_remove()
296 pcibios_free_controller(phb); in cxl_pci_vphb_remove()
301 struct pci_controller *phb; in cxl_pci_to_afu() local
303 phb = pci_bus_to_host(dev->bus); in cxl_pci_to_afu()
305 return (struct cxl_afu *)phb->private_data; in cxl_pci_to_afu()