Lines Matching +full:generic +full:- +full:ehci

1 /*-
32 * Generic EHCI driver based on the Allwinner A10 EHCI driver
58 #include <dev/usb/controller/ehci.h>
71 sc->sc_bus.parent = self;
72 sc->sc_bus.devices = sc->sc_devices;
73 sc->sc_bus.devices_max = EHCI_MAX_DEVICES;
74 sc->sc_bus.dma_bits = 32;
77 if (usb_bus_mem_alloc_all(&sc->sc_bus,
82 sc->sc_bus.usbrev = USB_REV_2_0;
85 sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid,
87 if (!sc->sc_io_res) {
92 sc->sc_io_tag = rman_get_bustag(sc->sc_io_res);
93 sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res);
94 sc->sc_io_size = rman_get_size(sc->sc_io_res);
97 sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid,
99 if (sc->sc_irq_res == NULL) {
103 sc->sc_bus.bdev = device_add_child(self, "usbus", DEVICE_UNIT_ANY);
104 if (!sc->sc_bus.bdev) {
108 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus);
110 strlcpy(sc->sc_vendor, "Generic", sizeof(sc->sc_vendor));
112 err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
113 NULL, (driver_intr_t *)ehci_interrupt, sc, &sc->sc_intr_hdl);
116 sc->sc_intr_hdl = NULL;
120 sc->sc_flags |= EHCI_SCFLG_DONTRESET;
124 err = device_probe_and_attach(sc->sc_bus.bdev);
146 if (sc->sc_irq_res && sc->sc_intr_hdl) {
152 err = bus_teardown_intr(self, sc->sc_irq_res, sc->sc_intr_hdl);
158 sc->sc_intr_hdl = NULL;
161 if (sc->sc_irq_res) {
162 bus_release_resource(self, SYS_RES_IRQ, 0, sc->sc_irq_res);
163 sc->sc_irq_res = NULL;
165 if (sc->sc_io_res) {
167 sc->sc_io_res);
168 sc->sc_io_res = NULL;
170 usb_bus_mem_free_all(&sc->sc_bus, &ehci_iterate_hw_softc);
187 .name = "ehci",