Lines Matching refs:sc
89 struct xhci_softc *sc = device_get_softc(self);;
101 sc->sc_io_res = ioremap(res->start, res->count);
102 if (!sc->sc_io_res) {
105 sc->sc_io_tag = (void *)sc->sc_io_res;
106 sc->sc_io_hdl = (uintptr_t)sc->sc_io_res;
107 sc->sc_io_size = res->count;
115 sc->sc_irq_res = res;
116 err = bus_setup_intr(res->start, 0, (driver_intr_t *)xhci_interrupt, sc);
123 if (xhci_init(sc, self, usedma32)) {
127 usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0);
130 sc->sc_bus.bdev = device_add_child(self, "usbus", -1);
131 if (sc->sc_bus.bdev == NULL) {
135 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus);
138 err = xhci_halt_controller(sc);
141 err = xhci_start_controller(sc);
145 err = device_probe_and_attach(sc->sc_bus.bdev);
157 if (sc) {
158 iounmap((void *)sc->sc_io_res);
168 struct xhci_softc *sc = device_get_softc(self);
173 usb_callout_drain(&sc->sc_callout);
174 (void)xhci_halt_controller(sc);
175 (void)xhci_reset_controller(sc);
178 if (sc->sc_irq_res) {
179 (void)bus_teardown_intr(sc->sc_irq_res->start, sc);
180 sc->sc_irq_res = NULL;
182 if (sc->sc_io_res) {
183 iounmap((void *)sc->sc_io_res);
184 sc->sc_io_res = NULL;
185 sc->sc_io_tag = NULL;
186 sc->sc_io_hdl = (uintptr_t)NULL;
187 sc->sc_io_size = 0;
190 xhci_uninit(sc);
198 struct xhci_softc *sc = device_get_softc(self);
205 cparams = XREAD4(sc, capa, XHCI_HCSPARAMS0);
212 eec = XREAD4(sc, capa, eecp);
216 bios_sem = XREAD1(sc, capa, eecp +
220 device_printf(sc->sc_bus.bdev, "waiting for BIOS "
222 XWRITE1(sc, capa, eecp +
226 bios_sem = XREAD1(sc, capa, eecp +
232 device_printf(sc->sc_bus.bdev,