Lines Matching defs:self
94 a10_ehci_probe(device_t self)
97 if (!ofw_bus_status_okay(self))
100 if (!ofw_bus_is_compatible(self, "allwinner,usb-ehci"))
103 device_set_desc(self, EHCI_HC_DEVSTR);
109 a10_ehci_attach(device_t self)
111 ehci_softc_t *sc = device_get_softc(self);
119 sc->sc_bus.parent = self;
126 USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) {
133 sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, RF_ACTIVE);
135 device_printf(self, "Could not map memory\n");
148 device_get_name(self));
151 sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid,
154 device_printf(self, "Could not allocate irq\n");
157 sc->sc_bus.bdev = device_add_child(self, "usbus", -1);
159 device_printf(self, "Could not add USB device\n");
170 device_printf(self, "Error: failed to get the GPIO device\n");
174 err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
177 device_printf(self, "Could not setup irq, %d\n", err);
213 device_printf(self, "USB init failed err=%d\n", err);
219 a10_ehci_detach(self);
224 a10_ehci_detach(device_t self)
226 ehci_softc_t *sc = device_get_softc(self);
231 device_delete_children(self);
239 err = bus_teardown_intr(self, sc->sc_irq_res, sc->sc_intr_hdl);
243 device_printf(self, "Could not tear down irq, %d\n",
249 bus_release_resource(self, SYS_RES_IRQ, 0, sc->sc_irq_res);
253 bus_release_resource(self, SYS_RES_MEMORY, 0,