Lines Matching refs:bdf
115 int dm_pci_bus_find_bdf(pci_dev_t bdf, struct udevice **devp) in dm_pci_bus_find_bdf() argument
120 ret = pci_get_bus(PCI_BUS(bdf), &bus); in dm_pci_bus_find_bdf()
123 return pci_bus_find_devfn(bus, PCI_MASK_BUS(bdf), devp); in dm_pci_bus_find_bdf()
397 int pci_bus_write_config(struct udevice *bus, pci_dev_t bdf, int offset, in pci_bus_write_config() argument
405 return ops->write_config(bus, bdf, offset, value, size); in pci_bus_write_config()
408 int pci_bus_clrset_config32(struct udevice *bus, pci_dev_t bdf, int offset, in pci_bus_clrset_config32() argument
414 ret = pci_bus_read_config(bus, bdf, offset, &val, PCI_SIZE_32); in pci_bus_clrset_config32()
420 return pci_bus_write_config(bus, bdf, offset, val, PCI_SIZE_32); in pci_bus_clrset_config32()
423 int pci_write_config(pci_dev_t bdf, int offset, unsigned long value, in pci_write_config() argument
429 ret = pci_get_bus(PCI_BUS(bdf), &bus); in pci_write_config()
433 return pci_bus_write_config(bus, bdf, offset, value, size); in pci_write_config()
447 int pci_write_config32(pci_dev_t bdf, int offset, u32 value) in pci_write_config32() argument
449 return pci_write_config(bdf, offset, value, PCI_SIZE_32); in pci_write_config32()
452 int pci_write_config16(pci_dev_t bdf, int offset, u16 value) in pci_write_config16() argument
454 return pci_write_config(bdf, offset, value, PCI_SIZE_16); in pci_write_config16()
457 int pci_write_config8(pci_dev_t bdf, int offset, u8 value) in pci_write_config8() argument
459 return pci_write_config(bdf, offset, value, PCI_SIZE_8); in pci_write_config8()
477 int pci_bus_read_config(struct udevice *bus, pci_dev_t bdf, int offset, in pci_bus_read_config() argument
485 return ops->read_config(bus, bdf, offset, valuep, size); in pci_bus_read_config()
488 int pci_read_config(pci_dev_t bdf, int offset, unsigned long *valuep, in pci_read_config() argument
494 ret = pci_get_bus(PCI_BUS(bdf), &bus); in pci_read_config()
498 return pci_bus_read_config(bus, bdf, offset, valuep, size); in pci_read_config()
512 int pci_read_config32(pci_dev_t bdf, int offset, u32 *valuep) in pci_read_config32() argument
517 ret = pci_read_config(bdf, offset, &value, PCI_SIZE_32); in pci_read_config32()
525 int pci_read_config16(pci_dev_t bdf, int offset, u16 *valuep) in pci_read_config16() argument
530 ret = pci_read_config(bdf, offset, &value, PCI_SIZE_16); in pci_read_config16()
538 int pci_read_config8(pci_dev_t bdf, int offset, u8 *valuep) in pci_read_config8() argument
543 ret = pci_read_config(bdf, offset, &value, PCI_SIZE_8); in pci_read_config8()
742 pci_dev_t bdf, struct udevice **devp) in pci_find_and_bind_driver() argument
809 sprintf(name, "pci_%x:%x.%x", parent->seq, PCI_DEV(bdf), in pci_find_and_bind_driver()
810 PCI_FUNC(bdf)); in pci_find_and_bind_driver()
835 pci_dev_t bdf, end; in pci_bind_bus_devices() local
842 for (bdf = PCI_BDF(bus->seq, 0, 0); bdf <= end; in pci_bind_bus_devices()
843 bdf += PCI_BDF(0, 0, 1)) { in pci_bind_bus_devices()
848 if (PCI_FUNC(bdf) && !found_multi) in pci_bind_bus_devices()
851 ret = pci_bus_read_config(bus, bdf, PCI_HEADER_TYPE, in pci_bind_bus_devices()
855 pci_bus_read_config(bus, bdf, PCI_VENDOR_ID, &vendor, in pci_bind_bus_devices()
860 if (!PCI_FUNC(bdf)) in pci_bind_bus_devices()
864 bus->seq, bus->name, PCI_DEV(bdf), PCI_FUNC(bdf)); in pci_bind_bus_devices()
865 pci_bus_read_config(bus, bdf, PCI_DEVICE_ID, &device, in pci_bind_bus_devices()
867 pci_bus_read_config(bus, bdf, PCI_CLASS_REVISION, &class, in pci_bind_bus_devices()
872 ret = pci_bus_find_devfn(bus, PCI_MASK_BUS(bdf), &dev); in pci_bind_bus_devices()
884 pci_bus_read_config(bus, bdf, in pci_bind_bus_devices()
890 ret = pci_find_and_bind_driver(bus, &find_id, bdf, in pci_bind_bus_devices()
900 pplat->devfn = PCI_MASK_BUS(bdf); in pci_bind_bus_devices()
1100 static int pci_bridge_read_config(struct udevice *bus, pci_dev_t bdf, in pci_bridge_read_config() argument
1106 return pci_bus_read_config(hose->ctlr, bdf, offset, valuep, size); in pci_bridge_read_config()
1109 static int pci_bridge_write_config(struct udevice *bus, pci_dev_t bdf, in pci_bridge_write_config() argument
1115 return pci_bus_write_config(hose->ctlr, bdf, offset, value, size); in pci_bridge_write_config()