FreeBSD kernel usb device Code
ehci_pci.c File Reference
#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/ehci.h>
#include <dev/usb/controller/ehcireg.h>
#include "usb_if.h"
Include dependency graph for ehci_pci.c:

Go to the source code of this file.

Macros

#define PCI_EHCI_VENDORID_ACERLABS   0x10b9
 
#define PCI_EHCI_VENDORID_AMD   0x1022
 
#define PCI_EHCI_VENDORID_APPLE   0x106b
 
#define PCI_EHCI_VENDORID_ATI   0x1002
 
#define PCI_EHCI_VENDORID_CMDTECH   0x1095
 
#define PCI_EHCI_VENDORID_HYGON   0x1d94
 
#define PCI_EHCI_VENDORID_INTEL   0x8086
 
#define PCI_EHCI_VENDORID_NEC   0x1033
 
#define PCI_EHCI_VENDORID_OPTI   0x1045
 
#define PCI_EHCI_VENDORID_PHILIPS   0x1131
 
#define PCI_EHCI_VENDORID_SIS   0x1039
 
#define PCI_EHCI_VENDORID_NVIDIA   0x12D2
 
#define PCI_EHCI_VENDORID_NVIDIA2   0x10DE
 
#define PCI_EHCI_VENDORID_VIA   0x1106
 

Functions

 __FBSDID ("$FreeBSD$")
 
static const char * ehci_pci_match (device_t self)
 
static int ehci_pci_probe (device_t self)
 
static void ehci_pci_ati_quirk (device_t self, uint8_t is_sb700)
 
static void ehci_pci_via_quirk (device_t self)
 
static int ehci_pci_attach (device_t self)
 
static int ehci_pci_detach (device_t self)
 
static int ehci_pci_take_controller (device_t self)
 
 DRIVER_MODULE (ehci, pci, ehci_driver, ehci_devclass, 0, 0)
 
 MODULE_DEPEND (ehci, usb, 1, 1, 1)
 

Variables

static device_probe_t ehci_pci_probe
 
static device_attach_t ehci_pci_attach
 
static device_detach_t ehci_pci_detach
 
static usb_take_controller_t ehci_pci_take_controller
 
static device_method_t ehci_pci_methods []
 
static driver_t ehci_driver
 
static devclass_t ehci_devclass
 

Macro Definition Documentation

◆ PCI_EHCI_VENDORID_ACERLABS

#define PCI_EHCI_VENDORID_ACERLABS   0x10b9

Definition at line 84 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_AMD

#define PCI_EHCI_VENDORID_AMD   0x1022

Definition at line 85 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_APPLE

#define PCI_EHCI_VENDORID_APPLE   0x106b

Definition at line 86 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_ATI

#define PCI_EHCI_VENDORID_ATI   0x1002

Definition at line 87 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_CMDTECH

#define PCI_EHCI_VENDORID_CMDTECH   0x1095

Definition at line 88 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_HYGON

#define PCI_EHCI_VENDORID_HYGON   0x1d94

Definition at line 89 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_INTEL

#define PCI_EHCI_VENDORID_INTEL   0x8086

Definition at line 90 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_NEC

#define PCI_EHCI_VENDORID_NEC   0x1033

Definition at line 91 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_NVIDIA

#define PCI_EHCI_VENDORID_NVIDIA   0x12D2

Definition at line 95 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_NVIDIA2

#define PCI_EHCI_VENDORID_NVIDIA2   0x10DE

Definition at line 96 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_OPTI

#define PCI_EHCI_VENDORID_OPTI   0x1045

Definition at line 92 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_PHILIPS

#define PCI_EHCI_VENDORID_PHILIPS   0x1131

Definition at line 93 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_SIS

#define PCI_EHCI_VENDORID_SIS   0x1039

Definition at line 94 of file ehci_pci.c.

◆ PCI_EHCI_VENDORID_VIA

#define PCI_EHCI_VENDORID_VIA   0x1106

Definition at line 97 of file ehci_pci.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ DRIVER_MODULE()

DRIVER_MODULE ( ehci  ,
pci  ,
ehci_driver  ,
ehci_devclass  ,
,
 
)

◆ ehci_pci_ati_quirk()

static void ehci_pci_ati_quirk ( device_t  self,
uint8_t  is_sb700 
)
static

Definition at line 250 of file ehci_pci.c.

References PCI_EHCI_VENDORID_ATI, pci_find_device(), and val.

Referenced by ehci_pci_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ehci_pci_attach()

◆ ehci_pci_detach()

static int ehci_pci_detach ( device_t  self)
static

◆ ehci_pci_match()

static const char * ehci_pci_match ( device_t  self)
static

Definition at line 105 of file ehci_pci.c.

References PCI_INTERFACE_EHCI, PCIC_SERIALBUS, and PCIS_SERIALBUS_USB.

Referenced by ehci_pci_attach(), and ehci_pci_probe().

Here is the caller graph for this function:

◆ ehci_pci_probe()

static int ehci_pci_probe ( device_t  self)
static

Definition at line 237 of file ehci_pci.c.

References desc, and ehci_pci_match().

Here is the call graph for this function:

◆ ehci_pci_take_controller()

static int ehci_pci_take_controller ( device_t  self)
static

◆ ehci_pci_via_quirk()

static void ehci_pci_via_quirk ( device_t  self)
static

Definition at line 278 of file ehci_pci.c.

References val.

Referenced by ehci_pci_attach().

Here is the caller graph for this function:

◆ MODULE_DEPEND()

MODULE_DEPEND ( ehci  ,
usb  ,
,
,
 
)

Variable Documentation

◆ ehci_devclass

devclass_t ehci_devclass
static

Definition at line 596 of file ehci_pci.c.

◆ ehci_driver

driver_t ehci_driver
static
Initial value:
= {
.name = "ehci",
.methods = ehci_pci_methods,
.size = sizeof(struct ehci_softc),
}
static device_method_t ehci_pci_methods[]
Definition: ehci_pci.c:577

Definition at line 590 of file ehci_pci.c.

◆ ehci_pci_attach

device_attach_t ehci_pci_attach
static

Definition at line 100 of file ehci_pci.c.

◆ ehci_pci_detach

device_detach_t ehci_pci_detach
static

Definition at line 101 of file ehci_pci.c.

Referenced by ehci_pci_attach().

◆ ehci_pci_methods

device_method_t ehci_pci_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, ehci_pci_probe),
DEVMETHOD(device_attach, ehci_pci_attach),
DEVMETHOD(device_detach, ehci_pci_detach),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(usb_take_controller, ehci_pci_take_controller),
DEVMETHOD_END
}
static device_attach_t ehci_pci_attach
Definition: ehci_pci.c:100
static device_detach_t ehci_pci_detach
Definition: ehci_pci.c:101
static device_probe_t ehci_pci_probe
Definition: ehci_pci.c:99
static usb_take_controller_t ehci_pci_take_controller
Definition: ehci_pci.c:102

Definition at line 577 of file ehci_pci.c.

◆ ehci_pci_probe

device_probe_t ehci_pci_probe
static

Definition at line 99 of file ehci_pci.c.

◆ ehci_pci_take_controller

usb_take_controller_t ehci_pci_take_controller
static

Definition at line 102 of file ehci_pci.c.

Referenced by ehci_pci_attach().