Lines Matching refs:sc

58 hiehci_post_reset(struct ehci_softc *sc)
63 usb_mode = EOREAD4(sc, EHCI_USBMODE_NOLPM);
66 EOWRITE4(sc, EHCI_USBMODE_NOLPM, usb_mode);
92 ehci_softc_t *sc = device_get_softc(self);
96 sc->sc_bus.parent = self;
97 sc->sc_bus.devices = sc->sc_devices;
98 sc->sc_bus.devices_max = EHCI_MAX_DEVICES;
99 sc->sc_bus.dma_bits = 32;
100 sc->sc_bus.dma_parent_tag[0].dma_bits = 32;
103 if (usb_bus_mem_alloc_all(&sc->sc_bus,
114 sc->sc_io_res = ioremap(res->start, res->count);
115 if (!sc->sc_io_res) {
119 sc->sc_io_tag = (void *)sc->sc_io_res;
120 sc->sc_io_hdl = (bus_space_handle_t)sc->sc_io_res;
121 sc->sc_io_size = res->count;
123 sc->sc_flags |= EHCI_SCFLG_DONTRESET;
126 sc->sc_vendor_post_reset = hiehci_post_reset;
127 sc->sc_vendor_get_port_speed = ehci_get_port_speed_portsc;
129 sc->sc_bus.bdev = device_add_child(self, "usbus", -1);
130 if (!sc->sc_bus.bdev) {
134 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus);
140 device_set_desc(sc->sc_bus.bdev, ehci_pci_match(self));
146 sc->sc_irq_res = res;
147 err = bus_setup_intr(res->start, 0, ehci_interrupt, sc);
157 err = ehci_init(sc);
159 err = device_probe_and_attach(sc->sc_bus.bdev);
173 if (sc->sc_io_res != NULL) {
174 iounmap((void *)sc->sc_io_res);
175 sc->sc_io_res = NULL;
178 (void)bus_teardown_intr(NUM_HAL_INTERRUPT_USB_EHCI, sc);
180 usb_bus_mem_free_all(&sc->sc_bus, &ehci_iterate_hw_softc);
188 ehci_softc_t *sc = device_get_softc(self);
193 ehci_detach(sc);
196 if (sc->sc_irq_res != NULL) {
197 (void)bus_teardown_intr(sc->sc_irq_res->start, sc);
198 sc->sc_irq_res = NULL;
200 if (sc->sc_io_res != NULL) {
201 iounmap((void *)sc->sc_io_res);
202 sc->sc_io_res = NULL;
203 sc->sc_io_tag = NULL;
204 sc->sc_io_hdl = (uintptr_t)NULL;
205 sc->sc_io_size = 0;
207 usb_bus_mem_free_all(&sc->sc_bus, &ehci_iterate_hw_softc);