#include <sys/cdefs.h>
#include <sys/stdint.h>
#include <sys/stddef.h>
#include <sys/param.h>
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/module.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/condvar.h>
#include <sys/sysctl.h>
#include <sys/sx.h>
#include <sys/unistd.h>
#include <sys/callout.h>
#include <sys/malloc.h>
#include <sys/priv.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usb_core.h>
#include <dev/usb/usb_busdma.h>
#include <dev/usb/usb_process.h>
#include <dev/usb/usb_util.h>
#include <dev/usb/usb_controller.h>
#include <dev/usb/usb_bus.h>
#include <dev/usb/usb_pci.h>
#include <dev/usb/controller/xhci.h>
#include <dev/usb/controller/xhcireg.h>
#include "usb_if.h"
Go to the source code of this file.
|
| __FBSDID ("$FreeBSD$") |
|
| DEFINE_CLASS_0 (xhci, xhci_pci_driver, xhci_device_methods, sizeof(struct xhci_softc)) |
|
| DRIVER_MODULE (xhci, pci, xhci_pci_driver, xhci_devclass, NULL, NULL) |
|
| MODULE_DEPEND (xhci, usb, 1, 1, 1) |
|
static const char * | xhci_pci_match (device_t self) |
|
static int | xhci_pci_probe (device_t self) |
|
| TUNABLE_INT ("hw.usb.xhci.msi", &xhci_use_msi) |
|
| TUNABLE_INT ("hw.usb.xhci.msix", &xhci_use_msix) |
|
static void | xhci_interrupt_poll (void *_sc) |
|
static int | xhci_pci_port_route (device_t self, uint32_t set, uint32_t clear) |
|
int | xhci_pci_attach (device_t self) |
|
static int | xhci_pci_detach (device_t self) |
|
static int | xhci_pci_take_controller (device_t self) |
|
◆ PCI_XHCI_VENDORID_AMD
#define PCI_XHCI_VENDORID_AMD 0x1022 |
◆ PCI_XHCI_VENDORID_INTEL
#define PCI_XHCI_VENDORID_INTEL 0x8086 |
◆ __FBSDID()
◆ DEFINE_CLASS_0()
◆ DRIVER_MODULE()
◆ MODULE_DEPEND()
MODULE_DEPEND |
( |
xhci |
, |
|
|
usb |
, |
|
|
1 |
, |
|
|
1 |
, |
|
|
1 |
|
|
) |
| |
◆ TUNABLE_INT() [1/2]
TUNABLE_INT |
( |
"hw.usb.xhci.msi" |
, |
|
|
& |
xhci_use_msi |
|
) |
| |
◆ TUNABLE_INT() [2/2]
TUNABLE_INT |
( |
"hw.usb.xhci.msix" |
, |
|
|
& |
xhci_use_msix |
|
) |
| |
◆ xhci_interrupt_poll()
static void xhci_interrupt_poll |
( |
void * |
_sc | ) |
|
|
static |
◆ xhci_pci_attach()
int xhci_pci_attach |
( |
device_t |
self | ) |
|
Definition at line 271 of file xhci_pci.c.
References usb_bus::bdev, usb_bus::bus_mtx, count, error, PCI_XHCI_CBMEM, PCI_XHCI_VENDORID_AMD, PCI_XHCI_VENDORID_INTEL, rid, xhci_softc::sc_bus, xhci_softc::sc_callout, xhci_softc::sc_ctlstep, xhci_softc::sc_imod_default, xhci_softc::sc_intr_hdl, xhci_softc::sc_io_hdl, xhci_softc::sc_io_res, xhci_softc::sc_io_size, xhci_softc::sc_io_tag, xhci_softc::sc_irq_res, xhci_softc::sc_msix_res, xhci_softc::sc_no_deconfigure, xhci_softc::sc_port_route, xhci_softc::sc_vendor, USB_BUS_LOCK, USB_BUS_UNLOCK, usb_callout_init_mtx, xhci_halt_controller(), XHCI_IMOD_DEFAULT_LP, xhci_init(), xhci_interrupt(), xhci_interrupt_poll(), xhci_pci_detach, xhci_pci_port_route(), xhci_pci_take_controller, xhci_start_controller(), xhci_use_msi, xhci_use_msix, and xhci_use_polling().
◆ xhci_pci_detach()
static int xhci_pci_detach |
( |
device_t |
self | ) |
|
|
static |
◆ xhci_pci_match()
static const char * xhci_pci_match |
( |
device_t |
self | ) |
|
|
static |
◆ xhci_pci_port_route()
static int xhci_pci_port_route |
( |
device_t |
self, |
|
|
uint32_t |
set, |
|
|
uint32_t |
clear |
|
) |
| |
|
static |
◆ xhci_pci_probe()
static int xhci_pci_probe |
( |
device_t |
self | ) |
|
|
static |
◆ xhci_pci_take_controller()
static int xhci_pci_take_controller |
( |
device_t |
self | ) |
|
|
static |
Definition at line 483 of file xhci_pci.c.
References usb_bus::bdev, xhci_softc::sc_bus, usb_pause_mtx(), XHCI_HCS0_XECP, XHCI_HCSPARAMS0, XHCI_ID_USB_LEGACY, XHCI_XECP_BIOS_SEM, XHCI_XECP_ID, XHCI_XECP_NEXT, XHCI_XECP_OS_SEM, XREAD1, XREAD4, and XWRITE1.
◆ xhci_devclass
◆ xhci_device_methods
device_method_t xhci_device_methods[] |
|
static |
Initial value:= {
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
}
int xhci_pci_attach(device_t self)
static device_probe_t xhci_pci_probe
static usb_take_controller_t xhci_pci_take_controller
static device_detach_t xhci_pci_detach
Definition at line 72 of file xhci_pci.c.
◆ xhci_pci_detach
device_detach_t xhci_pci_detach |
|
static |
◆ xhci_pci_probe
device_probe_t xhci_pci_probe |
|
static |
◆ xhci_pci_take_controller
usb_take_controller_t xhci_pci_take_controller |
|
static |
◆ xhci_use_msi
◆ xhci_use_msix