Lines Matching refs:bdf
114 int dm_pci_bus_find_bdf(pci_dev_t bdf, struct udevice **devp) in dm_pci_bus_find_bdf() argument
119 ret = pci_get_bus(PCI_BUS(bdf), &bus); in dm_pci_bus_find_bdf()
122 return pci_bus_find_devfn(bus, PCI_MASK_BUS(bdf), devp); in dm_pci_bus_find_bdf()
239 int pci_bus_write_config(struct udevice *bus, pci_dev_t bdf, int offset, in pci_bus_write_config() argument
247 return ops->write_config(bus, bdf, offset, value, size); in pci_bus_write_config()
250 int pci_bus_clrset_config32(struct udevice *bus, pci_dev_t bdf, int offset, in pci_bus_clrset_config32() argument
256 ret = pci_bus_read_config(bus, bdf, offset, &val, PCI_SIZE_32); in pci_bus_clrset_config32()
262 return pci_bus_write_config(bus, bdf, offset, val, PCI_SIZE_32); in pci_bus_clrset_config32()
265 int pci_write_config(pci_dev_t bdf, int offset, unsigned long value, in pci_write_config() argument
271 ret = pci_get_bus(PCI_BUS(bdf), &bus); in pci_write_config()
275 return pci_bus_write_config(bus, bdf, offset, value, size); in pci_write_config()
289 int pci_write_config32(pci_dev_t bdf, int offset, u32 value) in pci_write_config32() argument
291 return pci_write_config(bdf, offset, value, PCI_SIZE_32); in pci_write_config32()
294 int pci_write_config16(pci_dev_t bdf, int offset, u16 value) in pci_write_config16() argument
296 return pci_write_config(bdf, offset, value, PCI_SIZE_16); in pci_write_config16()
299 int pci_write_config8(pci_dev_t bdf, int offset, u8 value) in pci_write_config8() argument
301 return pci_write_config(bdf, offset, value, PCI_SIZE_8); in pci_write_config8()
319 int pci_bus_read_config(struct udevice *bus, pci_dev_t bdf, int offset, in pci_bus_read_config() argument
327 return ops->read_config(bus, bdf, offset, valuep, size); in pci_bus_read_config()
330 int pci_read_config(pci_dev_t bdf, int offset, unsigned long *valuep, in pci_read_config() argument
336 ret = pci_get_bus(PCI_BUS(bdf), &bus); in pci_read_config()
340 return pci_bus_read_config(bus, bdf, offset, valuep, size); in pci_read_config()
354 int pci_read_config32(pci_dev_t bdf, int offset, u32 *valuep) in pci_read_config32() argument
359 ret = pci_read_config(bdf, offset, &value, PCI_SIZE_32); in pci_read_config32()
367 int pci_read_config16(pci_dev_t bdf, int offset, u16 *valuep) in pci_read_config16() argument
372 ret = pci_read_config(bdf, offset, &value, PCI_SIZE_16); in pci_read_config16()
380 int pci_read_config8(pci_dev_t bdf, int offset, u8 *valuep) in pci_read_config8() argument
385 ret = pci_read_config(bdf, offset, &value, PCI_SIZE_8); in pci_read_config8()
522 int (*addr_f)(struct udevice *bus, pci_dev_t bdf, uint offset, void **addrp), in pci_generic_mmap_write_config() argument
523 pci_dev_t bdf, in pci_generic_mmap_write_config()
530 if (addr_f(bus, bdf, offset, &address) < 0) in pci_generic_mmap_write_config()
550 int (*addr_f)(struct udevice *bus, pci_dev_t bdf, uint offset, void **addrp), in pci_generic_mmap_read_config() argument
551 pci_dev_t bdf, in pci_generic_mmap_read_config()
558 if (addr_f(bus, bdf, offset, &address) < 0) { in pci_generic_mmap_read_config()
642 pci_dev_t bdf, struct udevice **devp) in pci_find_and_bind_driver() argument
709 sprintf(name, "pci_%x:%x.%x", parent->seq, PCI_DEV(bdf), in pci_find_and_bind_driver()
710 PCI_FUNC(bdf)); in pci_find_and_bind_driver()
735 pci_dev_t bdf, end; in pci_bind_bus_devices() local
742 for (bdf = PCI_BDF(bus->seq, 0, 0); bdf <= end; in pci_bind_bus_devices()
743 bdf += PCI_BDF(0, 0, 1)) { in pci_bind_bus_devices()
748 if (PCI_FUNC(bdf) && !found_multi) in pci_bind_bus_devices()
751 ret = pci_bus_read_config(bus, bdf, PCI_HEADER_TYPE, in pci_bind_bus_devices()
755 pci_bus_read_config(bus, bdf, PCI_VENDOR_ID, &vendor, in pci_bind_bus_devices()
760 if (!PCI_FUNC(bdf)) in pci_bind_bus_devices()
764 bus->seq, bus->name, PCI_DEV(bdf), PCI_FUNC(bdf)); in pci_bind_bus_devices()
765 pci_bus_read_config(bus, bdf, PCI_DEVICE_ID, &device, in pci_bind_bus_devices()
767 pci_bus_read_config(bus, bdf, PCI_CLASS_REVISION, &class, in pci_bind_bus_devices()
772 ret = pci_bus_find_devfn(bus, PCI_MASK_BUS(bdf), &dev); in pci_bind_bus_devices()
784 pci_bus_read_config(bus, bdf, in pci_bind_bus_devices()
790 ret = pci_find_and_bind_driver(bus, &find_id, bdf, in pci_bind_bus_devices()
800 pplat->devfn = PCI_MASK_BUS(bdf); in pci_bind_bus_devices()
1009 static int pci_bridge_read_config(struct udevice *bus, pci_dev_t bdf, in pci_bridge_read_config() argument
1015 return pci_bus_read_config(hose->ctlr, bdf, offset, valuep, size); in pci_bridge_read_config()
1018 static int pci_bridge_write_config(struct udevice *bus, pci_dev_t bdf, in pci_bridge_write_config() argument
1024 return pci_bus_write_config(hose->ctlr, bdf, offset, value, size); in pci_bridge_write_config()