Home
last modified time | relevance | path

Searched full:bdf (Results 1 – 25 of 118) sorted by relevance

12345

/openbmc/u-boot/drivers/pci/
H A Dpcie_intel_fpga.c62 #define IS_ROOT_PORT(pcie, bdf) \ argument
63 ((PCI_BUS(bdf) == pcie->first_busno) ? true : false)
93 pci_dev_t bdf, int offset) in intel_fpga_pcie_hide_rc_bar() argument
95 if (IS_ROOT_PORT(pcie, bdf) && PCI_DEV(bdf) == 0 && in intel_fpga_pcie_hide_rc_bar()
96 PCI_FUNC(bdf) == 0 && offset == PCI_BASE_ADDRESS_0) in intel_fpga_pcie_hide_rc_bar()
120 pci_dev_t bdf) in intel_fpga_pcie_addr_valid() argument
123 if (!IS_ROOT_PORT(pcie, bdf) && !intel_fpga_pcie_link_up(pcie)) in intel_fpga_pcie_addr_valid()
127 if (IS_ROOT_PORT(pcie, bdf) && PCI_DEV(bdf) > 0) in intel_fpga_pcie_addr_valid()
130 if ((PCI_BUS(bdf) == pcie->first_busno + 1) && PCI_DEV(bdf) > 0) in intel_fpga_pcie_addr_valid()
195 static int tlp_cfg_dword_read(struct intel_fpga_pcie *pcie, pci_dev_t bdf, in tlp_cfg_dword_read() argument
[all …]
H A Dpcie_ecam_generic.c27 * @bdf: Identifies the PCIe device to access
33 * controller device @pcie and the bus, device & function numbers in @bdf. If
38 static int pci_generic_ecam_conf_address(struct udevice *bus, pci_dev_t bdf, in pci_generic_ecam_conf_address() argument
45 addr += PCI_BUS(bdf) << 20; in pci_generic_ecam_conf_address()
46 addr += PCI_DEV(bdf) << 15; in pci_generic_ecam_conf_address()
47 addr += PCI_FUNC(bdf) << 12; in pci_generic_ecam_conf_address()
57 * @bdf: Identifies the PCIe device to access
63 * space of the device identified by the bus, device & function numbers in @bdf
66 static int pci_generic_ecam_read_config(struct udevice *bus, pci_dev_t bdf, in pci_generic_ecam_read_config() argument
71 bdf, offset, valuep, size); in pci_generic_ecam_read_config()
[all …]
H A Dpcie_xilinx.c44 * @bdf: Identifies the PCIe device to access
50 * controller device @pcie and the bus, device & function numbers in @bdf. If
57 static int pcie_xilinx_config_address(struct udevice *udev, pci_dev_t bdf, in pcie_xilinx_config_address() argument
61 unsigned int bus = PCI_BUS(bdf); in pcie_xilinx_config_address()
62 unsigned int dev = PCI_DEV(bdf); in pcie_xilinx_config_address()
63 unsigned int func = PCI_FUNC(bdf); in pcie_xilinx_config_address()
89 * @bdf: Identifies the PCIe device to access
95 * space of the device identified by the bus, device & function numbers in @bdf
100 static int pcie_xilinx_read_config(struct udevice *bus, pci_dev_t bdf, in pcie_xilinx_read_config() argument
105 bdf, offset, valuep, size); in pcie_xilinx_read_config()
[all …]
H A Dpci-uclass.c93 static void pci_dev_find_ofnode(struct udevice *bus, phys_addr_t bdf, in pci_dev_find_ofnode() argument
106 if (PCI_MASK_BUS(addr.phys_hi) != PCI_MASK_BUS(bdf)) in pci_dev_find_ofnode()
134 int dm_pci_bus_find_bdf(pci_dev_t bdf, struct udevice **devp) in dm_pci_bus_find_bdf() argument
139 ret = pci_get_bus(PCI_BUS(bdf), &bus); in dm_pci_bus_find_bdf()
142 return pci_bus_find_devfn(bus, PCI_MASK_BUS(bdf), devp); in dm_pci_bus_find_bdf()
259 int pci_bus_write_config(struct udevice *bus, pci_dev_t bdf, int offset, in pci_bus_write_config() argument
267 return ops->write_config(bus, bdf, offset, value, size); in pci_bus_write_config()
270 int pci_bus_clrset_config32(struct udevice *bus, pci_dev_t bdf, int offset, in pci_bus_clrset_config32() argument
276 ret = pci_bus_read_config(bus, bdf, offset, &val, PCI_SIZE_32); in pci_bus_clrset_config32()
282 return pci_bus_write_config(bus, bdf, offset, val, PCI_SIZE_32); in pci_bus_clrset_config32()
[all …]
H A Dpcie_aspeed.c92 static void aspeed_pcie_cfg_read(struct pcie_aspeed *pcie, pci_dev_t bdf, in aspeed_pcie_cfg_read() argument
108 if (PCI_BUS(bdf) == 0) in aspeed_pcie_cfg_read()
113 bdf_offset = (PCI_BUS(bdf) << 24) | in aspeed_pcie_cfg_read()
114 (PCI_DEV(bdf) << 19) | in aspeed_pcie_cfg_read()
115 (PCI_FUNC(bdf) << 16) | in aspeed_pcie_cfg_read()
193 static void aspeed_pcie_cfg_write(struct pcie_aspeed *pcie, pci_dev_t bdf, in aspeed_pcie_cfg_write() argument
240 if (PCI_BUS(bdf) == 0) in aspeed_pcie_cfg_write()
245 bdf_offset = (PCI_BUS(bdf) << 24) | in aspeed_pcie_cfg_write()
246 (PCI_DEV(bdf) << 19) | in aspeed_pcie_cfg_write()
247 (PCI_FUNC(bdf) << 16) | in aspeed_pcie_cfg_write()
[all …]
H A Dpci_common.c287 pci_dev_t bdf; in pci_hose_find_devices() local
290 for (bdf = PCI_BDF(busnum, 0, 0); in pci_hose_find_devices()
291 bdf < PCI_BDF(busnum + 1, 0, 0); in pci_hose_find_devices()
292 bdf += PCI_BDF(0, 0, 1)) { in pci_hose_find_devices()
293 if (pci_skip_dev(hose, bdf)) in pci_hose_find_devices()
296 if (!PCI_FUNC(bdf)) { in pci_hose_find_devices()
297 pci_read_config_byte(bdf, PCI_HEADER_TYPE, in pci_hose_find_devices()
305 pci_read_config_word(bdf, PCI_VENDOR_ID, &vendor); in pci_hose_find_devices()
306 pci_read_config_word(bdf, PCI_DEVICE_ID, &device); in pci_hose_find_devices()
312 return bdf; in pci_hose_find_devices()
[all …]
H A Dpci_gt64120.c44 unsigned char access_type, pci_dev_t bdf, in gt_config_access() argument
47 unsigned int bus = PCI_BUS(bdf); in gt_config_access()
48 unsigned int dev = PCI_DEV(bdf); in gt_config_access()
49 unsigned int devfn = PCI_DEV(bdf) << 3 | PCI_FUNC(bdf); in gt_config_access()
61 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf), where, *data); in gt_config_access()
110 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf), where, *data); in gt_config_access()
H A Dpci-rcar-gen2.c110 static u32 get_bus_address(struct udevice *dev, pci_dev_t bdf, u32 offset) in get_bus_address() argument
114 return priv->cfg_base + (PCI_DEV(bdf) >> 1) * 0x100 + (offset & ~3); in get_bus_address()
117 static u32 setup_bus_address(struct udevice *dev, pci_dev_t bdf, u32 offset) in setup_bus_address() argument
122 reg = PCI_DEV(bdf) ? RCAR_AHBPCI_WIN1_DEVICE : RCAR_AHBPCI_WIN1_HOST; in setup_bus_address()
126 return get_bus_address(dev, bdf, offset); in setup_bus_address()
129 static int rcar_gen2_pci_read_config(struct udevice *dev, pci_dev_t bdf, in rcar_gen2_pci_read_config() argument
136 ret = rcar_gen2_pci_addr_valid(bdf, offset); in rcar_gen2_pci_read_config()
142 addr = get_bus_address(dev, bdf, offset); in rcar_gen2_pci_read_config()
149 static int rcar_gen2_pci_write_config(struct udevice *dev, pci_dev_t bdf, in rcar_gen2_pci_write_config() argument
156 ret = rcar_gen2_pci_addr_valid(bdf, offset); in rcar_gen2_pci_write_config()
[all …]
H A Dpci-aardvark.c163 * @bdf: The PCI device to access
168 static int pcie_advk_addr_valid(pci_dev_t bdf, int first_busno) in pcie_advk_addr_valid() argument
175 if ((PCI_BUS(bdf) == first_busno) && (PCI_DEV(bdf) > 0)) in pcie_advk_addr_valid()
289 * @bdf: Identifies the PCIe device to access
295 * space of the device identified by the bus, device & function numbers in @bdf
300 static int pcie_advk_read_config(struct udevice *bus, pci_dev_t bdf, in pcie_advk_read_config() argument
309 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in pcie_advk_read_config()
311 if (!pcie_advk_addr_valid(bdf, pcie->first_busno)) { in pcie_advk_read_config()
324 if (PCI_BUS(bdf) == pcie->first_busno) in pcie_advk_read_config()
331 reg = PCIE_BDF(bdf) | PCIE_CONF_REG(offset); in pcie_advk_read_config()
[all …]
H A Dpci_mvebu.c139 static int mvebu_pcie_read_config(struct udevice *bus, pci_dev_t bdf, in mvebu_pcie_read_config() argument
150 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in mvebu_pcie_read_config()
153 if (PCI_BUS(bdf) == local_bus && PCI_DEV(bdf) != local_dev) { in mvebu_pcie_read_config()
154 if (local_dev == 0 && PCI_DEV(bdf) != 1) { in mvebu_pcie_read_config()
162 } else if (local_dev != 0 && PCI_DEV(bdf) != 0) { in mvebu_pcie_read_config()
174 reg = PCIE_CONF_ADDR(bdf, offset); in mvebu_pcie_read_config()
183 static int mvebu_pcie_write_config(struct udevice *bus, pci_dev_t bdf, in mvebu_pcie_write_config() argument
193 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in mvebu_pcie_write_config()
197 if (PCI_BUS(bdf) == local_bus && PCI_DEV(bdf) != local_dev) { in mvebu_pcie_write_config()
198 if (local_dev == 0 && PCI_DEV(bdf) != 1) { in mvebu_pcie_write_config()
[all …]
H A Dpcie_layerscape.c224 static int ls_pcie_addr_valid(struct ls_pcie *pcie, pci_dev_t bdf) in ls_pcie_addr_valid() argument
234 if (PCI_BUS(bdf) < bus->seq) in ls_pcie_addr_valid()
237 if ((PCI_BUS(bdf) > bus->seq) && (!ls_pcie_link_up(pcie))) in ls_pcie_addr_valid()
240 if (PCI_BUS(bdf) <= (bus->seq + 1) && (PCI_DEV(bdf) > 0)) in ls_pcie_addr_valid()
246 int ls_pcie_conf_address(struct udevice *bus, pci_dev_t bdf, in ls_pcie_conf_address() argument
252 if (ls_pcie_addr_valid(pcie, bdf)) in ls_pcie_conf_address()
255 if (PCI_BUS(bdf) == bus->seq) { in ls_pcie_conf_address()
260 busdev = PCIE_ATU_BUS(PCI_BUS(bdf) - bus->seq) | in ls_pcie_conf_address()
261 PCIE_ATU_DEV(PCI_DEV(bdf)) | in ls_pcie_conf_address()
262 PCIE_ATU_FUNC(PCI_FUNC(bdf)); in ls_pcie_conf_address()
[all …]
/openbmc/linux/Documentation/ABI/testing/
H A Dsysfs-driver-ccp1 What: /sys/bus/pci/devices/<BDF>/fused_part
6 The /sys/bus/pci/devices/<BDF>/fused_part file reports
11 What: /sys/bus/pci/devices/<BDF>/debug_lock_on
16 The /sys/bus/pci/devices/<BDF>/debug_lock_on reports
22 What: /sys/bus/pci/devices/<BDF>/tsme_status
27 The /sys/bus/pci/devices/<BDF>/tsme_status file reports
33 What: /sys/bus/pci/devices/<BDF>/anti_rollback_status
38 The /sys/bus/pci/devices/<BDF>/anti_rollback_status file reports
44 What: /sys/bus/pci/devices/<BDF>/rpmc_production_enabled
49 The /sys/bus/pci/devices/<BDF>/rpmc_production_enabled file reports
[all …]
H A Ddebugfs-hisi-hpre1 What: /sys/kernel/debug/hisi_hpre/<bdf>/cluster[0-3]/regs
7 What: /sys/kernel/debug/hisi_hpre/<bdf>/cluster[0-3]/cluster_ctrl
14 What: /sys/kernel/debug/hisi_hpre/<bdf>/rdclr_en
23 What: /sys/kernel/debug/hisi_hpre/<bdf>/current_qm
30 What: /sys/kernel/debug/hisi_hpre/<bdf>/alg_qos
33 Description: The <bdf> is related the function for PF and VF.
35 supports to write <bdf> value to alg_qos in the host. Such as
36 "echo <bdf> value > alg_qos". The qos value is 1~1000, means
40 What: /sys/kernel/debug/hisi_hpre/<bdf>/regs
46 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/regs
[all …]
H A Dsysfs-driver-qat1 What: /sys/bus/pci/devices/<BDF>/qat/state
19 What: /sys/bus/pci/devices/<BDF>/qat/cfg_services
46 is in the `down` state (see /sys/bus/pci/devices/<BDF>/qat/state)
52 # cat /sys/bus/pci/devices/<BDF>/qat/state
54 # cat /sys/bus/pci/devices/<BDF>/qat/cfg_services
56 # echo down > /sys/bus/pci/devices/<BDF>/qat/state
57 # echo dc > /sys/bus/pci/devices/<BDF>/qat/cfg_services
58 # echo up > /sys/bus/pci/devices/<BDF>/qat/state
59 # cat /sys/bus/pci/devices/<BDF>/qat/cfg_services
64 What: /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
[all …]
H A Ddebugfs-hisi-sec1 What: /sys/kernel/debug/hisi_sec2/<bdf>/clear_enable
9 What: /sys/kernel/debug/hisi_sec2/<bdf>/current_qm
17 What: /sys/kernel/debug/hisi_sec2/<bdf>/alg_qos
20 Description: The <bdf> is related the function for PF and VF.
22 supports to write <bdf> value to alg_qos in the host. Such as
23 "echo <bdf> value > alg_qos". The qos value is 1~1000, means
27 What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/qm_regs
34 What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/current_q
41 What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/clear_enable
49 What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/err_irq
[all …]
H A Ddebugfs-hisi-zip1 What: /sys/kernel/debug/hisi_zip/<bdf>/comp_core[01]/regs
7 What: /sys/kernel/debug/hisi_zip/<bdf>/decomp_core[0-5]/regs
13 What: /sys/kernel/debug/hisi_zip/<bdf>/clear_enable
22 What: /sys/kernel/debug/hisi_zip/<bdf>/current_qm
29 What: /sys/kernel/debug/hisi_zip/<bdf>/alg_qos
32 Description: The <bdf> is related the function for PF and VF.
34 supports to write <bdf> value to alg_qos in the host. Such as
35 "echo <bdf> value > alg_qos". The qos value is 1~1000, means
39 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/regs
46 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/current_q
[all …]
H A Ddebugfs-driver-qat1 What: /sys/kernel/debug/qat_<device>_<BDF>/qat/fw_counters
12 What: /sys/kernel/debug/qat_<device>_<BDF>/heartbeat/config
32 What: /sys/kernel/debug/qat_<device>_<BDF>/heartbeat/queries_failed
41 What: /sys/kernel/debug/qat_<device>_<BDF>/heartbeat/queries_sent
51 What: /sys/kernel/debug/qat_<device>_<BDF>/heartbeat/status
/openbmc/u-boot/board/imgtec/malta/
H A Dmalta.c168 pci_dev_t bdf; in pci_init_board() local
191 bdf = pci_find_device(PCI_VENDOR_ID_INTEL, in pci_init_board()
193 if (bdf == -1) in pci_init_board()
197 pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCA, 10); in pci_init_board()
198 pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCB, 10); in pci_init_board()
199 pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCC, 11); in pci_init_board()
200 pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCD, 11); in pci_init_board()
203 pci_read_config_dword(bdf, PCI_CFG_PIIX4_GENCFG, &val32); in pci_init_board()
205 pci_write_config_dword(bdf, PCI_CFG_PIIX4_GENCFG, val32); in pci_init_board()
208 pci_read_config_byte(bdf, PCI_CFG_PIIX4_SERIRQC, &val8); in pci_init_board()
[all …]
/openbmc/u-boot/arch/x86/cpu/
H A Dpci.c19 int pci_x86_read_config(struct udevice *bus, pci_dev_t bdf, uint offset, in pci_x86_read_config() argument
22 outl(bdf | (offset & 0xfc) | PCI_CFG_EN, PCI_REG_ADDR); in pci_x86_read_config()
38 int pci_x86_write_config(struct udevice *bus, pci_dev_t bdf, uint offset, in pci_x86_write_config() argument
41 outl(bdf | (offset & 0xfc) | PCI_CFG_EN, PCI_REG_ADDR); in pci_x86_write_config()
59 pci_dev_t bdf; in pci_assign_irqs() local
65 bdf = PCI_BDF(bus, device, func); in pci_assign_irqs()
66 pci_read_config16(bdf, PCI_VENDOR_ID, &vendor); in pci_assign_irqs()
70 pci_read_config8(bdf, PCI_INTERRUPT_PIN, &pin); in pci_assign_irqs()
83 pci_write_config8(bdf, PCI_INTERRUPT_LINE, line); in pci_assign_irqs()
H A Dirq.c161 /* extract the bdf from fdt_pci_addr */ in create_pirq_routing_table()
162 priv->bdf = dm_pci_get_bdf(dev->parent); in create_pirq_routing_table()
258 rt->rtr_bus = PCI_BUS(priv->bdf); in create_pirq_routing_table()
259 rt->rtr_devfn = (PCI_DEV(priv->bdf) << 3) | PCI_FUNC(priv->bdf); in create_pirq_routing_table()
270 pr.bdf = fdt_addr_to_cpu(cell[0]); in create_pirq_routing_table()
275 i, PCI_BUS(pr.bdf), PCI_DEV(pr.bdf), in create_pirq_routing_table()
276 PCI_FUNC(pr.bdf), 'A' + pr.pin - 1, in create_pirq_routing_table()
280 PCI_BUS(pr.bdf), PCI_DEV(pr.bdf)); in create_pirq_routing_table()
283 PCI_BUS(pr.bdf), PCI_DEV(pr.bdf)); in create_pirq_routing_table()
304 fill_irq_info(priv, slot, PCI_BUS(pr.bdf), PCI_DEV(pr.bdf), in create_pirq_routing_table()
/openbmc/u-boot/board/armltd/integrator/
H A Dpci.c88 static unsigned long v3_open_config_window(pci_dev_t bdf, int offset) in v3_open_config_window() argument
91 unsigned int busnr = PCI_BUS(bdf); in v3_open_config_window()
92 unsigned int devfn = PCI_FUNC(bdf); in v3_open_config_window()
109 int slot = PCI_DEV(bdf); in v3_open_config_window()
121 address = PCI_FUNC(bdf) << 8; in v3_open_config_window()
187 static int pci_integrator_read_byte(struct pci_controller *hose, pci_dev_t bdf, in pci_integrator_read_byte() argument
192 addr = v3_open_config_window(bdf, offset); in pci_integrator_read_byte()
199 pci_dev_t bdf, int offset, in pci_integrator_read__word() argument
204 addr = v3_open_config_window(bdf, offset); in pci_integrator_read__word()
211 pci_dev_t bdf, int offset, in pci_integrator_read_dword() argument
[all …]
/openbmc/linux/Documentation/admin-guide/perf/
H A Dhisi-pcie-pmu.rst54 "bdf" interfaces for users, and these two interfaces aren't supported at the
73 - bdf
75 "bdf" filter can only be used in bandwidth events, target Endpoint is
76 selected by configuring BDF to "bdf". Counter only counts the bandwidth of
79 For example, "bdf=0x3900" means BDF of target Endpoint is 0000:39:00.0.
83 $# perf stat -e hisi_pcie0_core0/rx_mrd_flux,bdf=0x3900/ sleep 5
H A Dhns3-pmu.rst35 The "bdf_min" and "bdf_max" files show the supported bdf range of each
106 PMU collect performance statistic of one PF/VF. The function id is BDF of
112 BDF func
120 $# perf stat -a -e hns3_pmu_sicl_0/config=0x1020F,bdf=0x3500,queue=0xFFFF/ -I 1000
124 is BDF of PF/VF, the "queue" filter option must be set to the exact queue
128 $# perf stat -a -e hns3_pmu_sicl_0/config=0x1020F,bdf=0x3500,queue=0/ -I 1000
132 id is BDF of PF/VF, the "intr" filter option must be set to the exact
136 $# perf stat -a -e hns3_pmu_sicl_0/config=0x00301,bdf=0x3500,intr=0/ -I 1000
/openbmc/linux/drivers/perf/hisilicon/
H A Dhns3_pmu.c311 /* maximum and minimum bdf allowed by PMU */
318 #define GET_PCI_DEVFN(bdf) ((bdf) & 0xff) argument
336 HNS3_PMU_FILTER_ATTR(bdf, config1, 8, 23);
490 u16 bdf = hns3_pmu->bdf_min; in bdf_min_show() local
492 return sysfs_emit(buf, "%02x:%02x.%x\n", PCI_BUS_NUM(bdf), in bdf_min_show()
493 PCI_SLOT(bdf), PCI_FUNC(bdf)); in bdf_min_show()
501 u16 bdf = hns3_pmu->bdf_max; in bdf_max_show() local
503 return sysfs_emit(buf, "%02x:%02x.%x\n", PCI_BUS_NUM(bdf), in bdf_max_show()
504 PCI_SLOT(bdf), PCI_FUNC(bdf)); in bdf_max_show()
667 HNS3_PMU_FORMAT_ATTR(bdf, "config1:8-23"),
[all …]
/openbmc/u-boot/arch/x86/lib/
H A Dbios_interrupts.c111 pci_dev_t bdf; in int1a_handler() local
135 bdf = -1; in int1a_handler()
140 bdf = dm_pci_get_bdf(dev); in int1a_handler()
147 busdevfn = (PCI_BUS(bdf) << 8) | PCI_DEV(bdf) << 3 | in int1a_handler()
148 PCI_FUNC(bdf); in int1a_handler()
167 bdf = PCI_BDF(bus, devfn >> 3, devfn & 7); in int1a_handler()
169 ret = dm_pci_bus_find_bdf(bdf, &dev); in int1a_handler()
171 debug("%s: Device %x not found\n", __func__, bdf); in int1a_handler()

12345