Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
common.h File Reference
#include <linux/platform_device.h>
#include <linux/usb/renesas_usbhs.h>
#include "mod.h"
#include "pipe.h"

Go to the source code of this file.

Data Structures

struct  usbhs_priv
 

Macros

#define SYSCFG   0x0000
 
#define BUSWAIT   0x0002
 
#define DVSTCTR   0x0008
 
#define TESTMODE   0x000C
 
#define CFIFO   0x0014
 
#define CFIFOSEL   0x0020
 
#define CFIFOCTR   0x0022
 
#define D0FIFO   0x0100
 
#define D0FIFOSEL   0x0028
 
#define D0FIFOCTR   0x002A
 
#define D1FIFO   0x0120
 
#define D1FIFOSEL   0x002C
 
#define D1FIFOCTR   0x002E
 
#define INTENB0   0x0030
 
#define INTENB1   0x0032
 
#define BRDYENB   0x0036
 
#define NRDYENB   0x0038
 
#define BEMPENB   0x003A
 
#define INTSTS0   0x0040
 
#define INTSTS1   0x0042
 
#define BRDYSTS   0x0046
 
#define NRDYSTS   0x0048
 
#define BEMPSTS   0x004A
 
#define FRMNUM   0x004C
 
#define USBREQ   0x0054 /* USB request type register */
 
#define USBVAL   0x0056 /* USB request value register */
 
#define USBINDX   0x0058 /* USB request index register */
 
#define USBLENG   0x005A /* USB request length register */
 
#define DCPCFG   0x005C
 
#define DCPMAXP   0x005E
 
#define DCPCTR   0x0060
 
#define PIPESEL   0x0064
 
#define PIPECFG   0x0068
 
#define PIPEBUF   0x006A
 
#define PIPEMAXP   0x006C
 
#define PIPEPERI   0x006E
 
#define PIPEnCTR   0x0070
 
#define PIPE1TRE   0x0090
 
#define PIPE1TRN   0x0092
 
#define PIPE2TRE   0x0094
 
#define PIPE2TRN   0x0096
 
#define PIPE3TRE   0x0098
 
#define PIPE3TRN   0x009A
 
#define PIPE4TRE   0x009C
 
#define PIPE4TRN   0x009E
 
#define PIPE5TRE   0x00A0
 
#define PIPE5TRN   0x00A2
 
#define PIPEBTRE   0x00A4
 
#define PIPEBTRN   0x00A6
 
#define PIPECTRE   0x00A8
 
#define PIPECTRN   0x00AA
 
#define PIPEDTRE   0x00AC
 
#define PIPEDTRN   0x00AE
 
#define PIPEETRE   0x00B0
 
#define PIPEETRN   0x00B2
 
#define PIPEFTRE   0x00B4
 
#define PIPEFTRN   0x00B6
 
#define PIPE9TRE   0x00B8
 
#define PIPE9TRN   0x00BA
 
#define PIPEATRE   0x00BC
 
#define PIPEATRN   0x00BE
 
#define DEVADD0   0x00D0 /* Device address n configuration */
 
#define DEVADD1   0x00D2
 
#define DEVADD2   0x00D4
 
#define DEVADD3   0x00D6
 
#define DEVADD4   0x00D8
 
#define DEVADD5   0x00DA
 
#define DEVADD6   0x00DC
 
#define DEVADD7   0x00DE
 
#define DEVADD8   0x00E0
 
#define DEVADD9   0x00E2
 
#define DEVADDA   0x00E4
 
#define SCKE   (1 << 10) /* USB Module Clock Enable */
 
#define HSE   (1 << 7) /* High-Speed Operation Enable */
 
#define DCFM   (1 << 6) /* Controller Function Select */
 
#define DRPD   (1 << 5) /* D+ Line/D- Line Resistance Control */
 
#define DPRPU   (1 << 4) /* D+ Line Resistance Control */
 
#define USBE   (1 << 0) /* USB Module Operation Enable */
 
#define EXTLP   (1 << 10) /* Controls the EXTLP pin output state */
 
#define PWEN   (1 << 9) /* Controls the PWEN pin output state */
 
#define USBRST   (1 << 6) /* Bus Reset Output */
 
#define UACT   (1 << 4) /* USB Bus Enable */
 
#define RHST   (0x7) /* Reset Handshake */
 
#define RHST_LOW_SPEED   1 /* Low-speed connection */
 
#define RHST_FULL_SPEED   2 /* Full-speed connection */
 
#define RHST_HIGH_SPEED   3 /* High-speed connection */
 
#define DREQE   (1 << 12) /* DMA Transfer Request Enable */
 
#define MBW_32   (0x2 << 10) /* CFIFO Port Access Bit Width */
 
#define BVAL   (1 << 15) /* Buffer Memory Enable Flag */
 
#define BCLR   (1 << 14) /* CPU buffer clear */
 
#define FRDY   (1 << 13) /* FIFO Port Ready */
 
#define DTLN_MASK   (0x0FFF) /* Receive Data Length */
 
#define VBSE   (1 << 15) /* Enable IRQ VBUS_0 and VBUSIN_0 */
 
#define RSME   (1 << 14) /* Enable IRQ Resume */
 
#define SOFE   (1 << 13) /* Enable IRQ Frame Number Update */
 
#define DVSE   (1 << 12) /* Enable IRQ Device State Transition */
 
#define CTRE   (1 << 11) /* Enable IRQ Control Stage Transition */
 
#define BEMPE   (1 << 10) /* Enable IRQ Buffer Empty */
 
#define NRDYE   (1 << 9) /* Enable IRQ Buffer Not Ready Response */
 
#define BRDYE   (1 << 8) /* Enable IRQ Buffer Ready */
 
#define BCHGE   (1 << 14) /* USB Bus Change Interrupt Enable */
 
#define DTCHE   (1 << 12) /* Disconnection Detect Interrupt Enable */
 
#define ATTCHE   (1 << 11) /* Connection Detect Interrupt Enable */
 
#define EOFERRE   (1 << 6) /* EOF Error Detect Interrupt Enable */
 
#define SIGNE   (1 << 5) /* Setup Transaction Error Interrupt Enable */
 
#define SACKE   (1 << 4) /* Setup Transaction ACK Interrupt Enable */
 
#define VBINT   (1 << 15) /* VBUS0_0 and VBUS1_0 Interrupt Status */
 
#define DVST   (1 << 12) /* Device State Transition Interrupt Status */
 
#define CTRT   (1 << 11) /* Control Stage Interrupt Status */
 
#define BEMP   (1 << 10) /* Buffer Empty Interrupt Status */
 
#define BRDY   (1 << 8) /* Buffer Ready Interrupt Status */
 
#define VBSTS   (1 << 7) /* VBUS_0 and VBUSIN_0 Input Status */
 
#define VALID   (1 << 3) /* USB Request Receive */
 
#define DVSQ_MASK   (0x3 << 4) /* Device State */
 
#define POWER_STATE   (0 << 4)
 
#define DEFAULT_STATE   (1 << 4)
 
#define ADDRESS_STATE   (2 << 4)
 
#define CONFIGURATION_STATE   (3 << 4)
 
#define CTSQ_MASK   (0x7) /* Control Transfer Stage */
 
#define IDLE_SETUP_STAGE   0 /* Idle stage or setup stage */
 
#define READ_DATA_STAGE   1 /* Control read data stage */
 
#define READ_STATUS_STAGE   2 /* Control read status stage */
 
#define WRITE_DATA_STAGE   3 /* Control write data stage */
 
#define WRITE_STATUS_STAGE   4 /* Control write status stage */
 
#define NODATA_STATUS_STAGE   5 /* Control write NoData status stage */
 
#define SEQUENCE_ERROR   6 /* Control transfer sequence error */
 
#define OVRCR   (1 << 15) /* OVRCR Interrupt Status */
 
#define BCHG   (1 << 14) /* USB Bus Change Interrupt Status */
 
#define DTCH   (1 << 12) /* USB Disconnection Detect Interrupt Status */
 
#define ATTCH   (1 << 11) /* ATTCH Interrupt Status */
 
#define EOFERR   (1 << 6) /* EOF Error Detect Interrupt Status */
 
#define SIGN   (1 << 5) /* Setup Transaction Error Interrupt Status */
 
#define SACK   (1 << 4) /* Setup Transaction ACK Response Interrupt Status */
 
#define TYPE_NONE   (0 << 14) /* Transfer Type */
 
#define TYPE_BULK   (1 << 14)
 
#define TYPE_INT   (2 << 14)
 
#define TYPE_ISO   (3 << 14)
 
#define DBLB   (1 << 9) /* Double Buffer Mode */
 
#define SHTNAK   (1 << 7) /* Pipe Disable in Transfer End */
 
#define DIR_OUT   (1 << 4) /* Transfer Direction */
 
#define DEVSEL_MASK   (0xF << 12) /* Device Select */
 
#define DCP_MAXP_MASK   (0x7F)
 
#define PIPE_MAXP_MASK   (0x7FF)
 
#define BUFSIZE_SHIFT   10
 
#define BUFSIZE_MASK   (0x1F << BUFSIZE_SHIFT)
 
#define BUFNMB_MASK   (0xFF)
 
#define BSTS   (1 << 15) /* Buffer Status */
 
#define SUREQ   (1 << 14) /* Sending SETUP Token */
 
#define CSSTS   (1 << 12) /* CSSTS Status */
 
#define ACLRM   (1 << 9) /* Buffer Auto-Clear Mode */
 
#define SQCLR   (1 << 8) /* Toggle Bit Clear */
 
#define SQSET   (1 << 7) /* Toggle Bit Set */
 
#define PBUSY   (1 << 5) /* Pipe Busy */
 
#define PID_MASK   (0x3) /* Response PID */
 
#define PID_NAK   0
 
#define PID_BUF   1
 
#define PID_STALL10   2
 
#define PID_STALL11   3
 
#define CCPL   (1 << 2) /* Control Transfer End Enable */
 
#define TRENB   (1 << 9) /* Transaction Counter Enable */
 
#define TRCLR   (1 << 8) /* Transaction Counter Clear */
 
#define FRNM_MASK   (0x7FF)
 
#define UPPHUB(x)   (((x) & 0xF) << 11) /* HUB Register */
 
#define HUBPORT(x)   (((x) & 0x7) << 8) /* HUB Port for Target Device */
 
#define USBSPD(x)   (((x) & 0x3) << 6) /* Device Transfer Rate */
 
#define USBSPD_SPEED_LOW   0x1
 
#define USBSPD_SPEED_FULL   0x2
 
#define USBSPD_SPEED_HIGH   0x3
 
#define usbhs_lock(p, f)   spin_lock_irqsave(usbhs_priv_to_lock(p), f)
 
#define usbhs_unlock(p, f)   spin_unlock_irqrestore(usbhs_priv_to_lock(p), f)
 
#define usbhs_get_dparam(priv, param)   (priv->dparam.param)
 
#define usbhs_priv_to_pdev(priv)   (priv->pdev)
 
#define usbhs_priv_to_dev(priv)   (&priv->pdev->dev)
 
#define usbhs_priv_to_lock(priv)   (&priv->lock)
 

Functions

u16 usbhs_read (struct usbhs_priv *priv, u32 reg)
 
void usbhs_write (struct usbhs_priv *priv, u32 reg, u16 data)
 
void usbhs_bset (struct usbhs_priv *priv, u32 reg, u16 mask, u16 data)
 
void usbhs_sys_host_ctrl (struct usbhs_priv *priv, int enable)
 
void usbhs_sys_function_ctrl (struct usbhs_priv *priv, int enable)
 
void usbhs_sys_set_test_mode (struct usbhs_priv *priv, u16 mode)
 
void usbhs_usbreq_get_val (struct usbhs_priv *priv, struct usb_ctrlrequest *req)
 
void usbhs_usbreq_set_val (struct usbhs_priv *priv, struct usb_ctrlrequest *req)
 
void usbhs_bus_send_sof_enable (struct usbhs_priv *priv)
 
void usbhs_bus_send_reset (struct usbhs_priv *priv)
 
int usbhs_bus_get_speed (struct usbhs_priv *priv)
 
int usbhs_vbus_ctrl (struct usbhs_priv *priv, int enable)
 
int usbhs_frame_get_num (struct usbhs_priv *priv)
 
int usbhs_set_device_config (struct usbhs_priv *priv, int devnum, u16 upphub, u16 hubport, u16 speed)
 
struct usbhs_privusbhs_pdev_to_priv (struct platform_device *pdev)
 

Macro Definition Documentation

#define ACLRM   (1 << 9) /* Buffer Auto-Clear Mode */

Definition at line 211 of file common.h.

#define ADDRESS_STATE   (2 << 4)

Definition at line 164 of file common.h.

#define ATTCH   (1 << 11) /* ATTCH Interrupt Status */

Definition at line 180 of file common.h.

#define ATTCHE   (1 << 11) /* Connection Detect Interrupt Enable */

Definition at line 147 of file common.h.

#define BCHG   (1 << 14) /* USB Bus Change Interrupt Status */

Definition at line 178 of file common.h.

#define BCHGE   (1 << 14) /* USB Bus Change Interrupt Enable */

Definition at line 145 of file common.h.

#define BCLR   (1 << 14) /* CPU buffer clear */

Definition at line 130 of file common.h.

#define BEMP   (1 << 10) /* Buffer Empty Interrupt Status */

Definition at line 156 of file common.h.

#define BEMPE   (1 << 10) /* Enable IRQ Buffer Empty */

Definition at line 140 of file common.h.

#define BEMPENB   0x003A

Definition at line 50 of file common.h.

#define BEMPSTS   0x004A

Definition at line 55 of file common.h.

#define BRDY   (1 << 8) /* Buffer Ready Interrupt Status */

Definition at line 157 of file common.h.

#define BRDYE   (1 << 8) /* Enable IRQ Buffer Ready */

Definition at line 142 of file common.h.

#define BRDYENB   0x0036

Definition at line 48 of file common.h.

#define BRDYSTS   0x0046

Definition at line 53 of file common.h.

#define BSTS   (1 << 15) /* Buffer Status */

Definition at line 208 of file common.h.

#define BUFNMB_MASK   (0xFF)

Definition at line 204 of file common.h.

#define BUFSIZE_MASK   (0x1F << BUFSIZE_SHIFT)

Definition at line 203 of file common.h.

#define BUFSIZE_SHIFT   10

Definition at line 202 of file common.h.

#define BUSWAIT   0x0002

Definition at line 34 of file common.h.

#define BVAL   (1 << 15) /* Buffer Memory Enable Flag */

Definition at line 129 of file common.h.

#define CCPL   (1 << 2) /* Control Transfer End Enable */

Definition at line 221 of file common.h.

#define CFIFO   0x0014

Definition at line 37 of file common.h.

#define CFIFOCTR   0x0022

Definition at line 39 of file common.h.

#define CFIFOSEL   0x0020

Definition at line 38 of file common.h.

#define CONFIGURATION_STATE   (3 << 4)

Definition at line 165 of file common.h.

#define CSSTS   (1 << 12) /* CSSTS Status */

Definition at line 210 of file common.h.

#define CTRE   (1 << 11) /* Enable IRQ Control Stage Transition */

Definition at line 139 of file common.h.

#define CTRT   (1 << 11) /* Control Stage Interrupt Status */

Definition at line 155 of file common.h.

#define CTSQ_MASK   (0x7) /* Control Transfer Stage */

Definition at line 167 of file common.h.

#define D0FIFO   0x0100

Definition at line 40 of file common.h.

#define D0FIFOCTR   0x002A

Definition at line 42 of file common.h.

#define D0FIFOSEL   0x0028

Definition at line 41 of file common.h.

#define D1FIFO   0x0120

Definition at line 43 of file common.h.

#define D1FIFOCTR   0x002E

Definition at line 45 of file common.h.

#define D1FIFOSEL   0x002C

Definition at line 44 of file common.h.

#define DBLB   (1 << 9) /* Double Buffer Mode */

Definition at line 191 of file common.h.

#define DCFM   (1 << 6) /* Controller Function Select */

Definition at line 109 of file common.h.

#define DCP_MAXP_MASK   (0x7F)

Definition at line 198 of file common.h.

#define DCPCFG   0x005C

Definition at line 61 of file common.h.

#define DCPCTR   0x0060

Definition at line 63 of file common.h.

#define DCPMAXP   0x005E

Definition at line 62 of file common.h.

#define DEFAULT_STATE   (1 << 4)

Definition at line 163 of file common.h.

#define DEVADD0   0x00D0 /* Device address n configuration */

Definition at line 94 of file common.h.

#define DEVADD1   0x00D2

Definition at line 95 of file common.h.

#define DEVADD2   0x00D4

Definition at line 96 of file common.h.

#define DEVADD3   0x00D6

Definition at line 97 of file common.h.

#define DEVADD4   0x00D8

Definition at line 98 of file common.h.

#define DEVADD5   0x00DA

Definition at line 99 of file common.h.

#define DEVADD6   0x00DC

Definition at line 100 of file common.h.

#define DEVADD7   0x00DE

Definition at line 101 of file common.h.

#define DEVADD8   0x00E0

Definition at line 102 of file common.h.

#define DEVADD9   0x00E2

Definition at line 103 of file common.h.

#define DEVADDA   0x00E4

Definition at line 104 of file common.h.

#define DEVSEL_MASK   (0xF << 12) /* Device Select */

Definition at line 197 of file common.h.

#define DIR_OUT   (1 << 4) /* Transfer Direction */

Definition at line 193 of file common.h.

#define DPRPU   (1 << 4) /* D+ Line Resistance Control */

Definition at line 111 of file common.h.

#define DREQE   (1 << 12) /* DMA Transfer Request Enable */

Definition at line 125 of file common.h.

#define DRPD   (1 << 5) /* D+ Line/D- Line Resistance Control */

Definition at line 110 of file common.h.

#define DTCH   (1 << 12) /* USB Disconnection Detect Interrupt Status */

Definition at line 179 of file common.h.

#define DTCHE   (1 << 12) /* Disconnection Detect Interrupt Enable */

Definition at line 146 of file common.h.

#define DTLN_MASK   (0x0FFF) /* Receive Data Length */

Definition at line 132 of file common.h.

#define DVSE   (1 << 12) /* Enable IRQ Device State Transition */

Definition at line 138 of file common.h.

#define DVSQ_MASK   (0x3 << 4) /* Device State */

Definition at line 161 of file common.h.

#define DVST   (1 << 12) /* Device State Transition Interrupt Status */

Definition at line 154 of file common.h.

#define DVSTCTR   0x0008

Definition at line 35 of file common.h.

#define EOFERR   (1 << 6) /* EOF Error Detect Interrupt Status */

Definition at line 181 of file common.h.

#define EOFERRE   (1 << 6) /* EOF Error Detect Interrupt Enable */

Definition at line 148 of file common.h.

#define EXTLP   (1 << 10) /* Controls the EXTLP pin output state */

Definition at line 115 of file common.h.

#define FRDY   (1 << 13) /* FIFO Port Ready */

Definition at line 131 of file common.h.

#define FRMNUM   0x004C

Definition at line 56 of file common.h.

#define FRNM_MASK   (0x7FF)

Definition at line 228 of file common.h.

#define HSE   (1 << 7) /* High-Speed Operation Enable */

Definition at line 108 of file common.h.

#define HUBPORT (   x)    (((x) & 0x7) << 8) /* HUB Port for Target Device */

Definition at line 232 of file common.h.

#define IDLE_SETUP_STAGE   0 /* Idle stage or setup stage */

Definition at line 168 of file common.h.

#define INTENB0   0x0030

Definition at line 46 of file common.h.

#define INTENB1   0x0032

Definition at line 47 of file common.h.

#define INTSTS0   0x0040

Definition at line 51 of file common.h.

#define INTSTS1   0x0042

Definition at line 52 of file common.h.

#define MBW_32   (0x2 << 10) /* CFIFO Port Access Bit Width */

Definition at line 126 of file common.h.

#define NODATA_STATUS_STAGE   5 /* Control write NoData status stage */

Definition at line 173 of file common.h.

#define NRDYE   (1 << 9) /* Enable IRQ Buffer Not Ready Response */

Definition at line 141 of file common.h.

#define NRDYENB   0x0038

Definition at line 49 of file common.h.

#define NRDYSTS   0x0048

Definition at line 54 of file common.h.

#define OVRCR   (1 << 15) /* OVRCR Interrupt Status */

Definition at line 177 of file common.h.

#define PBUSY   (1 << 5) /* Pipe Busy */

Definition at line 214 of file common.h.

#define PID_BUF   1

Definition at line 217 of file common.h.

#define PID_MASK   (0x3) /* Response PID */

Definition at line 215 of file common.h.

#define PID_NAK   0

Definition at line 216 of file common.h.

#define PID_STALL10   2

Definition at line 218 of file common.h.

#define PID_STALL11   3

Definition at line 219 of file common.h.

#define PIPE1TRE   0x0090

Definition at line 70 of file common.h.

#define PIPE1TRN   0x0092

Definition at line 71 of file common.h.

#define PIPE2TRE   0x0094

Definition at line 72 of file common.h.

#define PIPE2TRN   0x0096

Definition at line 73 of file common.h.

#define PIPE3TRE   0x0098

Definition at line 74 of file common.h.

#define PIPE3TRN   0x009A

Definition at line 75 of file common.h.

#define PIPE4TRE   0x009C

Definition at line 76 of file common.h.

#define PIPE4TRN   0x009E

Definition at line 77 of file common.h.

#define PIPE5TRE   0x00A0

Definition at line 78 of file common.h.

#define PIPE5TRN   0x00A2

Definition at line 79 of file common.h.

#define PIPE9TRE   0x00B8

Definition at line 90 of file common.h.

#define PIPE9TRN   0x00BA

Definition at line 91 of file common.h.

#define PIPE_MAXP_MASK   (0x7FF)

Definition at line 199 of file common.h.

#define PIPEATRE   0x00BC

Definition at line 92 of file common.h.

#define PIPEATRN   0x00BE

Definition at line 93 of file common.h.

#define PIPEBTRE   0x00A4

Definition at line 80 of file common.h.

#define PIPEBTRN   0x00A6

Definition at line 81 of file common.h.

#define PIPEBUF   0x006A

Definition at line 66 of file common.h.

#define PIPECFG   0x0068

Definition at line 65 of file common.h.

#define PIPECTRE   0x00A8

Definition at line 82 of file common.h.

#define PIPECTRN   0x00AA

Definition at line 83 of file common.h.

#define PIPEDTRE   0x00AC

Definition at line 84 of file common.h.

#define PIPEDTRN   0x00AE

Definition at line 85 of file common.h.

#define PIPEETRE   0x00B0

Definition at line 86 of file common.h.

#define PIPEETRN   0x00B2

Definition at line 87 of file common.h.

#define PIPEFTRE   0x00B4

Definition at line 88 of file common.h.

#define PIPEFTRN   0x00B6

Definition at line 89 of file common.h.

#define PIPEMAXP   0x006C

Definition at line 67 of file common.h.

#define PIPEnCTR   0x0070

Definition at line 69 of file common.h.

#define PIPEPERI   0x006E

Definition at line 68 of file common.h.

#define PIPESEL   0x0064

Definition at line 64 of file common.h.

#define POWER_STATE   (0 << 4)

Definition at line 162 of file common.h.

#define PWEN   (1 << 9) /* Controls the PWEN pin output state */

Definition at line 116 of file common.h.

#define READ_DATA_STAGE   1 /* Control read data stage */

Definition at line 169 of file common.h.

#define READ_STATUS_STAGE   2 /* Control read status stage */

Definition at line 170 of file common.h.

#define RHST   (0x7) /* Reset Handshake */

Definition at line 119 of file common.h.

#define RHST_FULL_SPEED   2 /* Full-speed connection */

Definition at line 121 of file common.h.

#define RHST_HIGH_SPEED   3 /* High-speed connection */

Definition at line 122 of file common.h.

#define RHST_LOW_SPEED   1 /* Low-speed connection */

Definition at line 120 of file common.h.

#define RSME   (1 << 14) /* Enable IRQ Resume */

Definition at line 136 of file common.h.

#define SACK   (1 << 4) /* Setup Transaction ACK Response Interrupt Status */

Definition at line 183 of file common.h.

#define SACKE   (1 << 4) /* Setup Transaction ACK Interrupt Enable */

Definition at line 150 of file common.h.

#define SCKE   (1 << 10) /* USB Module Clock Enable */

Definition at line 107 of file common.h.

#define SEQUENCE_ERROR   6 /* Control transfer sequence error */

Definition at line 174 of file common.h.

#define SHTNAK   (1 << 7) /* Pipe Disable in Transfer End */

Definition at line 192 of file common.h.

#define SIGN   (1 << 5) /* Setup Transaction Error Interrupt Status */

Definition at line 182 of file common.h.

#define SIGNE   (1 << 5) /* Setup Transaction Error Interrupt Enable */

Definition at line 149 of file common.h.

#define SOFE   (1 << 13) /* Enable IRQ Frame Number Update */

Definition at line 137 of file common.h.

#define SQCLR   (1 << 8) /* Toggle Bit Clear */

Definition at line 212 of file common.h.

#define SQSET   (1 << 7) /* Toggle Bit Set */

Definition at line 213 of file common.h.

#define SUREQ   (1 << 14) /* Sending SETUP Token */

Definition at line 209 of file common.h.

#define SYSCFG   0x0000

Definition at line 33 of file common.h.

#define TESTMODE   0x000C

Definition at line 36 of file common.h.

#define TRCLR   (1 << 8) /* Transaction Counter Clear */

Definition at line 225 of file common.h.

#define TRENB   (1 << 9) /* Transaction Counter Enable */

Definition at line 224 of file common.h.

#define TYPE_BULK   (1 << 14)

Definition at line 188 of file common.h.

#define TYPE_INT   (2 << 14)

Definition at line 189 of file common.h.

#define TYPE_ISO   (3 << 14)

Definition at line 190 of file common.h.

#define TYPE_NONE   (0 << 14) /* Transfer Type */

Definition at line 187 of file common.h.

#define UACT   (1 << 4) /* USB Bus Enable */

Definition at line 118 of file common.h.

#define UPPHUB (   x)    (((x) & 0xF) << 11) /* HUB Register */

Definition at line 231 of file common.h.

#define USBE   (1 << 0) /* USB Module Operation Enable */

Definition at line 112 of file common.h.

#define usbhs_get_dparam (   priv,
  param 
)    (priv->dparam.param)

Definition at line 319 of file common.h.

#define usbhs_lock (   p,
  f 
)    spin_lock_irqsave(usbhs_priv_to_lock(p), f)

Definition at line 280 of file common.h.

#define usbhs_priv_to_dev (   priv)    (&priv->pdev->dev)

Definition at line 321 of file common.h.

#define usbhs_priv_to_lock (   priv)    (&priv->lock)

Definition at line 322 of file common.h.

#define usbhs_priv_to_pdev (   priv)    (priv->pdev)

Definition at line 320 of file common.h.

#define usbhs_unlock (   p,
  f 
)    spin_unlock_irqrestore(usbhs_priv_to_lock(p), f)

Definition at line 281 of file common.h.

#define USBINDX   0x0058 /* USB request index register */

Definition at line 59 of file common.h.

#define USBLENG   0x005A /* USB request length register */

Definition at line 60 of file common.h.

#define USBREQ   0x0054 /* USB request type register */

Definition at line 57 of file common.h.

#define USBRST   (1 << 6) /* Bus Reset Output */

Definition at line 117 of file common.h.

#define USBSPD (   x)    (((x) & 0x3) << 6) /* Device Transfer Rate */

Definition at line 233 of file common.h.

#define USBSPD_SPEED_FULL   0x2

Definition at line 235 of file common.h.

#define USBSPD_SPEED_HIGH   0x3

Definition at line 236 of file common.h.

#define USBSPD_SPEED_LOW   0x1

Definition at line 234 of file common.h.

#define USBVAL   0x0056 /* USB request value register */

Definition at line 58 of file common.h.

#define VALID   (1 << 3) /* USB Request Receive */

Definition at line 159 of file common.h.

#define VBINT   (1 << 15) /* VBUS0_0 and VBUS1_0 Interrupt Status */

Definition at line 153 of file common.h.

#define VBSE   (1 << 15) /* Enable IRQ VBUS_0 and VBUSIN_0 */

Definition at line 135 of file common.h.

#define VBSTS   (1 << 7) /* VBUS_0 and VBUSIN_0 Input Status */

Definition at line 158 of file common.h.

#define WRITE_DATA_STAGE   3 /* Control write data stage */

Definition at line 171 of file common.h.

#define WRITE_STATUS_STAGE   4 /* Control write status stage */

Definition at line 172 of file common.h.

Function Documentation

void usbhs_bset ( struct usbhs_priv priv,
u32  reg,
u16  mask,
u16  data 
)

Definition at line 80 of file common.c.

int usbhs_bus_get_speed ( struct usbhs_priv priv)

Definition at line 194 of file common.c.

void usbhs_bus_send_reset ( struct usbhs_priv priv)

Definition at line 189 of file common.c.

void usbhs_bus_send_sof_enable ( struct usbhs_priv priv)

Definition at line 177 of file common.c.

int usbhs_frame_get_num ( struct usbhs_priv priv)

Definition at line 143 of file common.c.

struct usbhs_priv* usbhs_pdev_to_priv ( struct platform_device pdev)
read

Definition at line 90 of file common.c.

u16 usbhs_read ( struct usbhs_priv priv,
u32  reg 
)

Definition at line 70 of file common.c.

int usbhs_set_device_config ( struct usbhs_priv priv,
int  devnum,
u16  upphub,
u16  hubport,
u16  speed 
)

Definition at line 227 of file common.c.

void usbhs_sys_function_ctrl ( struct usbhs_priv priv,
int  enable 
)

Definition at line 121 of file common.c.

void usbhs_sys_host_ctrl ( struct usbhs_priv priv,
int  enable 
)

Definition at line 103 of file common.c.

void usbhs_sys_set_test_mode ( struct usbhs_priv priv,
u16  mode 
)

Definition at line 135 of file common.c.

void usbhs_usbreq_get_val ( struct usbhs_priv priv,
struct usb_ctrlrequest req 
)

Definition at line 151 of file common.c.

void usbhs_usbreq_set_val ( struct usbhs_priv priv,
struct usb_ctrlrequest req 
)

Definition at line 164 of file common.c.

int usbhs_vbus_ctrl ( struct usbhs_priv priv,
int  enable 
)

Definition at line 210 of file common.c.

void usbhs_write ( struct usbhs_priv priv,
u32  reg,
u16  data 
)

Definition at line 75 of file common.c.