Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
mv_udc.h File Reference

Go to the source code of this file.

Data Structures

struct  mv_cap_regs
 
struct  mv_op_regs
 
struct  mv_udc
 
struct  mv_ep
 
struct  mv_req
 
struct  mv_dqh
 
struct  mv_dtd
 

Macros

#define VUSBHS_MAX_PORTS   8
 
#define DQH_ALIGNMENT   2048
 
#define DTD_ALIGNMENT   64
 
#define DMA_BOUNDARY   4096
 
#define EP_DIR_IN   1
 
#define EP_DIR_OUT   0
 
#define DMA_ADDR_INVALID   (~(dma_addr_t)0)
 
#define EP0_MAX_PKT_SIZE   64
 
#define WAIT_FOR_SETUP   0
 
#define DATA_STATE_XMIT   1
 
#define DATA_STATE_NEED_ZLP   2
 
#define WAIT_FOR_OUT_STATUS   3
 
#define DATA_STATE_RECV   4
 
#define CAPLENGTH_MASK   (0xff)
 
#define DCCPARAMS_DEN_MASK   (0x1f)
 
#define HCSPARAMS_PPC   (0x10)
 
#define USB_FRINDEX_MASKS   0x3fff
 
#define USBCMD_RUN_STOP   (0x00000001)
 
#define USBCMD_CTRL_RESET   (0x00000002)
 
#define USBCMD_SETUP_TRIPWIRE_SET   (0x00002000)
 
#define USBCMD_SETUP_TRIPWIRE_CLEAR   (~USBCMD_SETUP_TRIPWIRE_SET)
 
#define USBCMD_ATDTW_TRIPWIRE_SET   (0x00004000)
 
#define USBCMD_ATDTW_TRIPWIRE_CLEAR   (~USBCMD_ATDTW_TRIPWIRE_SET)
 
#define USBCMD_FRAME_SIZE_1024   (0x00000000) /* 000 */
 
#define USBCMD_FRAME_SIZE_512   (0x00000004) /* 001 */
 
#define USBCMD_FRAME_SIZE_256   (0x00000008) /* 010 */
 
#define USBCMD_FRAME_SIZE_128   (0x0000000C) /* 011 */
 
#define USBCMD_FRAME_SIZE_64   (0x00008000) /* 100 */
 
#define USBCMD_FRAME_SIZE_32   (0x00008004) /* 101 */
 
#define USBCMD_FRAME_SIZE_16   (0x00008008) /* 110 */
 
#define USBCMD_FRAME_SIZE_8   (0x0000800C) /* 111 */
 
#define EPCTRL_TX_ALL_MASK   (0xFFFF0000)
 
#define EPCTRL_RX_ALL_MASK   (0x0000FFFF)
 
#define EPCTRL_TX_DATA_TOGGLE_RST   (0x00400000)
 
#define EPCTRL_TX_EP_STALL   (0x00010000)
 
#define EPCTRL_RX_EP_STALL   (0x00000001)
 
#define EPCTRL_RX_DATA_TOGGLE_RST   (0x00000040)
 
#define EPCTRL_RX_ENABLE   (0x00000080)
 
#define EPCTRL_TX_ENABLE   (0x00800000)
 
#define EPCTRL_CONTROL   (0x00000000)
 
#define EPCTRL_ISOCHRONOUS   (0x00040000)
 
#define EPCTRL_BULK   (0x00080000)
 
#define EPCTRL_INT   (0x000C0000)
 
#define EPCTRL_TX_TYPE   (0x000C0000)
 
#define EPCTRL_RX_TYPE   (0x0000000C)
 
#define EPCTRL_DATA_TOGGLE_INHIBIT   (0x00000020)
 
#define EPCTRL_TX_EP_TYPE_SHIFT   (18)
 
#define EPCTRL_RX_EP_TYPE_SHIFT   (2)
 
#define EPCOMPLETE_MAX_ENDPOINTS   (16)
 
#define USB_EP_LIST_ADDRESS_MASK   0xfffff800
 
#define PORTSCX_W1C_BITS   0x2a
 
#define PORTSCX_PORT_RESET   0x00000100
 
#define PORTSCX_PORT_POWER   0x00001000
 
#define PORTSCX_FORCE_FULL_SPEED_CONNECT   0x01000000
 
#define PORTSCX_PAR_XCVR_SELECT   0xC0000000
 
#define PORTSCX_PORT_FORCE_RESUME   0x00000040
 
#define PORTSCX_PORT_SUSPEND   0x00000080
 
#define PORTSCX_PORT_SPEED_FULL   0x00000000
 
#define PORTSCX_PORT_SPEED_LOW   0x04000000
 
#define PORTSCX_PORT_SPEED_HIGH   0x08000000
 
#define PORTSCX_PORT_SPEED_MASK   0x0C000000
 
#define USBMODE_CTRL_MODE_IDLE   0x00000000
 
#define USBMODE_CTRL_MODE_DEVICE   0x00000002
 
#define USBMODE_CTRL_MODE_HOST   0x00000003
 
#define USBMODE_CTRL_MODE_RSV   0x00000001
 
#define USBMODE_SETUP_LOCK_OFF   0x00000008
 
#define USBMODE_STREAM_DISABLE   0x00000010
 
#define USBSTS_INT   0x00000001
 
#define USBSTS_ERR   0x00000002
 
#define USBSTS_PORT_CHANGE   0x00000004
 
#define USBSTS_FRM_LST_ROLL   0x00000008
 
#define USBSTS_SYS_ERR   0x00000010
 
#define USBSTS_IAA   0x00000020
 
#define USBSTS_RESET   0x00000040
 
#define USBSTS_SOF   0x00000080
 
#define USBSTS_SUSPEND   0x00000100
 
#define USBSTS_HC_HALTED   0x00001000
 
#define USBSTS_RCL   0x00002000
 
#define USBSTS_PERIODIC_SCHEDULE   0x00004000
 
#define USBSTS_ASYNC_SCHEDULE   0x00008000
 
#define USBINTR_INT_EN   (0x00000001)
 
#define USBINTR_ERR_INT_EN   (0x00000002)
 
#define USBINTR_PORT_CHANGE_DETECT_EN   (0x00000004)
 
#define USBINTR_ASYNC_ADV_AAE   (0x00000020)
 
#define USBINTR_ASYNC_ADV_AAE_ENABLE   (0x00000020)
 
#define USBINTR_ASYNC_ADV_AAE_DISABLE   (0xFFFFFFDF)
 
#define USBINTR_RESET_EN   (0x00000040)
 
#define USBINTR_SOF_UFRAME_EN   (0x00000080)
 
#define USBINTR_DEVICE_SUSPEND   (0x00000100)
 
#define USB_DEVICE_ADDRESS_MASK   (0xfe000000)
 
#define USB_DEVICE_ADDRESS_BIT_SHIFT   (25)
 
#define EP_QUEUE_HEAD_MULT_POS   30
 
#define EP_QUEUE_HEAD_ZLT_SEL   0x20000000
 
#define EP_QUEUE_HEAD_MAX_PKT_LEN_POS   16
 
#define EP_QUEUE_HEAD_MAX_PKT_LEN(ep_info)   (((ep_info)>>16)&0x07ff)
 
#define EP_QUEUE_HEAD_IOS   0x00008000
 
#define EP_QUEUE_HEAD_NEXT_TERMINATE   0x00000001
 
#define EP_QUEUE_HEAD_IOC   0x00008000
 
#define EP_QUEUE_HEAD_MULTO   0x00000C00
 
#define EP_QUEUE_HEAD_STATUS_HALT   0x00000040
 
#define EP_QUEUE_HEAD_STATUS_ACTIVE   0x00000080
 
#define EP_QUEUE_CURRENT_OFFSET_MASK   0x00000FFF
 
#define EP_QUEUE_HEAD_NEXT_POINTER_MASK   0xFFFFFFE0
 
#define EP_QUEUE_FRINDEX_MASK   0x000007FF
 
#define EP_MAX_LENGTH_TRANSFER   0x4000
 
#define DTD_NEXT_TERMINATE   (0x00000001)
 
#define DTD_IOC   (0x00008000)
 
#define DTD_STATUS_ACTIVE   (0x00000080)
 
#define DTD_STATUS_HALTED   (0x00000040)
 
#define DTD_STATUS_DATA_BUFF_ERR   (0x00000020)
 
#define DTD_STATUS_TRANSACTION_ERR   (0x00000008)
 
#define DTD_RESERVED_FIELDS   (0x00007F00)
 
#define DTD_ERROR_MASK   (0x68)
 
#define DTD_ADDR_MASK   (0xFFFFFFE0)
 
#define DTD_PACKET_SIZE   0x7FFF0000
 
#define DTD_LENGTH_BIT_POS   (16)
 

Macro Definition Documentation

#define CAPLENGTH_MASK   (0xff)

Definition at line 32 of file mv_udc.h.

#define DATA_STATE_NEED_ZLP   2

Definition at line 28 of file mv_udc.h.

#define DATA_STATE_RECV   4

Definition at line 30 of file mv_udc.h.

#define DATA_STATE_XMIT   1

Definition at line 27 of file mv_udc.h.

#define DCCPARAMS_DEN_MASK   (0x1f)

Definition at line 33 of file mv_udc.h.

#define DMA_ADDR_INVALID   (~(dma_addr_t)0)

Definition at line 22 of file mv_udc.h.

#define DMA_BOUNDARY   4096

Definition at line 17 of file mv_udc.h.

#define DQH_ALIGNMENT   2048

Definition at line 15 of file mv_udc.h.

#define DTD_ADDR_MASK   (0xFFFFFFE0)

Definition at line 296 of file mv_udc.h.

#define DTD_ALIGNMENT   64

Definition at line 16 of file mv_udc.h.

#define DTD_ERROR_MASK   (0x68)

Definition at line 295 of file mv_udc.h.

#define DTD_IOC   (0x00008000)

Definition at line 289 of file mv_udc.h.

#define DTD_LENGTH_BIT_POS   (16)

Definition at line 298 of file mv_udc.h.

#define DTD_NEXT_TERMINATE   (0x00000001)

Definition at line 288 of file mv_udc.h.

#define DTD_PACKET_SIZE   0x7FFF0000

Definition at line 297 of file mv_udc.h.

#define DTD_RESERVED_FIELDS   (0x00007F00)

Definition at line 294 of file mv_udc.h.

#define DTD_STATUS_ACTIVE   (0x00000080)

Definition at line 290 of file mv_udc.h.

#define DTD_STATUS_DATA_BUFF_ERR   (0x00000020)

Definition at line 292 of file mv_udc.h.

#define DTD_STATUS_HALTED   (0x00000040)

Definition at line 291 of file mv_udc.h.

#define DTD_STATUS_TRANSACTION_ERR   (0x00000008)

Definition at line 293 of file mv_udc.h.

#define EP0_MAX_PKT_SIZE   64

Definition at line 24 of file mv_udc.h.

#define EP_DIR_IN   1

Definition at line 19 of file mv_udc.h.

#define EP_DIR_OUT   0

Definition at line 20 of file mv_udc.h.

#define EP_MAX_LENGTH_TRANSFER   0x4000

Definition at line 267 of file mv_udc.h.

#define EP_QUEUE_CURRENT_OFFSET_MASK   0x00000FFF

Definition at line 264 of file mv_udc.h.

#define EP_QUEUE_FRINDEX_MASK   0x000007FF

Definition at line 266 of file mv_udc.h.

#define EP_QUEUE_HEAD_IOC   0x00008000

Definition at line 260 of file mv_udc.h.

#define EP_QUEUE_HEAD_IOS   0x00008000

Definition at line 258 of file mv_udc.h.

#define EP_QUEUE_HEAD_MAX_PKT_LEN (   ep_info)    (((ep_info)>>16)&0x07ff)

Definition at line 257 of file mv_udc.h.

#define EP_QUEUE_HEAD_MAX_PKT_LEN_POS   16

Definition at line 256 of file mv_udc.h.

#define EP_QUEUE_HEAD_MULT_POS   30

Definition at line 254 of file mv_udc.h.

#define EP_QUEUE_HEAD_MULTO   0x00000C00

Definition at line 261 of file mv_udc.h.

#define EP_QUEUE_HEAD_NEXT_POINTER_MASK   0xFFFFFFE0

Definition at line 265 of file mv_udc.h.

#define EP_QUEUE_HEAD_NEXT_TERMINATE   0x00000001

Definition at line 259 of file mv_udc.h.

#define EP_QUEUE_HEAD_STATUS_ACTIVE   0x00000080

Definition at line 263 of file mv_udc.h.

#define EP_QUEUE_HEAD_STATUS_HALT   0x00000040

Definition at line 262 of file mv_udc.h.

#define EP_QUEUE_HEAD_ZLT_SEL   0x20000000

Definition at line 255 of file mv_udc.h.

#define EPCOMPLETE_MAX_ENDPOINTS   (16)

Definition at line 78 of file mv_udc.h.

#define EPCTRL_BULK   (0x00080000)

Definition at line 70 of file mv_udc.h.

#define EPCTRL_CONTROL   (0x00000000)

Definition at line 68 of file mv_udc.h.

#define EPCTRL_DATA_TOGGLE_INHIBIT   (0x00000020)

Definition at line 74 of file mv_udc.h.

#define EPCTRL_INT   (0x000C0000)

Definition at line 71 of file mv_udc.h.

#define EPCTRL_ISOCHRONOUS   (0x00040000)

Definition at line 69 of file mv_udc.h.

#define EPCTRL_RX_ALL_MASK   (0x0000FFFF)

Definition at line 60 of file mv_udc.h.

#define EPCTRL_RX_DATA_TOGGLE_RST   (0x00000040)

Definition at line 65 of file mv_udc.h.

#define EPCTRL_RX_ENABLE   (0x00000080)

Definition at line 66 of file mv_udc.h.

#define EPCTRL_RX_EP_STALL   (0x00000001)

Definition at line 64 of file mv_udc.h.

#define EPCTRL_RX_EP_TYPE_SHIFT   (2)

Definition at line 76 of file mv_udc.h.

#define EPCTRL_RX_TYPE   (0x0000000C)

Definition at line 73 of file mv_udc.h.

#define EPCTRL_TX_ALL_MASK   (0xFFFF0000)

Definition at line 59 of file mv_udc.h.

#define EPCTRL_TX_DATA_TOGGLE_RST   (0x00400000)

Definition at line 62 of file mv_udc.h.

#define EPCTRL_TX_ENABLE   (0x00800000)

Definition at line 67 of file mv_udc.h.

#define EPCTRL_TX_EP_STALL   (0x00010000)

Definition at line 63 of file mv_udc.h.

#define EPCTRL_TX_EP_TYPE_SHIFT   (18)

Definition at line 75 of file mv_udc.h.

#define EPCTRL_TX_TYPE   (0x000C0000)

Definition at line 72 of file mv_udc.h.

#define HCSPARAMS_PPC   (0x10)

Definition at line 35 of file mv_udc.h.

#define PORTSCX_FORCE_FULL_SPEED_CONNECT   0x01000000

Definition at line 86 of file mv_udc.h.

#define PORTSCX_PAR_XCVR_SELECT   0xC0000000

Definition at line 87 of file mv_udc.h.

#define PORTSCX_PORT_FORCE_RESUME   0x00000040

Definition at line 88 of file mv_udc.h.

#define PORTSCX_PORT_POWER   0x00001000

Definition at line 85 of file mv_udc.h.

#define PORTSCX_PORT_RESET   0x00000100

Definition at line 84 of file mv_udc.h.

#define PORTSCX_PORT_SPEED_FULL   0x00000000

Definition at line 90 of file mv_udc.h.

#define PORTSCX_PORT_SPEED_HIGH   0x08000000

Definition at line 92 of file mv_udc.h.

#define PORTSCX_PORT_SPEED_LOW   0x04000000

Definition at line 91 of file mv_udc.h.

#define PORTSCX_PORT_SPEED_MASK   0x0C000000

Definition at line 93 of file mv_udc.h.

#define PORTSCX_PORT_SUSPEND   0x00000080

Definition at line 89 of file mv_udc.h.

#define PORTSCX_W1C_BITS   0x2a

Definition at line 83 of file mv_udc.h.

#define USB_DEVICE_ADDRESS_BIT_SHIFT   (25)

Definition at line 133 of file mv_udc.h.

#define USB_DEVICE_ADDRESS_MASK   (0xfe000000)

Definition at line 132 of file mv_udc.h.

#define USB_EP_LIST_ADDRESS_MASK   0xfffff800

Definition at line 81 of file mv_udc.h.

#define USB_FRINDEX_MASKS   0x3fff

Definition at line 38 of file mv_udc.h.

#define USBCMD_ATDTW_TRIPWIRE_CLEAR   (~USBCMD_ATDTW_TRIPWIRE_SET)

Definition at line 47 of file mv_udc.h.

#define USBCMD_ATDTW_TRIPWIRE_SET   (0x00004000)

Definition at line 46 of file mv_udc.h.

#define USBCMD_CTRL_RESET   (0x00000002)

Definition at line 42 of file mv_udc.h.

#define USBCMD_FRAME_SIZE_1024   (0x00000000) /* 000 */

Definition at line 50 of file mv_udc.h.

#define USBCMD_FRAME_SIZE_128   (0x0000000C) /* 011 */

Definition at line 53 of file mv_udc.h.

#define USBCMD_FRAME_SIZE_16   (0x00008008) /* 110 */

Definition at line 56 of file mv_udc.h.

#define USBCMD_FRAME_SIZE_256   (0x00000008) /* 010 */

Definition at line 52 of file mv_udc.h.

#define USBCMD_FRAME_SIZE_32   (0x00008004) /* 101 */

Definition at line 55 of file mv_udc.h.

#define USBCMD_FRAME_SIZE_512   (0x00000004) /* 001 */

Definition at line 51 of file mv_udc.h.

#define USBCMD_FRAME_SIZE_64   (0x00008000) /* 100 */

Definition at line 54 of file mv_udc.h.

#define USBCMD_FRAME_SIZE_8   (0x0000800C) /* 111 */

Definition at line 57 of file mv_udc.h.

#define USBCMD_RUN_STOP   (0x00000001)

Definition at line 41 of file mv_udc.h.

#define USBCMD_SETUP_TRIPWIRE_CLEAR   (~USBCMD_SETUP_TRIPWIRE_SET)

Definition at line 44 of file mv_udc.h.

#define USBCMD_SETUP_TRIPWIRE_SET   (0x00002000)

Definition at line 43 of file mv_udc.h.

#define USBINTR_ASYNC_ADV_AAE   (0x00000020)

Definition at line 124 of file mv_udc.h.

#define USBINTR_ASYNC_ADV_AAE_DISABLE   (0xFFFFFFDF)

Definition at line 126 of file mv_udc.h.

#define USBINTR_ASYNC_ADV_AAE_ENABLE   (0x00000020)

Definition at line 125 of file mv_udc.h.

#define USBINTR_DEVICE_SUSPEND   (0x00000100)

Definition at line 130 of file mv_udc.h.

#define USBINTR_ERR_INT_EN   (0x00000002)

Definition at line 121 of file mv_udc.h.

#define USBINTR_INT_EN   (0x00000001)

Definition at line 120 of file mv_udc.h.

#define USBINTR_PORT_CHANGE_DETECT_EN   (0x00000004)

Definition at line 122 of file mv_udc.h.

#define USBINTR_RESET_EN   (0x00000040)

Definition at line 128 of file mv_udc.h.

#define USBINTR_SOF_UFRAME_EN   (0x00000080)

Definition at line 129 of file mv_udc.h.

#define USBMODE_CTRL_MODE_DEVICE   0x00000002

Definition at line 97 of file mv_udc.h.

#define USBMODE_CTRL_MODE_HOST   0x00000003

Definition at line 98 of file mv_udc.h.

#define USBMODE_CTRL_MODE_IDLE   0x00000000

Definition at line 96 of file mv_udc.h.

#define USBMODE_CTRL_MODE_RSV   0x00000001

Definition at line 99 of file mv_udc.h.

#define USBMODE_SETUP_LOCK_OFF   0x00000008

Definition at line 100 of file mv_udc.h.

#define USBMODE_STREAM_DISABLE   0x00000010

Definition at line 101 of file mv_udc.h.

#define USBSTS_ASYNC_SCHEDULE   0x00008000

Definition at line 116 of file mv_udc.h.

#define USBSTS_ERR   0x00000002

Definition at line 105 of file mv_udc.h.

#define USBSTS_FRM_LST_ROLL   0x00000008

Definition at line 107 of file mv_udc.h.

#define USBSTS_HC_HALTED   0x00001000

Definition at line 113 of file mv_udc.h.

#define USBSTS_IAA   0x00000020

Definition at line 109 of file mv_udc.h.

#define USBSTS_INT   0x00000001

Definition at line 104 of file mv_udc.h.

#define USBSTS_PERIODIC_SCHEDULE   0x00004000

Definition at line 115 of file mv_udc.h.

#define USBSTS_PORT_CHANGE   0x00000004

Definition at line 106 of file mv_udc.h.

#define USBSTS_RCL   0x00002000

Definition at line 114 of file mv_udc.h.

#define USBSTS_RESET   0x00000040

Definition at line 110 of file mv_udc.h.

#define USBSTS_SOF   0x00000080

Definition at line 111 of file mv_udc.h.

#define USBSTS_SUSPEND   0x00000100

Definition at line 112 of file mv_udc.h.

#define USBSTS_SYS_ERR   0x00000010

Definition at line 108 of file mv_udc.h.

#define VUSBHS_MAX_PORTS   8

Definition at line 13 of file mv_udc.h.

#define WAIT_FOR_OUT_STATUS   3

Definition at line 29 of file mv_udc.h.

#define WAIT_FOR_SETUP   0

Definition at line 26 of file mv_udc.h.