Lines Matching defs:self
75 ehci_fdt_probe(device_t self)
78 if (!ofw_bus_status_okay(self))
81 if (!ofw_bus_is_compatible(self, "generic-ehci"))
84 device_set_desc(self, EHCI_HC_DEVSTR);
90 ehci_fdt_attach(device_t self)
92 ehci_softc_t *sc = device_get_softc(self);
97 sc->sc_bus.parent = self;
104 USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) {
110 sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid,
113 device_printf(self, "Could not map memory\n");
121 sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid,
124 device_printf(self, "Could not allocate irq\n");
128 sc->sc_bus.bdev = device_add_child(self, "usbus", -1);
130 device_printf(self, "Could not add USB device\n");
138 err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
141 device_printf(self, "Could not setup irq, %d\n", err);
151 device_printf(self, "USB init failed err=%d\n", err);
157 ehci_fdt_detach(self);
162 ehci_fdt_detach(device_t self)
164 ehci_softc_t *sc = device_get_softc(self);
168 device_delete_children(self);
176 err = bus_teardown_intr(self, sc->sc_irq_res, sc->sc_intr_hdl);
178 device_printf(self, "Could not tear down irq, %d\n",
183 bus_release_resource(self, SYS_RES_IRQ, 0,
188 bus_release_resource(self, SYS_RES_MEMORY, 0,