Lines Matching refs:phys_dev
75 read_config(struct pci_device *phys_dev, long reg, int width) in read_config() argument
81 pci_device_cfg_read_u8(phys_dev, (uint8_t *)&temp, reg); in read_config()
84 pci_device_cfg_read_u16(phys_dev, (uint16_t *)&temp, reg); in read_config()
87 pci_device_cfg_read_u32(phys_dev, &temp, reg); in read_config()
98 write_config(struct pci_device *phys_dev, long reg, int width, uint32_t data) in write_config() argument
104 temp = pci_device_cfg_write_u8(phys_dev, data, reg); in write_config()
107 temp = pci_device_cfg_write_u16(phys_dev, data, reg); in write_config()
110 temp = pci_device_cfg_write_u32(phys_dev, data, reg); in write_config()
123 struct pci_device *phys_dev = ptdev->phys_dev; in cfginit_cap() local
129 sts = read_config(phys_dev, PCIR_STATUS, 2); in cfginit_cap()
131 ptr = read_config(phys_dev, PCIR_CAP_PTR, 1); in cfginit_cap()
133 cap = read_config(phys_dev, ptr + PCICAP_ID, 1); in cfginit_cap()
143 ptr = read_config(phys_dev, ptr + PCICAP_NEXTPTR, 1); in cfginit_cap()
157 val = read_config(ptdev->phys_dev, in passthru_set_power_state()
161 write_config(ptdev->phys_dev, in passthru_set_power_state()
306 bar.base = read_config(ptdev->phys_dev, bar.reg, 4); in cfginitbar()
307 bar.length = ptdev->phys_dev->regions[i].size; in cfginitbar()
626 opregion_phys = read_config(ptdev->phys_dev, PCIR_ASLS_CTL, 4); in passthru_gpu_dsm_opregion()
636 gpu_dsm_size = igd_dsm_region_size(ptdev->phys_dev); in passthru_gpu_dsm_opregion()
646 gpu_dsm_hpa = read_config(ptdev->phys_dev, PCIR_GEN11_BDSM_DW0, 4); in passthru_gpu_dsm_opregion()
649 gpu_dsm_hpa |= (uint64_t)read_config(ptdev->phys_dev, PCIR_GEN11_BDSM_DW1, 4) << 32; in passthru_gpu_dsm_opregion()
663 gpu_dsm_hpa = read_config(ptdev->phys_dev, PCIR_BDSM, 4); in passthru_gpu_dsm_opregion()
720 struct pci_device *phys_dev; in passthru_init() local
818 while ((phys_dev = pci_device_next(iter)) != NULL) { in passthru_init()
819 if (phys_dev->bus == bus && phys_dev->dev == slot && in passthru_init()
820 phys_dev->func == func) { in passthru_init()
821 ptdev->phys_dev = phys_dev; in passthru_init()
833 pci_device_probe(ptdev->phys_dev); in passthru_init()
843 read_config(ptdev->phys_dev, PCIR_MINGNT, 2)); in passthru_init()
849 vendor = read_config(ptdev->phys_dev, PCIR_VENDOR, 2); in passthru_init()
850 device = read_config(ptdev->phys_dev, PCIR_DEVICE, 2); in passthru_init()
851 class = read_config(ptdev->phys_dev, PCIR_CLASS, 1); in passthru_init()
923 ptdev->phys_pin = read_config(ptdev->phys_dev, PCIR_INTLINE, 1); in passthru_init()
1070 *rv = read_config(ptdev->phys_dev, coff, bytes); in passthru_cfgread()
1105 write_config(ptdev->phys_dev, coff, bytes, val); in passthru_cfgwrite()