• Home
  • Raw
  • Download

Lines Matching refs:sc

90 	struct xhci_softc *sc = device_get_softc(self);;  in xhci_pci_attach()  local
102 sc->sc_io_res = ioremap(res->start, res->count); in xhci_pci_attach()
103 if (!sc->sc_io_res) { in xhci_pci_attach()
106 sc->sc_io_tag = (void *)sc->sc_io_res; in xhci_pci_attach()
107 sc->sc_io_hdl = (uintptr_t)sc->sc_io_res; in xhci_pci_attach()
108 sc->sc_io_size = res->count; in xhci_pci_attach()
116 sc->sc_irq_res = res; in xhci_pci_attach()
117 err = bus_setup_intr(res->start, 0, (driver_intr_t *)xhci_interrupt, sc); in xhci_pci_attach()
124 if (xhci_init(sc, self, usedma32)) { in xhci_pci_attach()
128 callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); in xhci_pci_attach()
131 sc->sc_bus.bdev = device_add_child(self, "usbus", -1); in xhci_pci_attach()
132 if (sc->sc_bus.bdev == NULL) { in xhci_pci_attach()
136 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); in xhci_pci_attach()
139 err = xhci_halt_controller(sc); in xhci_pci_attach()
142 err = xhci_start_controller(sc); in xhci_pci_attach()
146 err = device_probe_and_attach(sc->sc_bus.bdev); in xhci_pci_attach()
158 if (sc) { in xhci_pci_attach()
159 iounmap((void *)sc->sc_io_res); in xhci_pci_attach()
169 struct xhci_softc *sc = device_get_softc(self); in xhci_pci_detach() local
174 callout_drain(&sc->sc_callout); in xhci_pci_detach()
175 (void)xhci_halt_controller(sc); in xhci_pci_detach()
176 (void)xhci_reset_controller(sc); in xhci_pci_detach()
179 if (sc->sc_irq_res) { in xhci_pci_detach()
180 (void)bus_teardown_intr(sc->sc_irq_res->start, sc); in xhci_pci_detach()
181 sc->sc_irq_res = NULL; in xhci_pci_detach()
183 if (sc->sc_io_res) { in xhci_pci_detach()
184 iounmap((void *)sc->sc_io_res); in xhci_pci_detach()
185 sc->sc_io_res = NULL; in xhci_pci_detach()
186 sc->sc_io_tag = NULL; in xhci_pci_detach()
187 sc->sc_io_hdl = (uintptr_t)NULL; in xhci_pci_detach()
188 sc->sc_io_size = 0; in xhci_pci_detach()
191 xhci_uninit(sc); in xhci_pci_detach()
199 struct xhci_softc *sc = device_get_softc(self); in xhci_pci_take_controller() local
206 cparams = XREAD4(sc, capa, XHCI_HCSPARAMS0); in xhci_pci_take_controller()
213 eec = XREAD4(sc, capa, eecp); in xhci_pci_take_controller()
217 bios_sem = XREAD1(sc, capa, eecp + in xhci_pci_take_controller()
221 device_printf(sc->sc_bus.bdev, "waiting for BIOS " in xhci_pci_take_controller()
223 XWRITE1(sc, capa, eecp + in xhci_pci_take_controller()
227 bios_sem = XREAD1(sc, capa, eecp + in xhci_pci_take_controller()
233 device_printf(sc->sc_bus.bdev, in xhci_pci_take_controller()