Lines Matching refs:sc
58 struct uhci_softc sc; member
85 struct uhci_pci_softc *sc = (struct uhci_pci_softc *)self; in uhci_pci_activate() local
87 if (sc->sc.sc_size == 0) in uhci_pci_activate()
93 pci_conf_write(sc->sc_pc, sc->sc_tag, in uhci_pci_activate()
95 bus_space_barrier(sc->sc.iot, sc->sc.ioh, 0, sc->sc.sc_size, in uhci_pci_activate()
97 bus_space_write_2(sc->sc.iot, sc->sc.ioh, UHCI_INTR, 0); in uhci_pci_activate()
107 struct uhci_pci_softc *sc = (struct uhci_pci_softc *)self; in uhci_pci_attach() local
114 char *devname = sc->sc.sc_bus.bdev.dv_xname; in uhci_pci_attach()
119 &sc->sc.iot, &sc->sc.ioh, NULL, &sc->sc.sc_size, 0)) { in uhci_pci_attach()
127 bus_space_write_2(sc->sc.iot, sc->sc.ioh, UHCI_INTR, 0); in uhci_pci_attach()
129 sc->sc_pc = pc; in uhci_pci_attach()
130 sc->sc_tag = tag; in uhci_pci_attach()
131 sc->sc.sc_bus.dmatag = pa->pa_dmat; in uhci_pci_attach()
139 sc->sc_ih = pci_intr_establish(pc, ih, IPL_USB, uhci_intr, sc, in uhci_pci_attach()
141 if (sc->sc_ih == NULL) { in uhci_pci_attach()
155 sc->sc.sc_bus.usbrev = USBREV_PRE_1_0; in uhci_pci_attach()
158 sc->sc.sc_bus.usbrev = USBREV_1_0; in uhci_pci_attach()
161 sc->sc.sc_bus.usbrev = USBREV_1_1; in uhci_pci_attach()
164 sc->sc.sc_bus.usbrev = USBREV_UNKNOWN; in uhci_pci_attach()
168 uhci_run(&sc->sc, 0); /* stop the controller */ in uhci_pci_attach()
170 bus_space_barrier(sc->sc.iot, sc->sc.ioh, 0, sc->sc.sc_size, in uhci_pci_attach()
172 bus_space_write_2(sc->sc.iot, sc->sc.ioh, UHCI_INTR, 0); in uhci_pci_attach()
176 sc->sc.sc_id_vendor = PCI_VENDOR(pa->pa_id); in uhci_pci_attach()
178 strlcpy(sc->sc.sc_vendor, vendor, sizeof (sc->sc.sc_vendor)); in uhci_pci_attach()
180 snprintf(sc->sc.sc_vendor, sizeof (sc->sc.sc_vendor), in uhci_pci_attach()
186 sc->sc.sc_bus.dying = 1; in uhci_pci_attach()
193 bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size); in uhci_pci_attach()
194 sc->sc.sc_size = 0; in uhci_pci_attach()
201 struct uhci_pci_softc *sc = (struct uhci_pci_softc *)self; in uhci_pci_attach_deferred() local
202 char *devname = sc->sc.sc_bus.bdev.dv_xname; in uhci_pci_attach_deferred()
208 sc->sc.sc_bus.dying = 0; in uhci_pci_attach_deferred()
209 r = uhci_init(&sc->sc); in uhci_pci_attach_deferred()
217 config_found(self, &sc->sc.sc_bus, usbctlprint); in uhci_pci_attach_deferred()
221 bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size); in uhci_pci_attach_deferred()
222 pci_intr_disestablish(sc->sc_pc, sc->sc_ih); in uhci_pci_attach_deferred()
223 sc->sc.sc_size = 0; in uhci_pci_attach_deferred()
230 struct uhci_pci_softc *sc = (struct uhci_pci_softc *)self; in uhci_pci_detach() local
236 if (sc->sc_ih != NULL) { in uhci_pci_detach()
237 pci_intr_disestablish(sc->sc_pc, sc->sc_ih); in uhci_pci_detach()
238 sc->sc_ih = NULL; in uhci_pci_detach()
240 if (sc->sc.sc_size) { in uhci_pci_detach()
241 bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size); in uhci_pci_detach()
242 sc->sc.sc_size = 0; in uhci_pci_detach()