Home
last modified time | relevance | path

Searched refs:bdf (Results 1 – 25 of 64) sorted by relevance

123

/u-boot/drivers/pci/
A Dpci_octeontx.c60 dev = PCI_DEV(bdf); in octeontx_cfg_addr()
61 func = PCI_FUNC(bdf); in octeontx_cfg_addr()
112 if (PCI_BUS(bdf) == 1 && PCI_DEV(bdf) > 0) in octeontx_bdf_invalid()
131 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf), size, offset, *valuep); in octeontx_ecam_read_config()
149 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf), size, offset, value); in octeontx_ecam_write_config()
166 bdf, 0); in octeontx_pem_read_config()
211 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf), size, offset, in octeontx_pem_write_config()
226 bdf, 0); in octeontx2_pem_read_config()
236 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf), size, offset, in octeontx2_pem_read_config()
251 bdf, 0); in octeontx2_pem_write_config()
[all …]
A Dpcie_intel_fpga.c98 if (IS_ROOT_PORT(pcie, bdf) && PCI_DEV(bdf) == 0 && in intel_fpga_pcie_hide_rc_bar()
123 pci_dev_t bdf) in intel_fpga_pcie_addr_valid() argument
130 if (IS_ROOT_PORT(pcie, bdf) && PCI_DEV(bdf) > 0) in intel_fpga_pcie_addr_valid()
133 if ((PCI_BUS(bdf) == pcie->first_busno + 1) && PCI_DEV(bdf) > 0) in intel_fpga_pcie_addr_valid()
204 u8 busno = PCI_BUS(bdf); in tlp_cfg_dword_read()
208 headers[2] = TLP_CFG_DW2(busno, PCI_DEV(bdf), PCI_FUNC(bdf), offset); in tlp_cfg_dword_read()
219 u8 busno = PCI_BUS(bdf); in tlp_cfg_dword_write()
223 headers[2] = TLP_CFG_DW2(busno, PCI_DEV(bdf), PCI_FUNC(bdf), offset); in tlp_cfg_dword_write()
289 if (IS_ROOT_PORT(pcie, bdf)) in _pcie_intel_fpga_read_config()
314 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in _pcie_intel_fpga_write_config()
[all …]
A Dpcie_ecam_generic.c42 pci_dev_t bdf, uint offset, in pci_generic_ecam_conf_address() argument
50 addr += PCI_DEV(bdf) << 15; in pci_generic_ecam_conf_address()
51 addr += PCI_FUNC(bdf) << 12; in pci_generic_ecam_conf_address()
59 pci_dev_t bdf) in pci_generic_ecam_addr_valid() argument
64 return (PCI_BUS(bdf) >= pcie->first_busno && in pci_generic_ecam_addr_valid()
65 PCI_BUS(bdf) < pcie->first_busno + num_buses); in pci_generic_ecam_addr_valid()
81 pci_dev_t bdf, uint offset, in pci_generic_ecam_read_config() argument
84 if (!pci_generic_ecam_addr_valid(bus, bdf)) { in pci_generic_ecam_read_config()
90 bdf, offset, valuep, size); in pci_generic_ecam_read_config()
109 if (!pci_generic_ecam_addr_valid(bus, bdf)) in pci_generic_ecam_write_config()
[all …]
A Dpcie_layerscape_fixup.c197 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in fdt_fixup_pcie_device_ls()
205 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in fdt_fixup_pcie_device_ls()
221 pci_dev_t bdf; member
463 pci_dev_t bdf; in fdt_fixup_pci_vfs() local
467 PCI_DEV(entry->bdf), PCI_FUNC(entry->bdf)); in fdt_fixup_pci_vfs()
482 bdf = entry->bdf - PCI_BDF(dev_seq(bus), 0, 0) + (vf_offset << 8); in fdt_fixup_pci_vfs()
487 bdf += vf_stride << 8; in fdt_fixup_pci_vfs()
492 PCI_DEV(entry->bdf), PCI_FUNC(entry->bdf)); in fdt_fixup_pci_vfs()
501 pci_dev_t bdf; in fdt_fixup_pcie_ls() local
544 bdf = entries[i].bdf; in fdt_fixup_pcie_ls()
[all …]
A Dpcie_phytium.c79 static int pci_phytium_conf_address(const struct udevice *bus, pci_dev_t bdf, in pci_phytium_conf_address() argument
86 unsigned int bus_no = PCI_BUS(bdf); in pci_phytium_conf_address()
87 unsigned int dev_no = PCI_DEV(bdf); in pci_phytium_conf_address()
92 addr += PCI_BUS(bdf) << 20; in pci_phytium_conf_address()
93 addr += PCI_DEV(bdf) << 15; in pci_phytium_conf_address()
94 addr += PCI_FUNC(bdf) << 12; in pci_phytium_conf_address()
122 static int pci_phytium_read_config(const struct udevice *bus, pci_dev_t bdf, in pci_phytium_read_config() argument
127 bdf, offset, valuep, size); in pci_phytium_read_config()
142 static int pci_phytium_write_config(struct udevice *bus, pci_dev_t bdf, in pci_phytium_write_config() argument
147 bdf, offset, value, size); in pci_phytium_write_config()
A Dpci_common.c288 pci_dev_t bdf; in pci_hose_find_devices() local
291 for (bdf = PCI_BDF(busnum, 0, 0); in pci_hose_find_devices()
292 bdf < PCI_BDF(busnum + 1, 0, 0); in pci_hose_find_devices()
293 bdf += PCI_BDF(0, 0, 1)) { in pci_hose_find_devices()
294 if (pci_skip_dev(hose, bdf)) in pci_hose_find_devices()
297 if (!PCI_FUNC(bdf)) { in pci_hose_find_devices()
313 return bdf; in pci_hose_find_devices()
327 pci_dev_t bdf; in pci_find_class() local
338 bdf <= PCI_BDF(bus, devnum, in pci_find_class()
340 bdf += PCI_BDF(0, 0, 1)) { in pci_find_class()
[all …]
A Dpci_gt64120.c46 unsigned char access_type, pci_dev_t bdf, in gt_config_access() argument
49 unsigned int bus = PCI_BUS(bdf); in gt_config_access()
50 unsigned int dev = PCI_DEV(bdf); in gt_config_access()
51 unsigned int devfn = PCI_DEV(bdf) << 3 | PCI_FUNC(bdf); in gt_config_access()
63 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf), where, *data); in gt_config_access()
112 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf), where, *data); in gt_config_access()
A Dpcie_xilinx.c59 static int pcie_xilinx_config_address(const struct udevice *udev, pci_dev_t bdf, in pcie_xilinx_config_address() argument
63 unsigned int bus = PCI_BUS(bdf); in pcie_xilinx_config_address()
64 unsigned int dev = PCI_DEV(bdf); in pcie_xilinx_config_address()
65 unsigned int func = PCI_FUNC(bdf); in pcie_xilinx_config_address()
102 static int pcie_xilinx_read_config(const struct udevice *bus, pci_dev_t bdf, in pcie_xilinx_read_config() argument
107 bdf, offset, valuep, size); in pcie_xilinx_read_config()
124 static int pcie_xilinx_write_config(struct udevice *bus, pci_dev_t bdf, in pcie_xilinx_write_config() argument
129 bdf, offset, value, size); in pcie_xilinx_write_config()
A Dpci-uclass.c566 pci_dev_t bdf, in pci_generic_mmap_write_config()
595 pci_dev_t bdf, in pci_generic_mmap_read_config()
769 PCI_FUNC(bdf)); in pci_find_and_bind_driver()
794 pci_dev_t bdf, end; in pci_bind_bus_devices() local
802 for (bdf = PCI_BDF(dev_seq(bus), 0, 0); bdf <= end; in pci_bind_bus_devices()
808 if (!PCI_FUNC(bdf)) in pci_bind_bus_devices()
829 dev_seq(bus), bus->name, PCI_DEV(bdf), PCI_FUNC(bdf)); in pci_bind_bus_devices()
888 bdf = PCI_BDF(PCI_BUS(bdf), in pci_bind_bus_devices()
891 bdf = bdf - 0x100; in pci_bind_bus_devices()
1693 pci_dev_t bdf; in pci_sriov_init() local
[all …]
A Dpci_x86.c11 static int _pci_x86_read_config(const struct udevice *bus, pci_dev_t bdf, in _pci_x86_read_config() argument
15 return pci_x86_read_config(bdf, offset, valuep, size); in _pci_x86_read_config()
18 static int _pci_x86_write_config(struct udevice *bus, pci_dev_t bdf, in _pci_x86_write_config() argument
21 return pci_x86_write_config(bdf, offset, value, size); in _pci_x86_write_config()
A Dpci-rcar-gen2.c111 static u32 get_bus_address(const struct udevice *dev, pci_dev_t bdf, u32 offset) in get_bus_address() argument
115 return priv->cfg_base + (PCI_DEV(bdf) >> 1) * 0x100 + (offset & ~3); in get_bus_address()
118 static u32 setup_bus_address(struct udevice *dev, pci_dev_t bdf, u32 offset) in setup_bus_address() argument
123 reg = PCI_DEV(bdf) ? RCAR_AHBPCI_WIN1_DEVICE : RCAR_AHBPCI_WIN1_HOST; in setup_bus_address()
127 return get_bus_address(dev, bdf, offset); in setup_bus_address()
130 static int rcar_gen2_pci_read_config(const struct udevice *dev, pci_dev_t bdf, in rcar_gen2_pci_read_config() argument
137 ret = rcar_gen2_pci_addr_valid(bdf, offset); in rcar_gen2_pci_read_config()
143 addr = get_bus_address(dev, bdf, offset); in rcar_gen2_pci_read_config()
150 static int rcar_gen2_pci_write_config(struct udevice *dev, pci_dev_t bdf, in rcar_gen2_pci_write_config() argument
157 ret = rcar_gen2_pci_addr_valid(bdf, offset); in rcar_gen2_pci_write_config()
[all …]
A Dpcie_layerscape_rc.c134 if (PCI_BUS(bdf) < dev_seq(bus)) in ls_pcie_addr_valid()
137 if ((PCI_BUS(bdf) > dev_seq(bus)) && (!ls_pcie_link_up(pcie))) in ls_pcie_addr_valid()
140 if (PCI_BUS(bdf) <= (dev_seq(bus) + 1) && (PCI_DEV(bdf) > 0)) in ls_pcie_addr_valid()
153 if (ls_pcie_addr_valid(pcie_rc, bdf)) in ls_pcie_conf_address()
156 if (PCI_BUS(bdf) == dev_seq(bus)) { in ls_pcie_conf_address()
161 busdev = PCIE_ATU_BUS(PCI_BUS(bdf) - dev_seq(bus)) | in ls_pcie_conf_address()
162 PCIE_ATU_DEV(PCI_DEV(bdf)) | in ls_pcie_conf_address()
163 PCIE_ATU_FUNC(PCI_FUNC(bdf)); in ls_pcie_conf_address()
165 if (PCI_BUS(bdf) == dev_seq(bus) + 1) { in ls_pcie_conf_address()
180 bdf, offset, valuep, size); in ls_pcie_read_config()
[all …]
A Dpci-aardvark.c177 static int pcie_advk_addr_valid(pci_dev_t bdf, int first_busno) in pcie_advk_addr_valid() argument
184 if ((PCI_BUS(bdf) == first_busno) && (PCI_DEV(bdf) > 0)) in pcie_advk_addr_valid()
318 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in pcie_advk_read_config()
320 if (!pcie_advk_addr_valid(bdf, pcie->first_busno)) { in pcie_advk_read_config()
333 if (PCI_BUS(bdf) == pcie->first_busno) in pcie_advk_read_config()
340 reg = PCIE_BDF(bdf) | PCIE_CONF_REG(offset); in pcie_advk_read_config()
406 static int pcie_advk_write_config(struct udevice *bus, pci_dev_t bdf, in pcie_advk_write_config() argument
414 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in pcie_advk_write_config()
418 if (!pcie_advk_addr_valid(bdf, pcie->first_busno)) { in pcie_advk_write_config()
430 if (PCI_BUS(bdf) == pcie->first_busno) in pcie_advk_write_config()
[all …]
A Dpci_sh7751.c85 static u32 get_bus_address(const struct udevice *dev, pci_dev_t bdf, u32 offset) in get_bus_address() argument
87 return BIT(31) | (PCI_DEV(bdf) << 8) | (offset & ~3); in get_bus_address()
90 static int sh7751_pci_read_config(const struct udevice *dev, pci_dev_t bdf, in sh7751_pci_read_config() argument
97 ret = sh7751_pci_addr_valid(bdf, offset); in sh7751_pci_read_config()
103 addr = get_bus_address(dev, bdf, offset); in sh7751_pci_read_config()
111 static int sh7751_pci_write_config(struct udevice *dev, pci_dev_t bdf, in sh7751_pci_write_config() argument
118 ret = sh7751_pci_addr_valid(bdf, offset); in sh7751_pci_write_config()
122 addr = get_bus_address(dev, bdf, offset); in sh7751_pci_write_config()
A Dpcie_mediatek.c46 #define PCIE_CONF_ADDR(regn, bdf) \ argument
47 (PCIE_CONF_REG(regn) | (bdf))
162 bdf, offset, valuep, size); in mtk_pcie_read_config()
170 bdf, offset, value, size); in mtk_pcie_write_config()
249 pci_dev_t bdf) in mtk_pcie_find_port() argument
257 if (PCI_BUS(bdf) != 0) { in mtk_pcie_find_port()
271 if ((PCI_BUS(bdf) == 0) && (PCI_DEV(bdf) == port->slot)) in mtk_pcie_find_port()
274 if (PCI_BUS(bdf) != 0 && PCI_DEV(bdf) == 0 && in mtk_pcie_find_port()
289 port = mtk_pcie_find_port(bus, bdf); in mtk_pcie_config_read()
295 ret = mtk_pcie_hw_rd_cfg(port, PCI_BUS(bdf), bdf, offset, (1 << size), valuep); in mtk_pcie_config_read()
[all …]
/u-boot/board/imgtec/malta/
A Dmalta.c172 pci_dev_t bdf; in pci_init_board() local
195 bdf = pci_find_device(PCI_VENDOR_ID_INTEL, in pci_init_board()
197 if (bdf == -1) in pci_init_board()
201 pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCA, 10); in pci_init_board()
202 pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCB, 10); in pci_init_board()
216 bdf = pci_find_device(PCI_VENDOR_ID_INTEL, in pci_init_board()
218 if (bdf == -1) in pci_init_board()
223 pci_write_config_dword(bdf, PCI_COMMAND, val32); in pci_init_board()
226 pci_write_config_byte(bdf, PCI_LATENCY_TIMER, 0x40); in pci_init_board()
229 pci_write_config_dword(bdf, PCI_CFG_PIIX4_IDETIM_PRI, in pci_init_board()
[all …]
/u-boot/arch/x86/cpu/
A Dpci.c20 int pci_x86_read_config(pci_dev_t bdf, uint offset, ulong *valuep, in pci_x86_read_config() argument
23 outl(bdf | (offset & 0xfc) | PCI_CFG_EN, PCI_REG_ADDR); in pci_x86_read_config()
39 int pci_x86_write_config(pci_dev_t bdf, uint offset, ulong value, in pci_x86_write_config() argument
42 outl(bdf | (offset & 0xfc) | PCI_CFG_EN, PCI_REG_ADDR); in pci_x86_write_config()
64 ret = pci_x86_read_config(bdf, offset, &value, size); in pci_x86_clrset_config()
70 return pci_x86_write_config(bdf, offset, value, size); in pci_x86_clrset_config()
75 pci_dev_t bdf; in pci_assign_irqs() local
81 bdf = PCI_BDF(bus, device, func); in pci_assign_irqs()
82 pci_read_config16(bdf, PCI_VENDOR_ID, &vendor); in pci_assign_irqs()
86 pci_read_config8(bdf, PCI_INTERRUPT_PIN, &pin); in pci_assign_irqs()
[all …]
A Dirq.c165 priv->bdf = dm_pci_get_bdf(dev->parent); in create_pirq_routing_table()
261 rt->rtr_bus = PCI_BUS(priv->bdf); in create_pirq_routing_table()
262 rt->rtr_devfn = (PCI_DEV(priv->bdf) << 3) | PCI_FUNC(priv->bdf); in create_pirq_routing_table()
273 pr.bdf = fdt_addr_to_cpu(cell[0]); in create_pirq_routing_table()
278 i, PCI_BUS(pr.bdf), PCI_DEV(pr.bdf), in create_pirq_routing_table()
279 PCI_FUNC(pr.bdf), 'A' + pr.pin - 1, in create_pirq_routing_table()
283 PCI_BUS(pr.bdf), PCI_DEV(pr.bdf)); in create_pirq_routing_table()
286 PCI_BUS(pr.bdf), PCI_DEV(pr.bdf)); in create_pirq_routing_table()
307 fill_irq_info(priv, slot, PCI_BUS(pr.bdf), PCI_DEV(pr.bdf), in create_pirq_routing_table()
/u-boot/board/theadorable/
A Dtheadorable.c259 pci_dev_t bdf; in board_late_init() local
268 bdf = pci_find_device(PCI_VENDOR_ID_PLX, 0x8619, 0); in board_late_init()
269 if (bdf == -1) { in board_late_init()
352 ret = dm_pci_bus_find_bdf(bdf, &dev); in pcie_get_link_speed_width()
360 ven_id, dev_id, PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in pcie_get_link_speed_width()
390 pci_dev_t bdf; in do_pcie_test() local
404 bdf = PCI_BDF(0, 1, 0); in do_pcie_test()
405 ret = pcie_get_link_speed_width(bdf, &speed, &width); in do_pcie_test()
409 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in do_pcie_test()
420 bdf = PCI_BDF(1, 1, 0); in do_pcie_test()
[all …]
/u-boot/board/armltd/integrator/
A Dpci.c95 unsigned int busnr = PCI_BUS(bdf); in v3_open_config_window()
96 unsigned int devfn = PCI_FUNC(bdf); in v3_open_config_window()
113 int slot = PCI_DEV(bdf); in v3_open_config_window()
125 address = PCI_FUNC(bdf) << 8; in v3_open_config_window()
196 addr = v3_open_config_window(bdf, offset); in pci_integrator_read_byte()
203 pci_dev_t bdf, int offset, in pci_integrator_read__word() argument
208 addr = v3_open_config_window(bdf, offset); in pci_integrator_read__word()
215 pci_dev_t bdf, int offset, in pci_integrator_read_dword() argument
227 pci_dev_t bdf, int offset, in pci_integrator_write_byte() argument
240 pci_dev_t bdf, int offset, in pci_integrator_write_word() argument
[all …]
/u-boot/arch/arm/cpu/armv8/fsl-layerscape/doc/
A DREADME.pci_iommu_extra19 The env var consists of a list of <bdf>,<action> pairs for a certain pci bus
23 pci_iommu_extra = pci@<addr1>,<bdf>,<action>,<bdf>,<action>,
24 pci@<addr2>,<bdf>,<action>,<bdf>,<action>,...
28 subsequent <bdf>,<action> pairs apply
29 <bdf> identifies to which B.D.F the action applies to
32 the <bdf> to include mappings for <number> of VFs.
35 - "hp" to specify that on this <bdf> there will be a hot-plugged device so
38 and only the bdf and action pairs need to be specified, like this:
40 pci-iommu-extra = "<bdf>,<action>,<bdf>,<action>,...";
/u-boot/arch/x86/lib/
A Dbios_interrupts.c112 pci_dev_t bdf; in int1a_handler() local
136 bdf = -1; in int1a_handler()
141 bdf = dm_pci_get_bdf(dev); in int1a_handler()
148 busdevfn = (PCI_BUS(bdf) << 8) | PCI_DEV(bdf) << 3 | in int1a_handler()
149 PCI_FUNC(bdf); in int1a_handler()
168 bdf = PCI_BDF(bus, devfn >> 3, devfn & 7); in int1a_handler()
170 ret = dm_pci_bus_find_bdf(bdf, &dev); in int1a_handler()
172 debug("%s: Device %x not found\n", __func__, bdf); in int1a_handler()
/u-boot/arch/x86/include/asm/
A Dpci.h31 int pci_x86_read_config(pci_dev_t bdf, uint offset, ulong *valuep,
45 int pci_x86_write_config(pci_dev_t bdf, uint offset, ulong value,
60 int pci_x86_clrset_config(pci_dev_t bdf, uint offset, ulong clr, ulong set,
/u-boot/arch/x86/cpu/apollolake/
A Duart.c57 void apl_uart_init(pci_dev_t bdf, ulong base) in apl_uart_init() argument
60 pci_x86_write_config(bdf, PCI_BASE_ADDRESS_0, base, PCI_SIZE_32); in apl_uart_init()
63 pci_x86_write_config(bdf, PCI_COMMAND, PCI_COMMAND_MEMORY | in apl_uart_init()
85 apl_uart_init(plat->ns16550.bdf, plat->ns16550.base); in apl_ns16550_probe()
113 ns.bdf = pci_ofplat_get_devfn(dtplat->reg[0]); in apl_ns16550_of_to_plat()
/u-boot/arch/x86/cpu/intel_common/
A Dgeneric_wifi.c55 pci_dev_t bdf; in generic_wifi_fill_ssdt() local
74 bdf = dm_pci_get_bdf(dev); in generic_wifi_fill_ssdt()
75 address = (PCI_DEV(bdf) << 16) | PCI_FUNC(bdf); in generic_wifi_fill_ssdt()

Completed in 34 milliseconds

123