Lines Matching refs:psc
129 struct athn_pci_softc *psc = device_private(self);
130 struct athn_softc *sc = &psc->psc_sc;
141 psc->psc_pc = pa->pa_pc;
142 psc->psc_tag = pa->pa_tag;
153 &psc->psc_cap_off, NULL);
192 error = pci_mapreg_map(pa, ATHN_PCI_MMBA, memtype, 0, &psc->psc_iot,
193 &psc->psc_ioh, NULL, &psc->psc_mapsz);
202 if (pci_intr_map(pa, &psc->psc_pih) != 0) {
207 intrstr = pci_intr_string(psc->psc_pc, psc->psc_pih, intrbuf, sizeof(intrbuf));
208 psc->psc_ih = pci_intr_establish_xname(psc->psc_pc, psc->psc_pih,
210 if (psc->psc_ih == NULL) {
232 pci_intr_disestablish(psc->psc_pc, psc->psc_ih);
233 psc->psc_ih = NULL;
235 bus_space_unmap(psc->psc_iot, psc->psc_ioh, psc->psc_mapsz);
236 psc->psc_mapsz = 0;
244 struct athn_pci_softc *psc = device_private(self);
245 struct athn_softc *sc = &psc->psc_sc;
247 if (psc->psc_ih != NULL) {
249 pci_intr_disestablish(psc->psc_pc, psc->psc_ih);
250 psc->psc_ih = NULL;
252 if (psc->psc_mapsz > 0) {
253 bus_space_unmap(psc->psc_iot, psc->psc_ioh, psc->psc_mapsz);
254 psc->psc_mapsz = 0;
262 struct athn_pci_softc *psc = device_private(self);
263 struct athn_softc *sc = &psc->psc_sc;
276 struct athn_pci_softc *psc = device_private(self);
277 struct athn_softc *sc = &psc->psc_sc;
280 if (psc->psc_ih != NULL) {
281 pci_intr_disestablish(psc->psc_pc, psc->psc_ih);
282 psc->psc_ih = NULL;
290 struct athn_pci_softc *psc = device_private(self);
291 struct athn_softc *sc = &psc->psc_sc;
297 reg = pci_conf_read(psc->psc_pc, psc->psc_tag, 0x40);
299 pci_conf_write(psc->psc_pc, psc->psc_tag, 0x40, reg & ~0xff00);
302 psc->psc_ih = pci_intr_establish_xname(psc->psc_pc, psc->psc_pih,
304 if (psc->psc_ih == NULL) {
314 struct athn_pci_softc *psc = (struct athn_pci_softc *)sc;
316 return bus_space_read_4(psc->psc_iot, psc->psc_ioh, addr);
322 struct athn_pci_softc *psc = (struct athn_pci_softc *)sc;
324 bus_space_write_4(psc->psc_iot, psc->psc_ioh, addr, val);
330 struct athn_pci_softc *psc = (struct athn_pci_softc *)sc;
332 bus_space_barrier(psc->psc_iot, psc->psc_ioh, 0, psc->psc_mapsz,
339 struct athn_pci_softc *psc = (struct athn_pci_softc *)sc;
343 reg = pci_conf_read(psc->psc_pc, psc->psc_tag,
344 psc->psc_cap_off + PCIE_LCSR);
346 pci_conf_write(psc->psc_pc, psc->psc_tag,
347 psc->psc_cap_off + PCIE_LCSR, reg);