Lines Matching refs:bdf
224 static int ls_pcie_addr_valid(struct ls_pcie *pcie, pci_dev_t bdf) in ls_pcie_addr_valid() argument
231 if (PCI_BUS(bdf) < bus->seq) in ls_pcie_addr_valid()
234 if ((PCI_BUS(bdf) > bus->seq) && (!ls_pcie_link_up(pcie))) in ls_pcie_addr_valid()
237 if (PCI_BUS(bdf) <= (bus->seq + 1) && (PCI_DEV(bdf) > 0)) in ls_pcie_addr_valid()
243 int ls_pcie_conf_address(struct udevice *bus, pci_dev_t bdf, in ls_pcie_conf_address() argument
249 if (ls_pcie_addr_valid(pcie, bdf)) in ls_pcie_conf_address()
252 if (PCI_BUS(bdf) == bus->seq) { in ls_pcie_conf_address()
257 busdev = PCIE_ATU_BUS(PCI_BUS(bdf) - bus->seq) | in ls_pcie_conf_address()
258 PCIE_ATU_DEV(PCI_DEV(bdf)) | in ls_pcie_conf_address()
259 PCIE_ATU_FUNC(PCI_FUNC(bdf)); in ls_pcie_conf_address()
261 if (PCI_BUS(bdf) == bus->seq + 1) { in ls_pcie_conf_address()
271 static int ls_pcie_read_config(struct udevice *bus, pci_dev_t bdf, in ls_pcie_read_config() argument
276 bdf, offset, valuep, size); in ls_pcie_read_config()
279 static int ls_pcie_write_config(struct udevice *bus, pci_dev_t bdf, in ls_pcie_write_config() argument
284 bdf, offset, value, size); in ls_pcie_write_config()