Lines Matching refs:bus
25 static int cxl_pci_probe_mode(struct pci_bus *bus) in cxl_pci_probe_mode() argument
49 phb = pci_bus_to_host(dev->bus); in cxl_pci_enable_device_hook()
86 static resource_size_t cxl_pci_window_alignment(struct pci_bus *bus, in cxl_pci_window_alignment() argument
97 static int cxl_pcie_cfg_record(u8 bus, u8 devfn) in cxl_pcie_cfg_record() argument
99 return (bus << 8) + devfn; in cxl_pcie_cfg_record()
103 u8 bus, u8 devfn, int offset) in cxl_pcie_cfg_addr() argument
105 int record = cxl_pcie_cfg_record(bus, devfn); in cxl_pcie_cfg_addr()
111 static int cxl_pcie_config_info(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_config_info() argument
120 phb = pci_bus_to_host(bus); in cxl_pcie_config_info()
125 if (cxl_pcie_cfg_record(bus->number, devfn) > afu->crs_num) in cxl_pcie_config_info()
129 addr = cxl_pcie_cfg_addr(phb, bus->number, devfn, offset); in cxl_pcie_config_info()
148 static inline bool cxl_config_link_ok(struct pci_bus *bus) in cxl_config_link_ok() argument
160 phb = pci_bus_to_host(bus); in cxl_config_link_ok()
167 static int cxl_pcie_read_config(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_read_config() argument
174 rc = cxl_pcie_config_info(bus, devfn, offset, len, &ioaddr, in cxl_pcie_read_config()
179 if (!cxl_config_link_ok(bus)) in cxl_pcie_read_config()
187 static int cxl_pcie_write_config(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_write_config() argument
194 rc = cxl_pcie_config_info(bus, devfn, offset, len, &ioaddr, in cxl_pcie_write_config()
199 if (!cxl_config_link_ok(bus)) in cxl_pcie_write_config()
238 phys_phb = pci_bus_to_host(phys_dev->bus); 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()
295 pci_remove_root_bus(phb->bus); in cxl_pci_vphb_remove()
303 phb = pci_bus_to_host(dev->bus); in cxl_pci_to_afu()
311 return cxl_pcie_cfg_record(dev->bus->number, dev->devfn); in cxl_pci_to_cfg_record()