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()
240 int pci_bus_write_config(struct udevice *bus, pci_dev_t bdf, int offset, in pci_bus_write_config() argument
248 return ops->write_config(bus, bdf, offset, value, size); in pci_bus_write_config()
251 int pci_bus_clrset_config32(struct udevice *bus, pci_dev_t bdf, int offset, in pci_bus_clrset_config32() argument
257 ret = pci_bus_read_config(bus, bdf, offset, &val, PCI_SIZE_32); in pci_bus_clrset_config32()
263 return pci_bus_write_config(bus, bdf, offset, val, PCI_SIZE_32); in pci_bus_clrset_config32()
266 int pci_write_config(pci_dev_t bdf, int offset, unsigned long value, in pci_write_config() argument
272 ret = pci_get_bus(PCI_BUS(bdf), &bus); in pci_write_config()
276 return pci_bus_write_config(bus, bdf, offset, value, size); in pci_write_config()
290 int pci_write_config32(pci_dev_t bdf, int offset, u32 value) in pci_write_config32() argument
292 return pci_write_config(bdf, offset, value, PCI_SIZE_32); in pci_write_config32()
295 int pci_write_config16(pci_dev_t bdf, int offset, u16 value) in pci_write_config16() argument
297 return pci_write_config(bdf, offset, value, PCI_SIZE_16); in pci_write_config16()
300 int pci_write_config8(pci_dev_t bdf, int offset, u8 value) in pci_write_config8() argument
302 return pci_write_config(bdf, offset, value, PCI_SIZE_8); in pci_write_config8()
320 int pci_bus_read_config(struct udevice *bus, pci_dev_t bdf, int offset, in pci_bus_read_config() argument
328 return ops->read_config(bus, bdf, offset, valuep, size); in pci_bus_read_config()
331 int pci_read_config(pci_dev_t bdf, int offset, unsigned long *valuep, in pci_read_config() argument
337 ret = pci_get_bus(PCI_BUS(bdf), &bus); in pci_read_config()
341 return pci_bus_read_config(bus, bdf, offset, valuep, size); in pci_read_config()
355 int pci_read_config32(pci_dev_t bdf, int offset, u32 *valuep) in pci_read_config32() argument
360 ret = pci_read_config(bdf, offset, &value, PCI_SIZE_32); in pci_read_config32()
368 int pci_read_config16(pci_dev_t bdf, int offset, u16 *valuep) in pci_read_config16() argument
373 ret = pci_read_config(bdf, offset, &value, PCI_SIZE_16); in pci_read_config16()
381 int pci_read_config8(pci_dev_t bdf, int offset, u8 *valuep) in pci_read_config8() argument
386 ret = pci_read_config(bdf, offset, &value, PCI_SIZE_8); in pci_read_config8()
585 pci_dev_t bdf, struct udevice **devp) in pci_find_and_bind_driver() argument
652 sprintf(name, "pci_%x:%x.%x", parent->seq, PCI_DEV(bdf), in pci_find_and_bind_driver()
653 PCI_FUNC(bdf)); in pci_find_and_bind_driver()
678 pci_dev_t bdf, end; in pci_bind_bus_devices() local
685 for (bdf = PCI_BDF(bus->seq, 0, 0); bdf <= end; in pci_bind_bus_devices()
686 bdf += PCI_BDF(0, 0, 1)) { in pci_bind_bus_devices()
691 if (PCI_FUNC(bdf) && !found_multi) in pci_bind_bus_devices()
694 ret = pci_bus_read_config(bus, bdf, PCI_HEADER_TYPE, in pci_bind_bus_devices()
698 pci_bus_read_config(bus, bdf, PCI_VENDOR_ID, &vendor, in pci_bind_bus_devices()
703 if (!PCI_FUNC(bdf)) in pci_bind_bus_devices()
707 bus->seq, bus->name, PCI_DEV(bdf), PCI_FUNC(bdf)); in pci_bind_bus_devices()
708 pci_bus_read_config(bus, bdf, PCI_DEVICE_ID, &device, in pci_bind_bus_devices()
710 pci_bus_read_config(bus, bdf, PCI_CLASS_REVISION, &class, in pci_bind_bus_devices()
715 ret = pci_bus_find_devfn(bus, PCI_MASK_BUS(bdf), &dev); in pci_bind_bus_devices()
727 pci_bus_read_config(bus, bdf, in pci_bind_bus_devices()
733 ret = pci_find_and_bind_driver(bus, &find_id, bdf, in pci_bind_bus_devices()
743 pplat->devfn = PCI_MASK_BUS(bdf); in pci_bind_bus_devices()
929 static int pci_bridge_read_config(struct udevice *bus, pci_dev_t bdf, in pci_bridge_read_config() argument
935 return pci_bus_read_config(hose->ctlr, bdf, offset, valuep, size); in pci_bridge_read_config()
938 static int pci_bridge_write_config(struct udevice *bus, pci_dev_t bdf, in pci_bridge_write_config() argument
944 return pci_bus_write_config(hose->ctlr, bdf, offset, value, size); in pci_bridge_write_config()