33#include <sys/stdint.h>
34#include <sys/stddef.h>
39#include <sys/kernel.h>
41#include <sys/module.h>
44#include <sys/condvar.h>
45#include <sys/sysctl.h>
47#include <sys/unistd.h>
81 device_printf(
dev,
"Failed to map memory\n");
91 RF_SHAREABLE | RF_ACTIVE);
93 device_printf(
dev,
"Failed to allocate IRQ\n");
100 device_printf(
dev,
"Failed to add USB device\n");
110 err = bus_setup_intr(
dev, sc->
sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
113 device_printf(
dev,
"Failed to setup error IRQ, %d\n", err);
121 device_printf(
dev,
"Failed to init XHCI, with error %d\n", err);
128 device_printf(
dev,
"Failed to start XHCI controller, with error %d\n", err);
133 err = device_probe_and_attach(sc->
sc_bus.
bdev);
135 device_printf(
dev,
"Failed to initialize USB, with error %d\n", err);
150 device_delete_children(
dev);
155 device_printf(
dev,
"Could not tear down irq, %d\n",
161 bus_release_resource(
dev, SYS_RES_IRQ,
167 bus_release_resource(
dev, SYS_RES_MEMORY,
181 DEVMETHOD(device_suspend, bus_generic_suspend),
182 DEVMETHOD(device_resume, bus_generic_resume),
183 DEVMETHOD(device_shutdown, bus_generic_shutdown),
int generic_xhci_detach(device_t dev)
driver_t generic_xhci_driver
static device_method_t xhci_methods[]
int generic_xhci_attach(device_t dev)
struct usb_device ** devices
bus_space_tag_t sc_io_tag
struct resource * sc_io_res
struct usb_device * sc_devices[XHCI_MAX_DEVICES]
bus_space_handle_t sc_io_hdl
struct resource * sc_irq_res
usb_error_t xhci_init(struct xhci_softc *sc, device_t self, uint8_t dma32)
void xhci_uninit(struct xhci_softc *sc)
usb_error_t xhci_start_controller(struct xhci_softc *sc)
void xhci_interrupt(struct xhci_softc *sc)