FreeBSD kernel usb device Code
ohci_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/ohci.h>
#include <dev/usb/controller/ohcireg.h>
#include "usb_if.h"
Include dependency graph for ohci_pci.c:

Go to the source code of this file.

Macros

#define PCI_OHCI_VENDORID_ACERLABS   0x10b9
 
#define PCI_OHCI_VENDORID_AMD   0x1022
 
#define PCI_OHCI_VENDORID_APPLE   0x106b
 
#define PCI_OHCI_VENDORID_ATI   0x1002
 
#define PCI_OHCI_VENDORID_CMDTECH   0x1095
 
#define PCI_OHCI_VENDORID_HYGON   0x1d94
 
#define PCI_OHCI_VENDORID_NEC   0x1033
 
#define PCI_OHCI_VENDORID_NVIDIA   0x12D2
 
#define PCI_OHCI_VENDORID_NVIDIA2   0x10DE
 
#define PCI_OHCI_VENDORID_OPTI   0x1045
 
#define PCI_OHCI_VENDORID_SIS   0x1039
 
#define PCI_OHCI_BASE_REG   0x10
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int ohci_pci_take_controller (device_t self)
 
static const char * ohci_pci_match (device_t self)
 
static int ohci_pci_probe (device_t self)
 
static int ohci_pci_attach (device_t self)
 
static int ohci_pci_detach (device_t self)
 
 DRIVER_MODULE (ohci, pci, ohci_driver, ohci_devclass, 0, 0)
 
 MODULE_DEPEND (ohci, usb, 1, 1, 1)
 

Variables

static device_probe_t ohci_pci_probe
 
static device_attach_t ohci_pci_attach
 
static device_detach_t ohci_pci_detach
 
static usb_take_controller_t ohci_pci_take_controller
 
static device_method_t ohci_pci_methods []
 
static driver_t ohci_driver
 
static devclass_t ohci_devclass
 

Macro Definition Documentation

◆ PCI_OHCI_BASE_REG

#define PCI_OHCI_BASE_REG   0x10

Definition at line 93 of file ohci_pci.c.

◆ PCI_OHCI_VENDORID_ACERLABS

#define PCI_OHCI_VENDORID_ACERLABS   0x10b9

Definition at line 81 of file ohci_pci.c.

◆ PCI_OHCI_VENDORID_AMD

#define PCI_OHCI_VENDORID_AMD   0x1022

Definition at line 82 of file ohci_pci.c.

◆ PCI_OHCI_VENDORID_APPLE

#define PCI_OHCI_VENDORID_APPLE   0x106b

Definition at line 83 of file ohci_pci.c.

◆ PCI_OHCI_VENDORID_ATI

#define PCI_OHCI_VENDORID_ATI   0x1002

Definition at line 84 of file ohci_pci.c.

◆ PCI_OHCI_VENDORID_CMDTECH

#define PCI_OHCI_VENDORID_CMDTECH   0x1095

Definition at line 85 of file ohci_pci.c.

◆ PCI_OHCI_VENDORID_HYGON

#define PCI_OHCI_VENDORID_HYGON   0x1d94

Definition at line 86 of file ohci_pci.c.

◆ PCI_OHCI_VENDORID_NEC

#define PCI_OHCI_VENDORID_NEC   0x1033

Definition at line 87 of file ohci_pci.c.

◆ PCI_OHCI_VENDORID_NVIDIA

#define PCI_OHCI_VENDORID_NVIDIA   0x12D2

Definition at line 88 of file ohci_pci.c.

◆ PCI_OHCI_VENDORID_NVIDIA2

#define PCI_OHCI_VENDORID_NVIDIA2   0x10DE

Definition at line 89 of file ohci_pci.c.

◆ PCI_OHCI_VENDORID_OPTI

#define PCI_OHCI_VENDORID_OPTI   0x1045

Definition at line 90 of file ohci_pci.c.

◆ PCI_OHCI_VENDORID_SIS

#define PCI_OHCI_VENDORID_SIS   0x1039

Definition at line 91 of file ohci_pci.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ DRIVER_MODULE()

DRIVER_MODULE ( ohci  ,
pci  ,
ohci_driver  ,
ohci_devclass  ,
,
 
)

◆ MODULE_DEPEND()

MODULE_DEPEND ( ohci  ,
usb  ,
,
,
 
)

◆ ohci_pci_attach()

◆ ohci_pci_detach()

static int ohci_pci_detach ( device_t  self)
static

◆ ohci_pci_match()

static const char * ohci_pci_match ( device_t  self)
static

Definition at line 119 of file ohci_pci.c.

References PCI_INTERFACE_OHCI, PCIC_SERIALBUS, and PCIS_SERIALBUS_USB.

Referenced by ohci_pci_attach(), and ohci_pci_probe().

Here is the caller graph for this function:

◆ ohci_pci_probe()

static int ohci_pci_probe ( device_t  self)
static

Definition at line 193 of file ohci_pci.c.

References desc, and ohci_pci_match().

Here is the call graph for this function:

◆ ohci_pci_take_controller()

static int ohci_pci_take_controller ( device_t  self)
static

Definition at line 101 of file ohci_pci.c.

References PCI_CBMEM, PCIR_INTLINE, and reg.

Variable Documentation

◆ ohci_devclass

devclass_t ohci_devclass
static

Definition at line 384 of file ohci_pci.c.

◆ ohci_driver

driver_t ohci_driver
static
Initial value:
= {
.name = "ohci",
.methods = ohci_pci_methods,
.size = sizeof(struct ohci_softc),
}
static device_method_t ohci_pci_methods[]
Definition: ohci_pci.c:365

Definition at line 378 of file ohci_pci.c.

◆ ohci_pci_attach

device_attach_t ohci_pci_attach
static

Definition at line 96 of file ohci_pci.c.

◆ ohci_pci_detach

device_detach_t ohci_pci_detach
static

Definition at line 97 of file ohci_pci.c.

Referenced by ohci_pci_attach().

◆ ohci_pci_methods

device_method_t ohci_pci_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, ohci_pci_probe),
DEVMETHOD(device_attach, ohci_pci_attach),
DEVMETHOD(device_detach, ohci_pci_detach),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(usb_take_controller, ohci_pci_take_controller),
DEVMETHOD_END
}
static device_detach_t ohci_pci_detach
Definition: ohci_pci.c:97
static usb_take_controller_t ohci_pci_take_controller
Definition: ohci_pci.c:98
static device_probe_t ohci_pci_probe
Definition: ohci_pci.c:95
static device_attach_t ohci_pci_attach
Definition: ohci_pci.c:96

Definition at line 365 of file ohci_pci.c.

◆ ohci_pci_probe

device_probe_t ohci_pci_probe
static

Definition at line 95 of file ohci_pci.c.

◆ ohci_pci_take_controller

usb_take_controller_t ohci_pci_take_controller
static

Definition at line 98 of file ohci_pci.c.