• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/arm/ti/am335x/

Lines Matching defs:sc_otg

128 	struct musbotg_softc	sc_otg;
138 if (sc->sc_otg.sc_mode == MUSB2_DEVICE_MODE)
139 musbotg_vbus_interrupt(&sc->sc_otg, 1);
142 musbotg_vbus_interrupt(&sc->sc_otg, stat & 1);
243 sc->sc_otg.sc_id = device_get_unit(dev);
255 sc->sc_otg.sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ,
257 if (sc->sc_otg.sc_irq_res == NULL) {
264 sc->sc_otg.sc_clocks_on = &musbotg_clocks_on;
265 sc->sc_otg.sc_clocks_off = &musbotg_clocks_off;
266 sc->sc_otg.sc_clocks_arg = &sc->sc_otg;
268 sc->sc_otg.sc_ep_int_set = musbotg_ep_int_set;
271 sc->sc_otg.sc_bus.parent = dev;
272 sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices;
273 sc->sc_otg.sc_bus.devices_max = MUSB2_MAX_DEVICES;
274 sc->sc_otg.sc_bus.dma_bits = 32;
277 if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus,
283 sc->sc_otg.sc_io_res = sc->sc_mem_res[RES_USBCORE];
284 sc->sc_otg.sc_io_tag =
285 rman_get_bustag(sc->sc_otg.sc_io_res);
286 sc->sc_otg.sc_io_hdl =
287 rman_get_bushandle(sc->sc_otg.sc_io_res);
288 sc->sc_otg.sc_io_size =
289 rman_get_size(sc->sc_otg.sc_io_res);
291 sc->sc_otg.sc_bus.bdev = device_add_child(dev, "usbus", -1);
292 if (!(sc->sc_otg.sc_bus.bdev)) {
296 device_set_ivars(sc->sc_otg.sc_bus.bdev,
297 &sc->sc_otg.sc_bus);
299 err = bus_setup_intr(dev, sc->sc_otg.sc_irq_res,
302 &sc->sc_otg, &sc->sc_otg.sc_intr_hdl);
304 sc->sc_otg.sc_intr_hdl = NULL;
310 sc->sc_otg.sc_platform_data = sc;
314 sc->sc_otg.sc_mode = MUSB2_HOST_MODE;
316 sc->sc_otg.sc_mode = MUSB2_DEVICE_MODE;
319 if (sc->sc_otg.sc_id == 0)
320 sc->sc_otg.sc_mode = MUSB2_DEVICE_MODE;
322 sc->sc_otg.sc_mode = MUSB2_HOST_MODE;
329 if (sc->sc_otg.sc_mode == MUSB2_HOST_MODE) {
347 err = musbotg_init(&sc->sc_otg);
349 err = device_probe_and_attach(sc->sc_otg.sc_bus.bdev);
373 if (sc->sc_otg.sc_irq_res && sc->sc_otg.sc_intr_hdl) {
377 musbotg_uninit(&sc->sc_otg);
379 err = bus_teardown_intr(dev, sc->sc_otg.sc_irq_res,
380 sc->sc_otg.sc_intr_hdl);
381 sc->sc_otg.sc_intr_hdl = NULL;
384 usb_bus_mem_free_all(&sc->sc_otg.sc_bus, NULL);
391 if (sc->sc_otg.sc_irq_res)
393 sc->sc_otg.sc_irq_res);