| /openbsd/src/sys/dev/pci/ |
| D | agp_intel.c | 139 isc->isc_tag = pa->pa_tag; in agp_intel_attach() 169 if (pci_mapreg_info(pa->pa_pc, pa->pa_tag, AGP_APBASE, in agp_intel_attach() 176 value = pci_conf_read(pa->pa_pc, pa->pa_tag, AGP_INTEL_APSIZE); in agp_intel_attach() 177 pci_conf_write(pa->pa_pc, pa->pa_tag, AGP_INTEL_APSIZE, APSIZE_MASK); in agp_intel_attach() 178 isc->aperture_mask = pci_conf_read(pa->pa_pc, pa->pa_tag, in agp_intel_attach() 180 pci_conf_write(pa->pa_pc, pa->pa_tag, AGP_INTEL_APSIZE, value); in agp_intel_attach() 201 pci_conf_write(pa->pa_pc, pa->pa_tag, AGP_INTEL_ATTBASE, in agp_intel_attach() 221 reg = pci_conf_read(pa->pa_pc, pa->pa_tag, AGP_I840_MCHCFG); in agp_intel_attach() 223 pci_conf_write(pa->pa_pc, pa->pa_tag, AGP_I840_MCHCFG, reg); in agp_intel_attach() 227 reg = pci_conf_read(pa->pa_pc, pa->pa_tag, AGP_INTEL_AGPCMD); in agp_intel_attach() [all …]
|
| D | amas.c | 160 amas->pa_tag = pa->pa_tag; in amas_attach() 213 base_reg = pci_conf_read(amas->pa_pc, amas->pa_tag, AMAS_REG_BASE(0)); in amas_intl_nodes() 214 limit_reg = pci_conf_read(amas->pa_pc, amas->pa_tag, AMAS_REG_LIMIT(0)); in amas_intl_nodes() 247 base = pci_conf_read(amas->pa_pc, amas->pa_tag, in amas_get_pagerange() 249 limit = pci_conf_read(amas->pa_pc, amas->pa_tag, in amas_get_pagerange() 260 ebase = pci_conf_read(amas->pa_pc, amas->pa_tag, in amas_get_pagerange() 262 elimit = pci_conf_read(amas->pa_pc, amas->pa_tag, in amas_get_pagerange()
|
| D | qlw_pci.c | 87 subid = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBVEND_0); in qlw_pci_match() 113 psc->psc_tag = pa->pa_tag; in qlw_pci_attach() 148 pcictl = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); in qlw_pci_attach() 151 pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, pcictl); in qlw_pci_attach() 153 pcictl = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_BHLC_REG); in qlw_pci_attach() 158 pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_BHLC_REG, pcictl); in qlw_pci_attach() 160 pcictl = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_ROM_REG); in qlw_pci_attach() 162 pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_ROM_REG, pcictl); in qlw_pci_attach() 263 node = PCITAG_NODE(pa->pa_tag); in qlw_pci_attach()
|
| D | qla_pci.c | 100 psc->psc_tag = pa->pa_tag; in qla_pci_attach() 135 pcictl = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); in qla_pci_attach() 141 pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, pcictl); in qla_pci_attach() 143 pcictl = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_BHLC_REG); in qla_pci_attach() 148 pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_BHLC_REG, pcictl); in qla_pci_attach() 150 pcictl = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_ROM_REG); in qla_pci_attach() 152 pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_ROM_REG, pcictl); in qla_pci_attach() 188 node = PCITAG_NODE(pa->pa_tag); in qla_pci_attach()
|
| D | agp_via.c | 120 vsc->vsc_tag = pa->pa_tag; in agp_via_attach() 121 pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_AGP, NULL, &capval); in agp_via_attach() 123 if (pci_mapreg_info(pa->pa_pc, pa->pa_tag, AGP_APBASE, in agp_via_attach() 130 agpsel = pci_conf_read(pa->pa_pc, pa->pa_tag, in agp_via_attach() 166 pci_conf_write(pa->pa_pc, pa->pa_tag, vsc->regs[REG_ATTBASE], in agp_via_attach() 169 pci_conf_write(pa->pa_pc, pa->pa_tag, vsc->regs[REG_GARTCTRL], in agp_via_attach() 174 pci_conf_write(pa->pa_pc, pa->pa_tag, vsc->regs[REG_ATTBASE], in agp_via_attach() 177 gartctrl = pci_conf_read(pa->pa_pc, pa->pa_tag, in agp_via_attach() 179 pci_conf_write(pa->pa_pc, pa->pa_tag, vsc->regs[REG_GARTCTRL], in agp_via_attach()
|
| D | if_athn_pci.c | 119 psc->sc_tag = pa->pa_tag; in athn_pci_attach() 129 error = pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_PCIEXPRESS, in athn_pci_attach() 139 reg = pci_conf_read(pa->pa_pc, pa->pa_tag, 0x40); in athn_pci_attach() 141 pci_conf_write(pa->pa_pc, pa->pa_tag, 0x40, reg & ~0xff00); in athn_pci_attach() 147 reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_BHLC_REG); in athn_pci_attach() 154 pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_BHLC_REG, reg); in athn_pci_attach() 157 reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG); in athn_pci_attach() 166 memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, PCI_MAPREG_START); in athn_pci_attach()
|
| D | if_re_pci.c | 98 subid = pci_conf_read(pc, pa->pa_tag, PCI_SUBSYS_ID_REG); in re_pci_probe() 130 pci_set_powerstate(pa->pa_pc, pa->pa_tag, PCI_PMCSR_STATE_D0); in re_pci_attach() 134 pci_conf_write(pc, pa->pa_tag, RL_PCI_PMCSR, RL_PME_EN); in re_pci_attach() 178 if (pci_get_capability(pc, pa->pa_tag, PCI_CAP_PCIEXPRESS, in re_pci_attach() 181 reg = pci_conf_read(pc, pa->pa_tag, offset + PCI_PCIE_LCSR); in re_pci_attach() 184 pci_conf_write(pc, pa->pa_tag, offset + PCI_PCIE_LCSR, reg); in re_pci_attach()
|
| D | ahd_pci.c | 331 subid = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG); in ahd_pci_probe() 354 subid = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG); in ahd_pci_attach() 378 devconfig = pci_conf_read(pa->pa_pc, pa->pa_tag, DEVCONFIG); in ahd_pci_attach() 391 if (!pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_PCIX, in ahd_pci_attach() 405 memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, in ahd_pci_attach() 462 pci_set_powerstate(pa->pa_pc, pa->pa_tag, PCI_PMCSR_STATE_D0); in ahd_pci_attach() 481 devconfig = pci_conf_read(pa->pa_pc, pa->pa_tag, DEVCONFIG); in ahd_pci_attach() 483 pci_conf_write(pa->pa_pc, pa->pa_tag, DEVCONFIG, devconfig); in ahd_pci_attach() 519 ahd->pci_cachesize = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_BHLC_REG); in ahd_pci_attach() 568 const pcitag_t tag = ahd->dev_softc->pa_tag; in ahd_pci_test_register_access() [all …]
|
| D | if_mtd_pci.c | 86 command = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); in mtd_pci_attach() 88 pci_conf_read(pa->pa_pc, pa->pa_tag, MTD_PCI_LOIO) & 0x300) { in mtd_pci_attach() 92 pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, command); in mtd_pci_attach() 94 command = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); in mtd_pci_attach()
|
| D | if_dc_pci.c | 171 pci_set_powerstate(pa->pa_pc, pa->pa_tag, PCI_PMCSR_STATE_D0); in dc_pci_attach() 173 sc->dc_csid = pci_conf_read(pc, pa->pa_tag, PCI_SUBSYS_ID_REG); in dc_pci_attach() 256 command = pci_conf_read(pc, pa->pa_tag, DC_PCI_CFLT); in dc_pci_attach() 259 pci_conf_write(pc, pa->pa_tag, DC_PCI_CFLT, command); in dc_pci_attach() 400 sc->dc_cachesize = pci_conf_read(pc, pa->pa_tag, in dc_pci_attach() 408 command = pci_conf_read(pc, pa->pa_tag, DC_PCI_CFDD); in dc_pci_attach() 410 pci_conf_write(pc, pa->pa_tag, DC_PCI_CFDD, command); in dc_pci_attach() 426 if (pci_conf_read(pc, pa->pa_tag, DC_PCI_CSID) != 0x80281033) in dc_pci_attach() 451 if (OF_getprop(PCITAG_NODE(pa->pa_tag), "local-mac-address", in dc_pci_attach() 467 command = pci_conf_read(pc, pa->pa_tag, DC_PCI_CFDD); in dc_pci_attach()
|
| D | rtsx_pci.c | 88 if ((pci_conf_read(pa->pa_pc, pa->pa_tag, RTSX_CFG_PCI) in rtsx_pci_attach() 125 type = pci_mapreg_type(pa->pa_pc, pa->pa_tag, bar); in rtsx_pci_attach() 126 if (pci_mapreg_info(pa->pa_pc, pa->pa_tag, bar, type, NULL, NULL, in rtsx_pci_attach() 136 pci_set_powerstate(pa->pa_pc, pa->pa_tag, PCI_PMCSR_STATE_D0); in rtsx_pci_attach()
|
| D | if_hme_pci.c | 125 epa.pa_tag = pci_make_tag(hpa->pa_pc, hpa->pa_bus, hpa->pa_device, 0); in hme_pci_enaddr() 126 cl = pci_conf_read(epa.pa_pc, epa.pa_tag, PCI_CLASS_REG); in hme_pci_enaddr() 127 id = pci_conf_read(epa.pa_pc, epa.pa_tag, PCI_ID_REG); in hme_pci_enaddr() 212 csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); in hmeattach_pci() 222 pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, in hmeattach_pci() 260 if (OF_getprop(PCITAG_NODE(pa->pa_tag), "local-mac-address", in hmeattach_pci()
|
| D | jmb.c | 106 ctl0 = pci_conf_read(pa->pa_pc, pa->pa_tag, JM_PCI_CTL0); in jmb_attach() 107 ctl5 = pci_conf_read(pa->pa_pc, pa->pa_tag, JM_PCI_CTL5); in jmb_attach() 150 pci_conf_write(pa->pa_pc, pa->pa_tag, JM_PCI_CTL0, ctl0); in jmb_attach() 151 pci_conf_write(pa->pa_pc, pa->pa_tag, JM_PCI_CTL5, ctl5); in jmb_attach()
|
| D | kate.c | 111 c = pci_conf_read(pa->pa_pc, pa->pa_tag, K_CPUID_FAMILY_MODEL_R); in kate_match() 124 sc->sc_pcitag = pa->pa_tag; in kate_match() 142 c = pci_conf_read(pa->pa_pc, pa->pa_tag, K_CPUID_FAMILY_MODEL_R); in kate_attach() 158 d = pci_conf_read(pa->pa_pc, pa->pa_tag, K_NORTHBRIDGE_CAP_R); in kate_attach() 162 sc->sc_pcitag = pa->pa_tag; in kate_attach()
|
| D | if_gem_pci.c | 138 address = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_ROM_REG); in gem_pci_enaddr() 140 pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_ROM_REG, address); in gem_pci_enaddr() 179 address = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_ROM_REG); in gem_pci_enaddr() 181 pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_ROM_REG, address); in gem_pci_enaddr() 250 if (OF_getprop(PCITAG_NODE(pa->pa_tag), "local-mac-address", in gem_attach_pci()
|
| D | adv_pci.c | 130 bhlcr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_BHLC_REG); in adv_pci_attach() 135 pci_conf_write(pa->pa_pc, pa->pa_tag, in adv_pci_attach() 141 pci_conf_write(pa->pa_pc, pa->pa_tag, in adv_pci_attach()
|
| /openbsd/src/sys/arch/sparc64/sparc64/ |
| D | rbus_machdep.c | 48 int node = PCITAG_NODE(pa->pa_tag); in rbus_pccbb_parent_mem() 54 len = OF_getprop(PCITAG_NODE(pa->pa_tag), "assigned-addresses", in rbus_pccbb_parent_mem() 94 int node = PCITAG_NODE(pa->pa_tag); in rbus_pccbb_parent_io() 100 len = OF_getprop(PCITAG_NODE(pa->pa_tag), "assigned-addresses", in rbus_pccbb_parent_io() 139 int node = PCITAG_NODE(pa->pa_tag); in pccbb_attach_hook() 143 bir = pci_conf_read(pc, pa->pa_tag, PCI_BUSNUM); in pccbb_attach_hook() 160 pci_conf_write(pc, pa->pa_tag, PCI_BUSNUM, bir); in pccbb_attach_hook()
|
| /openbsd/src/sys/arch/i386/pci/ |
| D | pchb.c | 205 bdnum = pci_conf_read(pa->pa_pc, pa->pa_tag, 0x44); in pchbattach() 225 bcreg = pci_conf_read(pa->pa_pc, pa->pa_tag, 0x40); in pchbattach() 241 bcreg = pci_conf_read(pa->pa_pc, pa->pa_tag, in pchbattach() 244 pci_conf_write(pa->pa_pc, pa->pa_tag, in pchbattach() 249 bcreg = pci_conf_read(pa->pa_pc, pa->pa_tag, in pchbattach() 266 bcreg = pci_conf_read(pa->pa_pc, pa->pa_tag, in pchbattach() 270 pci_conf_write(pa->pa_pc, pa->pa_tag, in pchbattach() 369 pa->pa_tag, PPB_REG_BUSINFO); in pchbattach() 392 if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_AGP, in pchbattach() 488 type = pci_conf_read(pa->pa_pc, pa->pa_tag, reg); in pchb_amd64ht_attach() [all …]
|
| /openbsd/src/sys/arch/hppa/dev/ |
| D | ssio.c | 147 bhlc = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_BHLC_REG); in ssio_match() 159 pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_CLASS_REG, in ssio_match() 220 reg = pci_conf_read(pa->pa_pc, pa->pa_tag, SSIO_PCI_DMA_RC2); in ssio_attach() 223 pci_conf_write(pa->pa_pc, pa->pa_tag, SSIO_PCI_DMA_RC2, reg); in ssio_attach() 229 pci_conf_write(pa->pa_pc, pa->pa_tag, SSIO_PCI_INT_TC2, reg); in ssio_attach() 233 pci_conf_write(pa->pa_pc, pa->pa_tag, SSIO_PCI_INT_RC4, reg); in ssio_attach() 257 saa.saa_iobase = pci_conf_read(pa->pa_pc, pa->pa_tag, SSIO_PCI_SP1BAR); in ssio_attach() 265 saa.saa_iobase = pci_conf_read(pa->pa_pc, pa->pa_tag, SSIO_PCI_SP2BAR); in ssio_attach() 273 saa.saa_iobase = pci_conf_read(pa->pa_pc, pa->pa_tag, SSIO_PCI_PPBAR); in ssio_attach()
|
| /openbsd/src/sys/arch/arm64/dev/ |
| D | pci_machdep.c | 31 pcitag_t tag = pa->pa_tag; in pci_intr_enable_msivec() 152 pcitag_t tag = pa->pa_tag; in _pci_intr_map_msi() 159 ihp->ih_tag = pa->pa_tag; in _pci_intr_map_msi() 172 pcitag_t tag = pa->pa_tag; in _pci_intr_map_msivec() 185 ihp->ih_tag = pa->pa_tag; in _pci_intr_map_msivec() 198 pcitag_t tag = pa->pa_tag; in _pci_intr_map_msix() 216 ihp->ih_tag = pa->pa_tag; in _pci_intr_map_msix()
|
| /openbsd/src/sys/arch/macppc/pci/ |
| D | kauaiata.c | 147 pci_conf_read(pc, pa->pa_tag, PCI_MAPREG_START); in kauaiataattach() 164 pci_conf_write(pc, pa->pa_tag, PCI_MAPREG_START, 0xffffffff); in kauaiataattach() 165 size = ~(pci_conf_read(pc, pa->pa_tag, PCI_MAPREG_START)); in kauaiataattach() 166 pci_conf_write(pc, pa->pa_tag, PCI_MAPREG_START, in kauaiataattach()
|
| /openbsd/src/sys/dev/pci/drm/radeon/ |
| D | radeon_drv.c | 977 rdev->pa_tag = pa->pa_tag; in radeondrm_attach_kms() 983 if (fbnode == PCITAG_NODE(rdev->pa_tag)) in radeondrm_attach_kms() 988 (pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG) in radeondrm_attach_kms() 1009 type = pci_mapreg_type(pa->pa_pc, pa->pa_tag, RADEON_PCI_MEM); in radeondrm_attach_kms() 1011 pci_mapreg_info(pa->pa_pc, pa->pa_tag, RADEON_PCI_MEM, in radeondrm_attach_kms() 1029 pci_conf_write(pa->pa_pc, pa->pa_tag, RADEON_PCI_MEM, base); in radeondrm_attach_kms() 1031 pci_conf_write(pa->pa_pc, pa->pa_tag, in radeondrm_attach_kms() 1037 type = pci_mapreg_type(pa->pa_pc, pa->pa_tag, i); in radeondrm_attach_kms() 1048 type = pci_mapreg_type(pa->pa_pc, pa->pa_tag, 0x18); in radeondrm_attach_kms() 1065 type = pci_mapreg_type(pa->pa_pc, pa->pa_tag, rmmio_bar); in radeondrm_attach_kms() [all …]
|
| /openbsd/src/sys/dev/pci/drm/i915/gt/ |
| D | agp_intel_gtt.c | 55 reg = pci_conf_read(bpa->pa_pc, bpa->pa_tag, I915_IFPADDR); in i915_alloc_ifp() 71 pci_conf_write(bpa->pa_pc, bpa->pa_tag, I915_IFPADDR, addr | 0x1); in i915_alloc_ifp() 88 hi = pci_conf_read(bpa->pa_pc, bpa->pa_tag, I965_IFPADDR + 4); in i965_alloc_ifp() 89 lo = pci_conf_read(bpa->pa_pc, bpa->pa_tag, I965_IFPADDR); in i965_alloc_ifp() 105 pci_conf_write(bpa->pa_pc, bpa->pa_tag, I965_IFPADDR + 4, in i965_alloc_ifp() 107 pci_conf_write(bpa->pa_pc, bpa->pa_tag, I965_IFPADDR, in i965_alloc_ifp()
|
| /openbsd/src/sys/arch/amd64/pci/ |
| D | aapic.c | 71 reg = pci_conf_read(pa->pa_pc, pa->pa_tag, AMD8131_IOAPIC_CTL); in aapic_attach() 73 pci_conf_write(pa->pa_pc, pa->pa_tag, AMD8131_IOAPIC_CTL, reg); in aapic_attach() 75 pci_decompose_tag(pa->pa_pc, pa->pa_tag, &bus, &dev, &func); in aapic_attach()
|
| /openbsd/src/sys/arch/sparc64/dev/ |
| D | pci_machdep.c | 381 pcitag_t tag = pa->pa_tag; in pci_intr_map() 405 if (PCITAG_FUN(pa->pa_tag) < ninterrupts) in pci_intr_map() 406 interrupts[0] = interrupts[PCITAG_FUN(pa->pa_tag)]; in pci_intr_map() 439 pcitag_t tag = pa->pa_tag; in pci_intr_map_msi() 445 *ihp = PCITAG_OFFSET(pa->pa_tag) | PCI_INTR_MSI; in pci_intr_map_msi() 453 pcitag_t tag = pa->pa_tag; in pci_intr_map_msix() 466 KASSERT(!ISSET(pa->pa_tag, PCI_INTR_TYPE_MASK)); in pci_intr_map_msix() 467 KASSERT(!ISSET(pa->pa_tag, PCI_INTR_VEC_MASK)); in pci_intr_map_msix() 469 *ihp = PCI_INTR_MSIX | PCITAG_OFFSET(pa->pa_tag) | vec; in pci_intr_map_msix()
|