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

Lines Matching refs:sc_otg

132 	struct musbotg_softc	sc_otg;
143 if (sc->sc_otg.sc_mode == MUSB2_DEVICE_MODE)
144 musbotg_vbus_interrupt(&sc->sc_otg, 1);
147 musbotg_vbus_interrupt(&sc->sc_otg, stat & 1);
253 sc->sc_otg.sc_id = device_get_unit(dev);
296 sc->sc_otg.sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ,
298 if (sc->sc_otg.sc_irq_res == NULL) {
305 sc->sc_otg.sc_clocks_on = &musbotg_clocks_on;
306 sc->sc_otg.sc_clocks_off = &musbotg_clocks_off;
307 sc->sc_otg.sc_clocks_arg = &sc->sc_otg;
309 sc->sc_otg.sc_ep_int_set = musbotg_ep_int_set;
312 sc->sc_otg.sc_bus.parent = dev;
313 sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices;
314 sc->sc_otg.sc_bus.devices_max = MUSB2_MAX_DEVICES;
315 sc->sc_otg.sc_bus.dma_bits = 32;
318 if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus,
324 sc->sc_otg.sc_io_res = sc->sc_mem_res[RES_USBCORE];
325 sc->sc_otg.sc_io_tag =
326 rman_get_bustag(sc->sc_otg.sc_io_res);
327 sc->sc_otg.sc_io_hdl =
328 rman_get_bushandle(sc->sc_otg.sc_io_res);
329 sc->sc_otg.sc_io_size =
330 rman_get_size(sc->sc_otg.sc_io_res);
332 sc->sc_otg.sc_bus.bdev = device_add_child(dev, "usbus", -1);
333 if (!(sc->sc_otg.sc_bus.bdev)) {
337 device_set_ivars(sc->sc_otg.sc_bus.bdev,
338 &sc->sc_otg.sc_bus);
340 err = bus_setup_intr(dev, sc->sc_otg.sc_irq_res,
343 &sc->sc_otg, &sc->sc_otg.sc_intr_hdl);
345 sc->sc_otg.sc_intr_hdl = NULL;
351 sc->sc_otg.sc_platform_data = sc;
355 sc->sc_otg.sc_mode = MUSB2_HOST_MODE;
357 sc->sc_otg.sc_mode = MUSB2_DEVICE_MODE;
360 if (sc->sc_otg.sc_id == 0)
361 sc->sc_otg.sc_mode = MUSB2_DEVICE_MODE;
363 sc->sc_otg.sc_mode = MUSB2_HOST_MODE;
370 if (sc->sc_otg.sc_mode == MUSB2_HOST_MODE) {
388 err = musbotg_init(&sc->sc_otg);
390 err = device_probe_and_attach(sc->sc_otg.sc_bus.bdev);
414 if (sc->sc_otg.sc_irq_res && sc->sc_otg.sc_intr_hdl) {
418 musbotg_uninit(&sc->sc_otg);
420 err = bus_teardown_intr(dev, sc->sc_otg.sc_irq_res,
421 sc->sc_otg.sc_intr_hdl);
422 sc->sc_otg.sc_intr_hdl = NULL;
425 usb_bus_mem_free_all(&sc->sc_otg.sc_bus, NULL);
432 if (sc->sc_otg.sc_irq_res)
434 sc->sc_otg.sc_irq_res);