Lines Matching defs:sc_otg

72 	struct dwc_otg_softc sc_otg;	/* must be first */
98 sc->sc_otg.sc_bus.parent = dev;
99 sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices;
100 sc->sc_otg.sc_bus.devices_max = DWC_OTG_MAX_DEVICES;
101 sc->sc_otg.sc_bus.dma_bits = 32;
104 if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus,
109 sc->sc_otg.sc_io_res =
112 if (!(sc->sc_otg.sc_io_res)) {
116 sc->sc_otg.sc_io_tag = rman_get_bustag(sc->sc_otg.sc_io_res);
117 sc->sc_otg.sc_io_hdl = rman_get_bushandle(sc->sc_otg.sc_io_res);
118 sc->sc_otg.sc_io_size = rman_get_size(sc->sc_otg.sc_io_res);
121 sc->sc_otg.sc_irq_res =
123 if (sc->sc_otg.sc_irq_res == NULL)
126 sc->sc_otg.sc_bus.bdev = device_add_child(dev, "usbus", -1);
127 if (sc->sc_otg.sc_bus.bdev == NULL)
130 device_set_ivars(sc->sc_otg.sc_bus.bdev, &sc->sc_otg.sc_bus);
132 err = bus_setup_intr(dev, sc->sc_otg.sc_irq_res, INTR_TYPE_TTY | INTR_MPSAFE,
133 &dwc_otg_filter_interrupt, &dwc_otg_interrupt, sc, &sc->sc_otg.sc_intr_hdl);
135 sc->sc_otg.sc_intr_hdl = NULL;
138 err = dwc_otg_init(&sc->sc_otg);
140 err = device_probe_and_attach(sc->sc_otg.sc_bus.bdev);
160 if (sc->sc_otg.sc_bus.bdev) {
161 bdev = sc->sc_otg.sc_bus.bdev;
168 if (sc->sc_otg.sc_irq_res && sc->sc_otg.sc_intr_hdl) {
172 dwc_otg_uninit(&sc->sc_otg);
174 err = bus_teardown_intr(dev, sc->sc_otg.sc_irq_res,
175 sc->sc_otg.sc_intr_hdl);
176 sc->sc_otg.sc_intr_hdl = NULL;
179 if (sc->sc_otg.sc_irq_res) {
181 sc->sc_otg.sc_irq_res);
182 sc->sc_otg.sc_irq_res = NULL;
185 if (sc->sc_otg.sc_io_res) {
187 sc->sc_otg.sc_io_res);
188 sc->sc_otg.sc_io_res = NULL;
190 usb_bus_mem_free_all(&sc->sc_otg.sc_bus, NULL);