44#include <sys/condvar.h>
45#include <sys/kernel.h>
46#include <sys/module.h>
48#include <machine/bus.h>
87 sc->
sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &
rid,
90 device_printf(self,
"Could not map memory\n");
99 sc->
sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &
rid,
100 RF_SHAREABLE | RF_ACTIVE);
102 device_printf(self,
"Could not allocate irq\n");
105 sc->
sc_bus.
bdev = device_add_child(self,
"usbus", -1);
107 device_printf(self,
"Could not add USB device\n");
114 err = bus_setup_intr(self, sc->
sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
117 device_printf(self,
"Could not setup irq, %d\n", err);
126 err = device_probe_and_attach(sc->
sc_bus.
bdev);
144 device_delete_children(self);
156 device_printf(self,
"Could not tear down irq, %d\n",
162 bus_release_resource(self, SYS_RES_IRQ, 0, sc->
sc_irq_res);
166 bus_release_resource(self, SYS_RES_MEMORY, 0,
179 DEVMETHOD(device_suspend, bus_generic_suspend),
180 DEVMETHOD(device_resume, bus_generic_resume),
181 DEVMETHOD(device_shutdown, bus_generic_shutdown),
void ehci_interrupt(ehci_softc_t *sc)
void ehci_detach(ehci_softc_t *sc)
usb_error_t ehci_init(ehci_softc_t *sc)
struct ehci_softc ehci_softc_t
#define EHCI_SCFLG_DONTRESET
usb_bus_mem_cb_t ehci_iterate_hw_softc
int generic_ehci_attach(device_t self)
int generic_ehci_detach(device_t self)
driver_t generic_ehci_driver
static device_method_t ehci_methods[]
struct usb_device * sc_devices[EHCI_MAX_DEVICES]
struct resource * sc_irq_res
bus_space_handle_t sc_io_hdl
struct resource * sc_io_res
bus_space_tag_t sc_io_tag
struct usb_device ** devices
#define USB_GET_DMA_TAG(dev)
void usb_bus_mem_free_all(struct usb_bus *bus, usb_bus_mem_cb_t *cb)
uint8_t usb_bus_mem_alloc_all(struct usb_bus *bus, bus_dma_tag_t dmat, usb_bus_mem_cb_t *cb)