FreeBSD kernel usb device Code
dwc_otg_fdt.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/condvar.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/rman.h>
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.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/controller/dwc_otg.h>
#include <dev/usb/controller/dwc_otg_fdt.h>
Include dependency graph for dwc_otg_fdt.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
static int dwc_otg_probe (device_t dev)
 
static int dwc_otg_irq_index (device_t dev, int *rid)
 
int dwc_otg_attach (device_t dev)
 
int dwc_otg_detach (device_t dev)
 
 DRIVER_MODULE (dwcotg, simplebus, dwc_otg_driver, dwc_otg_devclass, 0, 0)
 
 MODULE_DEPEND (dwcotg, usb, 1, 1, 1)
 

Variables

static device_probe_t dwc_otg_probe
 
static struct ofw_compat_data compat_data []
 
static device_method_t dwc_otg_methods []
 
driver_t dwc_otg_driver
 
static devclass_t dwc_otg_devclass
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ DRIVER_MODULE()

DRIVER_MODULE ( dwcotg  ,
simplebus  ,
dwc_otg_driver  ,
dwc_otg_devclass  ,
,
 
)

◆ dwc_otg_attach()

◆ dwc_otg_detach()

int dwc_otg_detach ( device_t  dev)

Definition at line 165 of file dwc_otg_fdt.c.

References dev, dwc_otg_uninit(), dwc_otg_softc::sc_bus, dwc_otg_softc::sc_intr_hdl, dwc_otg_softc::sc_io_res, dwc_otg_softc::sc_irq_res, dwc_otg_fdt_softc::sc_otg, and usb_bus_mem_free_all().

Referenced by dwc_otg_attach().

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

◆ dwc_otg_irq_index()

static int dwc_otg_irq_index ( device_t  dev,
int *  rid 
)
static

Definition at line 84 of file dwc_otg_fdt.c.

References dev, and rid.

Referenced by dwc_otg_attach().

Here is the caller graph for this function:

◆ dwc_otg_probe()

static int dwc_otg_probe ( device_t  dev)
static

Definition at line 69 of file dwc_otg_fdt.c.

References compat_data, and dev.

◆ MODULE_DEPEND()

MODULE_DEPEND ( dwcotg  ,
usb  ,
,
,
 
)

Variable Documentation

◆ compat_data

struct ofw_compat_data compat_data[]
static
Initial value:
= {
{ "synopsys,designware-hs-otg2", 1 },
{ "snps,dwc2", 1 },
{ NULL, 0 }
}

Definition at line 62 of file dwc_otg_fdt.c.

Referenced by dwc_otg_probe().

◆ dwc_otg_devclass

devclass_t dwc_otg_devclass
static

Definition at line 217 of file dwc_otg_fdt.c.

◆ dwc_otg_driver

driver_t dwc_otg_driver
Initial value:
= {
.name = "dwcotg",
.methods = dwc_otg_methods,
.size = sizeof(struct dwc_otg_fdt_softc),
}
static device_method_t dwc_otg_methods[]
Definition: dwc_otg_fdt.c:199

Definition at line 211 of file dwc_otg_fdt.c.

◆ dwc_otg_methods

device_method_t dwc_otg_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, dwc_otg_probe),
DEVMETHOD(device_attach, dwc_otg_attach),
DEVMETHOD(device_detach, dwc_otg_detach),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
}
int dwc_otg_detach(device_t dev)
Definition: dwc_otg_fdt.c:165
static device_probe_t dwc_otg_probe
Definition: dwc_otg_fdt.c:60
int dwc_otg_attach(device_t dev)
Definition: dwc_otg_fdt.c:98

Definition at line 199 of file dwc_otg_fdt.c.

◆ dwc_otg_probe

device_probe_t dwc_otg_probe
static

Definition at line 60 of file dwc_otg_fdt.c.