FreeBSD kernel usb device Code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/condvar.h>
#include <sys/rman.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_busdma.h>
#include <dev/usb/usb_process.h>
#include <dev/usb/usb_controller.h>
#include <dev/usb/usb_bus.h>
#include <dev/usb/controller/ehci.h>
#include <dev/usb/controller/ehcireg.h>
#include "usbdevs.h"
#include <machine/bus.h>
#include <machine/resource.h>
#include <arm/freescale/imx/imx_ccmvar.h>
#include "opt_platform.h"
Go to the source code of this file.
Data Structures | |
struct | imx_usbmisc_softc |
struct | imx_ehci_softc |
Macros | |
#define | USBNC_OVER_CUR_POL (1u << 8) |
#define | USBNC_OVER_CUR_DIS (1u << 7) |
#define | IMX_EHCI_REG_OFF 0x100 |
#define | IMX_EHCI_REG_SIZE 0x100 |
Functions | |
__FBSDID ("$FreeBSD$") | |
static void | imx_usbmisc_set_ctrl (device_t dev, u_int index, uint32_t bits) |
static int | imx_usbmisc_probe (device_t dev) |
static int | imx_usbmisc_detach (device_t dev) |
static int | imx_usbmisc_attach (device_t dev) |
EARLY_DRIVER_MODULE (imx_usbmisc, simplebus, imx_usbmisc_driver, imx_usbmisc_devclass, 0, 0, BUS_PASS_DEFAULT - 1000) | |
static void | imx_ehci_post_reset (struct ehci_softc *ehci_softc) |
static int | imx_ehci_probe (device_t dev) |
static int | imx_ehci_detach (device_t dev) |
static void | imx_ehci_disable_oc (struct imx_ehci_softc *sc) |
static int | imx_ehci_attach (device_t dev) |
DRIVER_MODULE (imx_ehci, simplebus, ehci_driver, ehci_devclass, 0, 0) | |
MODULE_DEPEND (imx_ehci, usb, 1, 1, 1) | |
Variables | |
static struct ofw_compat_data | usbmisc_compat_data [] |
static device_method_t | imx_usbmisc_methods [] |
static driver_t | imx_usbmisc_driver |
static devclass_t | imx_usbmisc_devclass |
static struct ofw_compat_data | compat_data [] |
static device_method_t | ehci_methods [] |
static driver_t | ehci_driver |
static devclass_t | ehci_devclass |
#define IMX_EHCI_REG_OFF 0x100 |
Definition at line 263 of file ehci_imx.c.
#define IMX_EHCI_REG_SIZE 0x100 |
Definition at line 264 of file ehci_imx.c.
#define USBNC_OVER_CUR_DIS (1u << 7) |
Definition at line 142 of file ehci_imx.c.
#define USBNC_OVER_CUR_POL (1u << 8) |
Definition at line 141 of file ehci_imx.c.
__FBSDID | ( | "$FreeBSD$" | ) |
DRIVER_MODULE | ( | imx_ehci | , |
simplebus | , | ||
ehci_driver | , | ||
ehci_devclass | , | ||
0 | , | ||
0 | |||
) |
EARLY_DRIVER_MODULE | ( | imx_usbmisc | , |
simplebus | , | ||
imx_usbmisc_driver | , | ||
imx_usbmisc_devclass | , | ||
0 | , | ||
0 | , | ||
BUS_PASS_DEFAULT - | 1000 | ||
) |
|
static |
Definition at line 373 of file ehci_imx.c.
References usb_bus::bdev, imx_ehci_softc::dev, usb_bus::devices, usb_bus::devices_max, usb_bus::dma_bits, ehci_get_port_speed_portsc(), ehci_init(), ehci_interrupt(), imx_ehci_softc::ehci_irq_res, ehci_iterate_hw_softc, EHCI_MAX_DEVICES, imx_ehci_softc::ehci_mem_res, EHCI_SCFLG_DONEINIT, EHCI_SCFLG_NORESTERM, EHCI_SCFLG_TT, imx_ehci_softc::ehci_softc, imx_ehci_detach(), imx_ehci_disable_oc(), imx_ehci_post_reset(), IMX_EHCI_REG_OFF, IMX_EHCI_REG_SIZE, usb_bus::parent, rid, ehci_softc::sc_bus, ehci_softc::sc_devices, ehci_softc::sc_flags, ehci_softc::sc_id_vendor, ehci_softc::sc_intr_hdl, ehci_softc::sc_io_hdl, ehci_softc::sc_io_tag, ehci_softc::sc_vendor, ehci_softc::sc_vendor_get_port_speed, ehci_softc::sc_vendor_post_reset, usb_bus_mem_alloc_all(), and USB_GET_DMA_TAG.
|
static |
Definition at line 311 of file ehci_imx.c.
References imx_ehci_softc::dev, ehci_detach(), imx_ehci_softc::ehci_irq_res, ehci_iterate_hw_softc, imx_ehci_softc::ehci_mem_res, EHCI_SCFLG_DONEINIT, imx_ehci_softc::ehci_softc, ehci_softc::sc_bus, ehci_softc::sc_flags, ehci_softc::sc_intr_hdl, ehci_softc::sc_irq_res, and usb_bus_mem_free_all().
Referenced by imx_ehci_attach().
|
static |
Definition at line 343 of file ehci_imx.c.
References imx_ehci_softc::dev, imx_usbmisc_set_ctrl(), index, size, and USBNC_OVER_CUR_DIS.
Referenced by imx_ehci_attach().
|
static |
Definition at line 285 of file ehci_imx.c.
References EHCI_UM_CM_HOST, EHCI_USBMODE_NOLPM, EOREAD4, and EOWRITE4.
Referenced by imx_ehci_attach().
|
static |
Definition at line 297 of file ehci_imx.c.
References compat_data, and dev.
|
static |
Definition at line 208 of file ehci_imx.c.
References imx_usbmisc_softc::dev, imx_usbmisc_softc::mmio, and rid.
|
static |
Definition at line 195 of file ehci_imx.c.
References imx_usbmisc_softc::dev, and imx_usbmisc_softc::mmio.
|
static |
Definition at line 181 of file ehci_imx.c.
References imx_usbmisc_softc::dev, and usbmisc_compat_data.
|
static |
Definition at line 157 of file ehci_imx.c.
References imx_usbmisc_softc::dev, index, imx_usbmisc_softc::mmio, and reg.
Referenced by imx_ehci_disable_oc().
MODULE_DEPEND | ( | imx_ehci | , |
usb | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
|
static |
Definition at line 273 of file ehci_imx.c.
Referenced by imx_ehci_probe().
|
static |
Definition at line 511 of file ehci_imx.c.
|
static |
Definition at line 505 of file ehci_imx.c.
|
static |
Definition at line 490 of file ehci_imx.c.
|
static |
Definition at line 245 of file ehci_imx.c.
|
static |
Definition at line 239 of file ehci_imx.c.
|
static |
Definition at line 230 of file ehci_imx.c.
|
static |
Definition at line 149 of file ehci_imx.c.
Referenced by imx_usbmisc_probe().