|
struct dwc3_ep - device side endpoint representation : usb endpoint : list of requests for this endpoint : list of requests on this ep which have TRBs setup : array of transaction buffers : dma address of : next slot which is going to be used : first slot which is owned by HW : usb_endpoint_descriptor pointer : pointer to DWC controller : endpoint flags (wedged, stalled, ...) : index of current used trb : endpoint number (1 - 15) : set to bmAttributes & USB_ENDPOINT_XFERTYPE_MASK : Resource transfer index : Current uf received through last event parameter : the intervall on which the ISOC transfer is started
: true for TX, false for RX : true when streams are enabled
|
#define | DWC3_TRB_SIZE_MASK (0x00ffffff) |
|
#define | DWC3_TRB_SIZE_LENGTH(n) ((n) & DWC3_TRB_SIZE_MASK) |
|
#define | DWC3_TRB_SIZE_PCM1(n) (((n) & 0x03) << 24) |
|
#define | DWC3_TRB_SIZE_TRBSTS(n) (((n) & (0x0f << 28)) >> 28) |
|
#define | DWC3_TRBSTS_OK 0 |
|
#define | DWC3_TRBSTS_MISSED_ISOC 1 |
|
#define | DWC3_TRBSTS_SETUP_PENDING 2 |
|
#define | DWC3_TRB_STS_XFER_IN_PROG 4 |
|
#define | DWC3_TRB_CTRL_HWO (1 << 0) |
|
#define | DWC3_TRB_CTRL_LST (1 << 1) |
|
#define | DWC3_TRB_CTRL_CHN (1 << 2) |
|
#define | DWC3_TRB_CTRL_CSP (1 << 3) |
|
#define | DWC3_TRB_CTRL_TRBCTL(n) (((n) & 0x3f) << 4) |
|
#define | DWC3_TRB_CTRL_ISP_IMI (1 << 10) |
|
#define | DWC3_TRB_CTRL_IOC (1 << 11) |
|
#define | DWC3_TRB_CTRL_SID_SOFN(n) (((n) & 0xffff) << 14) |
|
#define | DWC3_TRBCTL_NORMAL DWC3_TRB_CTRL_TRBCTL(1) |
|
#define | DWC3_TRBCTL_CONTROL_SETUP DWC3_TRB_CTRL_TRBCTL(2) |
|
#define | DWC3_TRBCTL_CONTROL_STATUS2 DWC3_TRB_CTRL_TRBCTL(3) |
|
#define | DWC3_TRBCTL_CONTROL_STATUS3 DWC3_TRB_CTRL_TRBCTL(4) |
|
#define | DWC3_TRBCTL_CONTROL_DATA DWC3_TRB_CTRL_TRBCTL(5) |
|
#define | DWC3_TRBCTL_ISOCHRONOUS_FIRST DWC3_TRB_CTRL_TRBCTL(6) |
|
#define | DWC3_TRBCTL_ISOCHRONOUS DWC3_TRB_CTRL_TRBCTL(7) |
|
#define | DWC3_TRBCTL_LINK_TRB DWC3_TRB_CTRL_TRBCTL(8) |
|
#define | DWC3_MODE(n) ((n) & 0x7) |
|
#define | DWC3_MODE_DEVICE 0 |
|
#define | DWC3_MODE_HOST 1 |
|
#define | DWC3_MODE_DRD 2 |
|
#define | DWC3_MODE_HUB 3 |
|
#define | DWC3_MDWIDTH(n) (((n) & 0xff00) >> 8) |
|
#define | DWC3_NUM_INT(n) (((n) & (0x3f << 15)) >> 15) |
|
#define | DWC3_RAM1_DEPTH(n) ((n) & 0xffff) |
|
#define | DWC3_DEPEVT_XFERCOMPLETE 0x01 |
|
#define | DWC3_DEPEVT_XFERINPROGRESS 0x02 |
|
#define | DWC3_DEPEVT_XFERNOTREADY 0x03 |
|
#define | DWC3_DEPEVT_RXTXFIFOEVT 0x04 |
|
#define | DWC3_DEPEVT_STREAMEVT 0x06 |
|
#define | DWC3_DEPEVT_EPCMDCMPLT 0x07 |
|
#define | DWC3_HAS_PERIPHERAL BIT(0) |
|
#define | DWC3_HAS_XHCI BIT(1) |
|
#define | DWC3_HAS_OTG BIT(3) |
|
enum | dwc3_phy { DWC3_PHY_UNKNOWN = 0,
DWC3_PHY_USB3,
DWC3_PHY_USB2
} |
|
enum | dwc3_ep0_next { DWC3_EP0_UNKNOWN = 0,
DWC3_EP0_COMPLETE,
DWC3_EP0_NRDY_DATA,
DWC3_EP0_NRDY_STATUS
} |
|
enum | dwc3_ep0_state { EP0_UNCONNECTED = 0,
EP0_SETUP_PHASE,
EP0_DATA_PHASE,
EP0_STATUS_PHASE
} |
|
enum | dwc3_link_state {
DWC3_LINK_STATE_U0 = 0x00,
DWC3_LINK_STATE_U1 = 0x01,
DWC3_LINK_STATE_U2 = 0x02,
DWC3_LINK_STATE_U3 = 0x03,
DWC3_LINK_STATE_SS_DIS = 0x04,
DWC3_LINK_STATE_RX_DET = 0x05,
DWC3_LINK_STATE_SS_INACT = 0x06,
DWC3_LINK_STATE_POLL = 0x07,
DWC3_LINK_STATE_RECOV = 0x08,
DWC3_LINK_STATE_HRESET = 0x09,
DWC3_LINK_STATE_CMPLY = 0x0a,
DWC3_LINK_STATE_LPBK = 0x0b,
DWC3_LINK_STATE_RESET = 0x0e,
DWC3_LINK_STATE_RESUME = 0x0f,
DWC3_LINK_STATE_MASK = 0x0f
} |
|
enum | dwc3_device_state { DWC3_DEFAULT_STATE,
DWC3_ADDRESS_STATE,
DWC3_CONFIGURED_STATE
} |
|
struct dwc3_trb | __packed |
|
void | dwc3_set_mode (struct dwc3 *dwc, u32 mode) |
|
int | dwc3_gadget_resize_tx_fifos (struct dwc3 *dwc) |
|
int | dwc3_host_init (struct dwc3 *dwc) |
|
void | dwc3_host_exit (struct dwc3 *dwc) |
|
int | dwc3_gadget_init (struct dwc3 *dwc) |
|
void | dwc3_gadget_exit (struct dwc3 *dwc) |
|
int | dwc3_get_device_id (void) |
|
void | dwc3_put_device_id (int id) |
|
#define DWC3_EP0_BOUNCE_SIZE 512 |
core.h - DesignWare USB3 DRD Core Header
Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com
Authors: Felipe Balbi balbi.nosp@m.@ti..nosp@m.com, Sebastian Andrzej Siewior bigea.nosp@m.sy@l.nosp@m.inutr.nosp@m.onix.nosp@m..de
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer, without modification.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- The names of the above-listed copyright holders may not be used to endorse or promote products derived from this software without specific prior written permission.
ALTERNATIVELY, this software may be distributed under the terms of the GNU General Public License ("GPL") version 2, as published by the Free Software Foundation.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition at line 54 of file core.h.
host.c - DesignWare USB3 DRD Controller Host Glue
Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com
Authors: Felipe Balbi balbi.nosp@m.@ti..nosp@m.com,
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer, without modification.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- The names of the above-listed copyright holders may not be used to endorse or promote products derived from this software without specific prior written permission.
ALTERNATIVELY, this software may be distributed under the terms of the GNU General Public License ("GPL") version 2, as published by the Free Software Foundation.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition at line 42 of file host.c.