Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
imx_udc.h File Reference
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  imx_request
 
struct  imx_ep_struct
 
struct  imx_udc_struct
 

Macros

#define EP_NO(ep)   ((ep->bEndpointAddress) & ~USB_DIR_IN) /* IN:1, OUT:0 */
 
#define EP_DIR(ep)   ((ep->bEndpointAddress) & USB_DIR_IN ? 1 : 0)
 
#define IMX_USB_NB_EP   6
 
#define USB_FRAME   (0x00) /* USB frame */
 
#define USB_SPEC   (0x04) /* USB Spec */
 
#define USB_STAT   (0x08) /* USB Status */
 
#define USB_CTRL   (0x0C) /* USB Control */
 
#define USB_DADR   (0x10) /* USB Desc RAM addr */
 
#define USB_DDAT   (0x14) /* USB Desc RAM/EP buffer data */
 
#define USB_INTR   (0x18) /* USB interrupt */
 
#define USB_MASK   (0x1C) /* USB Mask */
 
#define USB_ENAB   (0x24) /* USB Enable */
 
#define USB_EP_STAT(x)   (0x30 + (x*0x30)) /* USB status/control */
 
#define USB_EP_INTR(x)   (0x34 + (x*0x30)) /* USB interrupt */
 
#define USB_EP_MASK(x)   (0x38 + (x*0x30)) /* USB mask */
 
#define USB_EP_FDAT(x)   (0x3C + (x*0x30)) /* USB FIFO data */
 
#define USB_EP_FDAT0(x)   (0x3C + (x*0x30)) /* USB FIFO data */
 
#define USB_EP_FDAT1(x)   (0x3D + (x*0x30)) /* USB FIFO data */
 
#define USB_EP_FDAT2(x)   (0x3E + (x*0x30)) /* USB FIFO data */
 
#define USB_EP_FDAT3(x)   (0x3F + (x*0x30)) /* USB FIFO data */
 
#define USB_EP_FSTAT(x)   (0x40 + (x*0x30)) /* USB FIFO status */
 
#define USB_EP_FCTRL(x)   (0x44 + (x*0x30)) /* USB FIFO control */
 
#define USB_EP_LRFP(x)   (0x48 + (x*0x30)) /* USB last rd f. pointer */
 
#define USB_EP_LWFP(x)   (0x4C + (x*0x30)) /* USB last wr f. pointer */
 
#define USB_EP_FALRM(x)   (0x50 + (x*0x30)) /* USB FIFO alarm */
 
#define USB_EP_FRDP(x)   (0x54 + (x*0x30)) /* USB FIFO read pointer */
 
#define USB_EP_FWRP(x)   (0x58 + (x*0x30)) /* USB FIFO write pointer */
 
#define CTRL_CMDOVER   (1<<6) /* UDC status */
 
#define CTRL_CMDERROR   (1<<5) /* UDC status */
 
#define CTRL_FE_ENA   (1<<3) /* Enable Font End logic */
 
#define CTRL_UDC_RST   (1<<2) /* UDC reset */
 
#define CTRL_AFE_ENA   (1<<1) /* Analog Font end enable */
 
#define CTRL_RESUME   (1<<0) /* UDC resume */
 
#define STAT_RST   (1<<8)
 
#define STAT_SUSP   (1<<7)
 
#define STAT_CFG   (3<<5)
 
#define STAT_INTF   (3<<3)
 
#define STAT_ALTSET   (7<<0)
 
#define INTR_WAKEUP   (1<<31) /* Wake up Interrupt */
 
#define INTR_MSOF   (1<<7) /* Missed Start of Frame */
 
#define INTR_SOF   (1<<6) /* Start of Frame */
 
#define INTR_RESET_STOP   (1<<5) /* Reset Signaling stop */
 
#define INTR_RESET_START   (1<<4) /* Reset Signaling start */
 
#define INTR_RESUME   (1<<3) /* Suspend to resume */
 
#define INTR_SUSPEND   (1<<2) /* Active to suspend */
 
#define INTR_FRAME_MATCH   (1<<1) /* Frame matched */
 
#define INTR_CFG_CHG   (1<<0) /* Configuration change occurred */
 
#define ENAB_RST   (1<<31) /* Reset USB modules */
 
#define ENAB_ENAB   (1<<30) /* Enable USB modules*/
 
#define ENAB_SUSPEND   (1<<29) /* Suspend USB modules */
 
#define ENAB_ENDIAN   (1<<28) /* Endian of USB modules */
 
#define ENAB_PWRMD   (1<<0) /* Power mode of USB modules */
 
#define DADR_CFG   (1<<31) /* Configuration */
 
#define DADR_BSY   (1<<30) /* Busy status */
 
#define DADR_DADR   (0x1FF) /* Descriptor Ram Address */
 
#define DDAT_DDAT   (0xFF) /* Descriptor Endpoint Buffer */
 
#define EPSTAT_BCOUNT   (0x7F<<16) /* Endpoint FIFO byte count */
 
#define EPSTAT_SIP   (1<<8) /* Endpoint setup in progress */
 
#define EPSTAT_DIR   (1<<7) /* Endpoint transfer direction */
 
#define EPSTAT_MAX   (3<<5) /* Endpoint Max packet size */
 
#define EPSTAT_TYP   (3<<3) /* Endpoint type */
 
#define EPSTAT_ZLPS   (1<<2) /* Send zero length packet */
 
#define EPSTAT_FLUSH   (1<<1) /* Endpoint FIFO Flush */
 
#define EPSTAT_STALL   (1<<0) /* Force stall */
 
#define FSTAT_FRAME_STAT   (0xF<<24) /* Frame status bit [0-3] */
 
#define FSTAT_ERR   (1<<22) /* FIFO error */
 
#define FSTAT_UF   (1<<21) /* FIFO underflow */
 
#define FSTAT_OF   (1<<20) /* FIFO overflow */
 
#define FSTAT_FR   (1<<19) /* FIFO frame ready */
 
#define FSTAT_FULL   (1<<18) /* FIFO full */
 
#define FSTAT_ALRM   (1<<17) /* FIFO alarm */
 
#define FSTAT_EMPTY   (1<<16) /* FIFO empty */
 
#define FCTRL_WFR   (1<<29) /* Write frame end */
 
#define EPINTR_FIFO_FULL   (1<<8) /* fifo full */
 
#define EPINTR_FIFO_EMPTY   (1<<7) /* fifo empty */
 
#define EPINTR_FIFO_ERROR   (1<<6) /* fifo error */
 
#define EPINTR_FIFO_HIGH   (1<<5) /* fifo high */
 
#define EPINTR_FIFO_LOW   (1<<4) /* fifo low */
 
#define EPINTR_MDEVREQ   (1<<3) /* multi Device request */
 
#define EPINTR_EOT   (1<<2) /* fifo end of transfer */
 
#define EPINTR_DEVREQ   (1<<1) /* Device request */
 
#define EPINTR_EOF   (1<<0) /* fifo end of frame */
 
#define D_REQ(dev, args...)   do {} while (0)
 
#define D_TRX(dev, args...)   do {} while (0)
 
#define D_INI(dev, args...)   do {} while (0)
 
#define D_EP0(dev, args...)   do {} while (0)
 
#define D_EPX(dev, args...)   do {} while (0)
 
#define dump_ep_intr(x, y, z, i)   do {} while (0)
 
#define dump_intr(x, y, z)   do {} while (0)
 
#define dump_ep_stat(x, y)   do {} while (0)
 
#define dump_usb_stat(x, y)   do {} while (0)
 
#define dump_req(x, y, z)   do {} while (0)
 
#define D_ERR(dev, args...)   do {} while (0)
 

Enumerations

enum  ep0_state {
  EP0_IDLE, EP0_IN_DATA_PHASE, EP0_OUT_DATA_PHASE, EP0_CONFIG,
  EP0_STALL, STATE_DEV_DISABLED = 0, STATE_DEV_OPENED, STATE_DEV_UNCONNECTED,
  STATE_DEV_CONNECTED, STATE_DEV_SETUP, STATE_DEV_UNBOUND, EP0_IDLE,
  EP0_IN_DATA_PHASE, EP0_OUT_DATA_PHASE, EP0_END_XFER, EP0_STALL,
  WAIT_FOR_SETUP, SETUP_STAGE, IN_DATA_STAGE, OUT_DATA_STAGE,
  IN_STATUS_STAGE, OUT_STATUS_STAGE, STALL, WAIT_ACK_SET_CONF_INTERF,
  EP0_IDLE, EP0_IN_DATA_PHASE, EP0_OUT_DATA_PHASE, EP0_END_XFER,
  EP0_STALL
}
 

Macro Definition Documentation

#define CTRL_AFE_ENA   (1<<1) /* Analog Font end enable */

Definition at line 95 of file imx_udc.h.

#define CTRL_CMDERROR   (1<<5) /* UDC status */

Definition at line 92 of file imx_udc.h.

#define CTRL_CMDOVER   (1<<6) /* UDC status */

Definition at line 91 of file imx_udc.h.

#define CTRL_FE_ENA   (1<<3) /* Enable Font End logic */

Definition at line 93 of file imx_udc.h.

#define CTRL_RESUME   (1<<0) /* UDC resume */

Definition at line 96 of file imx_udc.h.

#define CTRL_UDC_RST   (1<<2) /* UDC reset */

Definition at line 94 of file imx_udc.h.

#define D_EP0 (   dev,
  args... 
)    do {} while (0)

Definition at line 341 of file imx_udc.h.

#define D_EPX (   dev,
  args... 
)    do {} while (0)

Definition at line 342 of file imx_udc.h.

#define D_ERR (   dev,
  args... 
)    do {} while (0)

Definition at line 348 of file imx_udc.h.

#define D_INI (   dev,
  args... 
)    do {} while (0)

Definition at line 340 of file imx_udc.h.

#define D_REQ (   dev,
  args... 
)    do {} while (0)

Definition at line 338 of file imx_udc.h.

#define D_TRX (   dev,
  args... 
)    do {} while (0)

Definition at line 339 of file imx_udc.h.

#define DADR_BSY   (1<<30) /* Busy status */

Definition at line 121 of file imx_udc.h.

#define DADR_CFG   (1<<31) /* Configuration */

Definition at line 120 of file imx_udc.h.

#define DADR_DADR   (0x1FF) /* Descriptor Ram Address */

Definition at line 122 of file imx_udc.h.

#define DDAT_DDAT   (0xFF) /* Descriptor Endpoint Buffer */

Definition at line 124 of file imx_udc.h.

#define dump_ep_intr (   x,
  y,
  z,
  i 
)    do {} while (0)

Definition at line 343 of file imx_udc.h.

#define dump_ep_stat (   x,
  y 
)    do {} while (0)

Definition at line 345 of file imx_udc.h.

#define dump_intr (   x,
  y,
 
)    do {} while (0)

Definition at line 344 of file imx_udc.h.

#define dump_req (   x,
  y,
 
)    do {} while (0)

Definition at line 347 of file imx_udc.h.

#define dump_usb_stat (   x,
  y 
)    do {} while (0)

Definition at line 346 of file imx_udc.h.

#define ENAB_ENAB   (1<<30) /* Enable USB modules*/

Definition at line 115 of file imx_udc.h.

#define ENAB_ENDIAN   (1<<28) /* Endian of USB modules */

Definition at line 117 of file imx_udc.h.

#define ENAB_PWRMD   (1<<0) /* Power mode of USB modules */

Definition at line 118 of file imx_udc.h.

#define ENAB_RST   (1<<31) /* Reset USB modules */

Definition at line 114 of file imx_udc.h.

#define ENAB_SUSPEND   (1<<29) /* Suspend USB modules */

Definition at line 116 of file imx_udc.h.

#define EP_DIR (   ep)    ((ep->bEndpointAddress) & USB_DIR_IN ? 1 : 0)

Definition at line 20 of file imx_udc.h.

#define EP_NO (   ep)    ((ep->bEndpointAddress) & ~USB_DIR_IN) /* IN:1, OUT:0 */

Definition at line 19 of file imx_udc.h.

#define EPINTR_DEVREQ   (1<<1) /* Device request */

Definition at line 153 of file imx_udc.h.

#define EPINTR_EOF   (1<<0) /* fifo end of frame */

Definition at line 154 of file imx_udc.h.

#define EPINTR_EOT   (1<<2) /* fifo end of transfer */

Definition at line 152 of file imx_udc.h.

#define EPINTR_FIFO_EMPTY   (1<<7) /* fifo empty */

Definition at line 147 of file imx_udc.h.

#define EPINTR_FIFO_ERROR   (1<<6) /* fifo error */

Definition at line 148 of file imx_udc.h.

#define EPINTR_FIFO_FULL   (1<<8) /* fifo full */

Definition at line 146 of file imx_udc.h.

#define EPINTR_FIFO_HIGH   (1<<5) /* fifo high */

Definition at line 149 of file imx_udc.h.

#define EPINTR_FIFO_LOW   (1<<4) /* fifo low */

Definition at line 150 of file imx_udc.h.

#define EPINTR_MDEVREQ   (1<<3) /* multi Device request */

Definition at line 151 of file imx_udc.h.

#define EPSTAT_BCOUNT   (0x7F<<16) /* Endpoint FIFO byte count */

Definition at line 126 of file imx_udc.h.

#define EPSTAT_DIR   (1<<7) /* Endpoint transfer direction */

Definition at line 128 of file imx_udc.h.

#define EPSTAT_FLUSH   (1<<1) /* Endpoint FIFO Flush */

Definition at line 132 of file imx_udc.h.

#define EPSTAT_MAX   (3<<5) /* Endpoint Max packet size */

Definition at line 129 of file imx_udc.h.

#define EPSTAT_SIP   (1<<8) /* Endpoint setup in progress */

Definition at line 127 of file imx_udc.h.

#define EPSTAT_STALL   (1<<0) /* Force stall */

Definition at line 133 of file imx_udc.h.

#define EPSTAT_TYP   (3<<3) /* Endpoint type */

Definition at line 130 of file imx_udc.h.

#define EPSTAT_ZLPS   (1<<2) /* Send zero length packet */

Definition at line 131 of file imx_udc.h.

#define FCTRL_WFR   (1<<29) /* Write frame end */

Definition at line 144 of file imx_udc.h.

#define FSTAT_ALRM   (1<<17) /* FIFO alarm */

Definition at line 141 of file imx_udc.h.

#define FSTAT_EMPTY   (1<<16) /* FIFO empty */

Definition at line 142 of file imx_udc.h.

#define FSTAT_ERR   (1<<22) /* FIFO error */

Definition at line 136 of file imx_udc.h.

#define FSTAT_FR   (1<<19) /* FIFO frame ready */

Definition at line 139 of file imx_udc.h.

#define FSTAT_FRAME_STAT   (0xF<<24) /* Frame status bit [0-3] */

Definition at line 135 of file imx_udc.h.

#define FSTAT_FULL   (1<<18) /* FIFO full */

Definition at line 140 of file imx_udc.h.

#define FSTAT_OF   (1<<20) /* FIFO overflow */

Definition at line 138 of file imx_udc.h.

#define FSTAT_UF   (1<<21) /* FIFO underflow */

Definition at line 137 of file imx_udc.h.

#define IMX_USB_NB_EP   6

Definition at line 21 of file imx_udc.h.

#define INTR_CFG_CHG   (1<<0) /* Configuration change occurred */

Definition at line 112 of file imx_udc.h.

#define INTR_FRAME_MATCH   (1<<1) /* Frame matched */

Definition at line 111 of file imx_udc.h.

#define INTR_MSOF   (1<<7) /* Missed Start of Frame */

Definition at line 105 of file imx_udc.h.

#define INTR_RESET_START   (1<<4) /* Reset Signaling start */

Definition at line 108 of file imx_udc.h.

#define INTR_RESET_STOP   (1<<5) /* Reset Signaling stop */

Definition at line 107 of file imx_udc.h.

#define INTR_RESUME   (1<<3) /* Suspend to resume */

Definition at line 109 of file imx_udc.h.

#define INTR_SOF   (1<<6) /* Start of Frame */

Definition at line 106 of file imx_udc.h.

#define INTR_SUSPEND   (1<<2) /* Active to suspend */

Definition at line 110 of file imx_udc.h.

#define INTR_WAKEUP   (1<<31) /* Wake up Interrupt */

Definition at line 104 of file imx_udc.h.

#define STAT_ALTSET   (7<<0)

Definition at line 102 of file imx_udc.h.

#define STAT_CFG   (3<<5)

Definition at line 100 of file imx_udc.h.

#define STAT_INTF   (3<<3)

Definition at line 101 of file imx_udc.h.

#define STAT_RST   (1<<8)

Definition at line 98 of file imx_udc.h.

#define STAT_SUSP   (1<<7)

Definition at line 99 of file imx_udc.h.

#define USB_CTRL   (0x0C) /* USB Control */

Definition at line 69 of file imx_udc.h.

#define USB_DADR   (0x10) /* USB Desc RAM addr */

Definition at line 70 of file imx_udc.h.

#define USB_DDAT   (0x14) /* USB Desc RAM/EP buffer data */

Definition at line 71 of file imx_udc.h.

#define USB_ENAB   (0x24) /* USB Enable */

Definition at line 74 of file imx_udc.h.

#define USB_EP_FALRM (   x)    (0x50 + (x*0x30)) /* USB FIFO alarm */

Definition at line 87 of file imx_udc.h.

#define USB_EP_FCTRL (   x)    (0x44 + (x*0x30)) /* USB FIFO control */

Definition at line 84 of file imx_udc.h.

#define USB_EP_FDAT (   x)    (0x3C + (x*0x30)) /* USB FIFO data */

Definition at line 78 of file imx_udc.h.

#define USB_EP_FDAT0 (   x)    (0x3C + (x*0x30)) /* USB FIFO data */

Definition at line 79 of file imx_udc.h.

#define USB_EP_FDAT1 (   x)    (0x3D + (x*0x30)) /* USB FIFO data */

Definition at line 80 of file imx_udc.h.

#define USB_EP_FDAT2 (   x)    (0x3E + (x*0x30)) /* USB FIFO data */

Definition at line 81 of file imx_udc.h.

#define USB_EP_FDAT3 (   x)    (0x3F + (x*0x30)) /* USB FIFO data */

Definition at line 82 of file imx_udc.h.

#define USB_EP_FRDP (   x)    (0x54 + (x*0x30)) /* USB FIFO read pointer */

Definition at line 88 of file imx_udc.h.

#define USB_EP_FSTAT (   x)    (0x40 + (x*0x30)) /* USB FIFO status */

Definition at line 83 of file imx_udc.h.

#define USB_EP_FWRP (   x)    (0x58 + (x*0x30)) /* USB FIFO write pointer */

Definition at line 89 of file imx_udc.h.

#define USB_EP_INTR (   x)    (0x34 + (x*0x30)) /* USB interrupt */

Definition at line 76 of file imx_udc.h.

#define USB_EP_LRFP (   x)    (0x48 + (x*0x30)) /* USB last rd f. pointer */

Definition at line 85 of file imx_udc.h.

#define USB_EP_LWFP (   x)    (0x4C + (x*0x30)) /* USB last wr f. pointer */

Definition at line 86 of file imx_udc.h.

#define USB_EP_MASK (   x)    (0x38 + (x*0x30)) /* USB mask */

Definition at line 77 of file imx_udc.h.

#define USB_EP_STAT (   x)    (0x30 + (x*0x30)) /* USB status/control */

Definition at line 75 of file imx_udc.h.

#define USB_FRAME   (0x00) /* USB frame */

Definition at line 66 of file imx_udc.h.

#define USB_INTR   (0x18) /* USB interrupt */

Definition at line 72 of file imx_udc.h.

#define USB_MASK   (0x1C) /* USB Mask */

Definition at line 73 of file imx_udc.h.

#define USB_SPEC   (0x04) /* USB Spec */

Definition at line 67 of file imx_udc.h.

#define USB_STAT   (0x08) /* USB Status */

Definition at line 68 of file imx_udc.h.

Enumeration Type Documentation

enum ep0_state
Enumerator:
EP0_IDLE 
EP0_IN_DATA_PHASE 
EP0_OUT_DATA_PHASE 
EP0_CONFIG 
EP0_STALL 
STATE_DEV_DISABLED 
STATE_DEV_OPENED 
STATE_DEV_UNCONNECTED 
STATE_DEV_CONNECTED 
STATE_DEV_SETUP 
STATE_DEV_UNBOUND 
EP0_IDLE 
EP0_IN_DATA_PHASE 
EP0_OUT_DATA_PHASE 
EP0_END_XFER 
EP0_STALL 
WAIT_FOR_SETUP 
SETUP_STAGE 
IN_DATA_STAGE 
OUT_DATA_STAGE 
IN_STATUS_STAGE 
OUT_STATUS_STAGE 
STALL 
WAIT_ACK_SET_CONF_INTERF 
EP0_IDLE 
EP0_IN_DATA_PHASE 
EP0_OUT_DATA_PHASE 
EP0_END_XFER 
EP0_STALL 

Definition at line 30 of file imx_udc.h.