| /OK3568_Linux_fs/u-boot/board/imgtec/malta/ |
| H A D | malta.c | 169 pci_dev_t bdf; in pci_init_board() local 192 bdf = pci_find_device(PCI_VENDOR_ID_INTEL, in pci_init_board() 194 if (bdf == -1) in pci_init_board() 198 pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCA, 10); in pci_init_board() 199 pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCB, 10); in pci_init_board() 200 pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCC, 11); in pci_init_board() 201 pci_write_config_byte(bdf, PCI_CFG_PIIX4_PIRQRCD, 11); in pci_init_board() 204 pci_read_config_dword(bdf, PCI_CFG_PIIX4_GENCFG, &val32); in pci_init_board() 206 pci_write_config_dword(bdf, PCI_CFG_PIIX4_GENCFG, val32); in pci_init_board() 209 pci_read_config_byte(bdf, PCI_CFG_PIIX4_SERIRQC, &val8); in pci_init_board() [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/pci/ |
| H A D | pci_common.c | 288 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() 298 pci_read_config_byte(bdf, PCI_HEADER_TYPE, in pci_hose_find_devices() 306 pci_read_config_word(bdf, PCI_VENDOR_ID, &vendor); in pci_hose_find_devices() 307 pci_read_config_word(bdf, PCI_DEVICE_ID, &device); in pci_hose_find_devices() 313 return bdf; in pci_hose_find_devices() [all …]
|
| H A D | pci-uclass.c | 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() [all …]
|
| H A D | pci_gt64120.c | 45 unsigned char access_type, pci_dev_t bdf, in gt_config_access() argument 48 unsigned int bus = PCI_BUS(bdf); in gt_config_access() 49 unsigned int dev = PCI_DEV(bdf); in gt_config_access() 50 unsigned int devfn = PCI_DEV(bdf) << 3 | PCI_FUNC(bdf); in gt_config_access() 62 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf), where, *data); in gt_config_access() 111 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf), where, *data); in gt_config_access()
|
| H A D | pcie_xilinx.c | 60 static int pcie_xilinx_config_address(struct xilinx_pcie *pcie, 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(struct udevice *bus, pci_dev_t bdf, in pcie_xilinx_read_config() argument 110 err = pcie_xilinx_config_address(pcie, bdf, offset, &address); in pcie_xilinx_read_config() 145 static int pcie_xilinx_write_config(struct udevice *bus, pci_dev_t bdf, in pcie_xilinx_write_config() argument 153 err = pcie_xilinx_config_address(pcie, bdf, offset, &address); in pcie_xilinx_write_config()
|
| H A D | pcie_dw_mvebu.c | 209 static int pcie_dw_mvebu_read_config(struct udevice *bus, pci_dev_t bdf, in pcie_dw_mvebu_read_config() argument 218 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in pcie_dw_mvebu_read_config() 220 if (!pcie_dw_addr_valid(bdf, pcie->first_busno)) { in pcie_dw_mvebu_read_config() 226 va_address = set_cfg_address(pcie, bdf, offset); in pcie_dw_mvebu_read_config() 251 static int pcie_dw_mvebu_write_config(struct udevice *bus, pci_dev_t bdf, in pcie_dw_mvebu_write_config() argument 260 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in pcie_dw_mvebu_write_config() 263 if (!pcie_dw_addr_valid(bdf, pcie->first_busno)) { in pcie_dw_mvebu_write_config() 268 va_address = set_cfg_address(pcie, bdf, offset); in pcie_dw_mvebu_write_config()
|
| H A D | pcie_layerscape.c | 225 static int ls_pcie_addr_valid(struct ls_pcie *pcie, pci_dev_t bdf) in ls_pcie_addr_valid() argument 232 if (PCI_BUS(bdf) < bus->seq) in ls_pcie_addr_valid() 235 if ((PCI_BUS(bdf) > bus->seq) && (!ls_pcie_link_up(pcie))) in ls_pcie_addr_valid() 238 if (PCI_BUS(bdf) <= (bus->seq + 1) && (PCI_DEV(bdf) > 0)) in ls_pcie_addr_valid() 244 void *ls_pcie_conf_address(struct ls_pcie *pcie, pci_dev_t bdf, in ls_pcie_conf_address() argument 250 if (PCI_BUS(bdf) == bus->seq) in ls_pcie_conf_address() 253 busdev = PCIE_ATU_BUS(PCI_BUS(bdf)) | in ls_pcie_conf_address() 254 PCIE_ATU_DEV(PCI_DEV(bdf)) | in ls_pcie_conf_address() 255 PCIE_ATU_FUNC(PCI_FUNC(bdf)); in ls_pcie_conf_address() 257 if (PCI_BUS(bdf) == bus->seq + 1) { in ls_pcie_conf_address() [all …]
|
| H A D | pci_msc01.c | 29 unsigned char access_type, pci_dev_t bdf, in msc01_config_access() argument 35 unsigned int bus = PCI_BUS(bdf); in msc01_config_access() 36 unsigned int dev = PCI_DEV(bdf); in msc01_config_access() 37 unsigned int devfn = PCI_DEV(bdf) << 3 | PCI_FUNC(bdf); in msc01_config_access()
|
| H A D | pcie_layerscape_fixup.c | 176 pci_dev_t bdf; in fdt_fixup_pcie() local 199 bdf = dm_pci_get_bdf(dev) - PCI_BDF(bus->seq, 0, 0); in fdt_fixup_pcie() 201 ls_pcie_lut_set_mapping(pcie, index, bdf >> 8, in fdt_fixup_pcie() 204 fdt_pcie_set_msi_map_entry(blob, pcie, bdf >> 8, in fdt_fixup_pcie() 207 fdt_pcie_set_iommu_map_entry(blob, pcie, bdf >> 8, in fdt_fixup_pcie()
|
| H A D | pci_tegra.c | 280 static unsigned long tegra_pcie_conf_offset(pci_dev_t bdf, int where) in tegra_pcie_conf_offset() argument 282 return ((where & 0xf00) << 16) | (PCI_BUS(bdf) << 16) | in tegra_pcie_conf_offset() 283 (PCI_DEV(bdf) << 11) | (PCI_FUNC(bdf) << 8) | in tegra_pcie_conf_offset() 287 static int tegra_pcie_conf_address(struct tegra_pcie *pcie, pci_dev_t bdf, in tegra_pcie_conf_address() argument 290 unsigned int bus = PCI_BUS(bdf); in tegra_pcie_conf_address() 293 unsigned int dev = PCI_DEV(bdf); in tegra_pcie_conf_address() 305 unsigned int dev = PCI_DEV(bdf); in tegra_pcie_conf_address() 310 *address = pcie->cs.start + tegra_pcie_conf_offset(bdf, where); in tegra_pcie_conf_address() 315 static int pci_tegra_read_config(struct udevice *bus, pci_dev_t bdf, in pci_tegra_read_config() argument 323 err = tegra_pcie_conf_address(pcie, bdf, offset, &address); in pci_tegra_read_config() [all …]
|
| H A D | pcie_dw_rockchip.c | 428 static int rockchip_pcie_rd_conf(struct udevice *bus, pci_dev_t bdf, in rockchip_pcie_rd_conf() argument 437 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in rockchip_pcie_rd_conf() 439 if (!rk_pcie_addr_valid(bdf, pcie->first_busno)) { in rockchip_pcie_rd_conf() 445 va_address = set_cfg_address(pcie, bdf, offset); in rockchip_pcie_rd_conf() 459 static int rockchip_pcie_wr_conf(struct udevice *bus, pci_dev_t bdf, in rockchip_pcie_wr_conf() argument 468 PCI_BUS(bdf), PCI_DEV(bdf), PCI_FUNC(bdf)); in rockchip_pcie_wr_conf() 471 if (!rk_pcie_addr_valid(bdf, pcie->first_busno)) { in rockchip_pcie_wr_conf() 476 va_address = set_cfg_address(pcie, bdf, offset); in rockchip_pcie_wr_conf()
|
| /OK3568_Linux_fs/u-boot/arch/x86/cpu/ |
| H A D | pci.c | 22 int pci_x86_read_config(struct udevice *bus, pci_dev_t bdf, uint offset, in pci_x86_read_config() argument 25 outl(bdf | (offset & 0xfc) | PCI_CFG_EN, PCI_REG_ADDR); in pci_x86_read_config() 41 int pci_x86_write_config(struct udevice *bus, pci_dev_t bdf, uint offset, in pci_x86_write_config() argument 44 outl(bdf | (offset & 0xfc) | PCI_CFG_EN, PCI_REG_ADDR); in pci_x86_write_config() 62 pci_dev_t bdf; in pci_assign_irqs() local 68 bdf = PCI_BDF(bus, device, func); in pci_assign_irqs() 69 pci_read_config16(bdf, PCI_VENDOR_ID, &vendor); in pci_assign_irqs() 73 pci_read_config8(bdf, PCI_INTERRUPT_PIN, &pin); in pci_assign_irqs() 86 pci_write_config8(bdf, PCI_INTERRUPT_LINE, line); in pci_assign_irqs()
|
| H A D | irq.c | 102 priv->bdf = dm_pci_get_bdf(dev->parent); in create_pirq_routing_table() 165 rt->rtr_bus = PCI_BUS(priv->bdf); in create_pirq_routing_table() 166 rt->rtr_devfn = (PCI_DEV(priv->bdf) << 3) | PCI_FUNC(priv->bdf); in create_pirq_routing_table() 177 pr.bdf = fdt_addr_to_cpu(cell[0]); in create_pirq_routing_table() 182 i, PCI_BUS(pr.bdf), PCI_DEV(pr.bdf), in create_pirq_routing_table() 183 PCI_FUNC(pr.bdf), 'A' + pr.pin - 1, in create_pirq_routing_table() 187 PCI_BUS(pr.bdf), PCI_DEV(pr.bdf)); in create_pirq_routing_table() 190 PCI_BUS(pr.bdf), PCI_DEV(pr.bdf)); in create_pirq_routing_table() 211 fill_irq_info(priv, slot, PCI_BUS(pr.bdf), PCI_DEV(pr.bdf), in create_pirq_routing_table()
|
| /OK3568_Linux_fs/u-boot/board/armltd/integrator/ |
| H A D | pci.c | 89 static unsigned long v3_open_config_window(pci_dev_t bdf, int offset) in v3_open_config_window() argument 92 unsigned int busnr = PCI_BUS(bdf); in v3_open_config_window() 93 unsigned int devfn = PCI_FUNC(bdf); in v3_open_config_window() 110 int slot = PCI_DEV(bdf); in v3_open_config_window() 122 address = PCI_FUNC(bdf) << 8; in v3_open_config_window() 188 static int pci_integrator_read_byte(struct pci_controller *hose, pci_dev_t bdf, in pci_integrator_read_byte() argument 193 addr = v3_open_config_window(bdf, offset); in pci_integrator_read_byte() 200 pci_dev_t bdf, int offset, in pci_integrator_read__word() argument 205 addr = v3_open_config_window(bdf, offset); in pci_integrator_read__word() 212 pci_dev_t bdf, int offset, in pci_integrator_read_dword() argument [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/ABI/testing/ |
| H A D | debugfs-hisi-hpre | 1 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>/regs 36 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/regs 43 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/current_q 50 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/clear_enable 59 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/err_irq 66 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/aeq_irq [all …]
|
| H A D | debugfs-hisi-zip | 1 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>/qm/regs 36 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/current_q 43 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/clear_enable 52 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/err_irq 59 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/aeq_irq 65 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/abnormal_irq [all …]
|
| H A D | debugfs-hisi-sec | 1 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>/qm/qm_regs 24 What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/current_q 31 What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/clear_enable 39 What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/err_irq 46 What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/aeq_irq 52 What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/abnormal_irq 58 What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/create_qp_err 64 What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/mb_err [all …]
|
| /OK3568_Linux_fs/u-boot/arch/x86/lib/ |
| H A D | bios_interrupts.c | 112 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()
|
| /OK3568_Linux_fs/u-boot/drivers/bios_emulator/ |
| H A D | atibios.c | 240 pci_dev_t bdf; in PCI_doBIOSPOST() local 250 bdf = dm_pci_get_bdf(pcidev); in PCI_doBIOSPOST() 251 regs.x.ax = (int)PCI_BUS(bdf) << 8 | in PCI_doBIOSPOST() 252 (int)PCI_DEV(bdf) << 3 | (int)PCI_FUNC(bdf); in PCI_doBIOSPOST() 490 pci_dev_t bdf; in PCI_postController() local 520 bdf = dm_pci_get_bdf(pcidev); in PCI_postController() 521 vga_info->function = PCI_FUNC(bdf); in PCI_postController() 522 vga_info->device = PCI_DEV(bdf); in PCI_postController() 523 vga_info->bus = PCI_BUS(bdf); in PCI_postController() 554 pci_dev_t bdf = dm_pci_get_bdf(pcidev); in biosemu_setup() local [all …]
|
| /OK3568_Linux_fs/u-boot/board/theadorable/ |
| H A D | theadorable.c | 241 pci_dev_t bdf; in board_late_init() local 250 bdf = pci_find_device(PCI_VENDOR_ID_PLX, 0x8619, 0); in board_late_init() 251 if (bdf == -1) { in board_late_init() 301 pci_dev_t bdf; in do_pcie_test() local 317 bdf = pci_find_device(ven_id, dev_id, 0); in do_pcie_test() 318 if (bdf == -1) { in do_pcie_test()
|
| /OK3568_Linux_fs/kernel/drivers/crypto/qat/qat_common/ |
| H A D | adf_dev_mgr.c | 15 u32 bdf; member 34 static struct vf_id_map *adf_find_vf(u32 bdf) in adf_find_vf() argument 42 if (ptr->bdf == bdf) in adf_find_vf() 76 if (map->bdf != -1) { in adf_clean_vf_map() 81 if (vf && map->bdf == -1) in adf_clean_vf_map() 180 map->bdf = ~0; in adf_devmgr_add_dev() 220 map->bdf = adf_get_vf_num(accel_dev); in adf_devmgr_add_dev() 359 if (ptr->bdf != ~0 && !ptr->attached) in adf_get_num_dettached_vfs()
|
| /OK3568_Linux_fs/u-boot/arch/x86/include/asm/ |
| H A D | pci.h | 21 int pci_x86_read_config(struct udevice *bus, pci_dev_t bdf, uint offset, 24 int pci_x86_write_config(struct udevice *bus, pci_dev_t bdf, uint offset,
|
| H A D | irq.h | 44 u32 bdf; member 51 int bdf; member
|
| /OK3568_Linux_fs/u-boot/arch/x86/cpu/broadwell/ |
| H A D | pch.c | 39 pci_dev_t bdf; in broadwell_pch_early_init() local 74 bdf = PCI_BDF(0, 0x1c, 0); in broadwell_pch_early_init() 76 pci_bus_clrset_config32(bus, bdf, 0xf4, 0x60, 0); in broadwell_pch_early_init() 77 pci_bus_clrset_config32(bus, bdf, 0xf4, 0x80, 0x80); in broadwell_pch_early_init() 78 pci_bus_clrset_config32(bus, bdf, 0xe2, 0x30, 0x30); in broadwell_pch_early_init()
|
| /OK3568_Linux_fs/u-boot/include/ |
| H A D | pci.h | 502 #define PCI_MASK_BUS(bdf) ((bdf) & 0xffff) argument 852 int (*read_config)(struct udevice *bus, pci_dev_t bdf, uint offset, 864 int (*write_config)(struct udevice *bus, pci_dev_t bdf, uint offset, 918 int dm_pci_bus_find_bdf(pci_dev_t bdf, struct udevice **devp); 1020 int pci_bus_read_config(struct udevice *bus, pci_dev_t bdf, int offset, 1033 int pci_bus_write_config(struct udevice *bus, pci_dev_t bdf, int offset, 1048 int pci_bus_clrset_config32(struct udevice *bus, pci_dev_t bdf, int offset,
|