• Home
  • Raw
  • Download

Lines Matching refs:sc

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