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

Go to the source code of this file.

Data Structures

struct  ptd
 
struct  slotinfo
 
struct  memory_chunk
 

Macros

#define HC_CAPLENGTH   0x00
 
#define HC_HCSPARAMS   0x04
 
#define HC_HCCPARAMS   0x08
 
#define HC_USBCMD   0x20
 
#define HC_USBSTS   0x24
 
#define HC_FRINDEX   0x2c
 
#define HC_CONFIGFLAG   0x60
 
#define HC_PORTSC1   0x64
 
#define HC_ISO_PTD_DONEMAP_REG   0x130
 
#define HC_ISO_PTD_SKIPMAP_REG   0x134
 
#define HC_ISO_PTD_LASTPTD_REG   0x138
 
#define HC_INT_PTD_DONEMAP_REG   0x140
 
#define HC_INT_PTD_SKIPMAP_REG   0x144
 
#define HC_INT_PTD_LASTPTD_REG   0x148
 
#define HC_ATL_PTD_DONEMAP_REG   0x150
 
#define HC_ATL_PTD_SKIPMAP_REG   0x154
 
#define HC_ATL_PTD_LASTPTD_REG   0x158
 
#define HC_HW_MODE_CTRL   0x300
 
#define ALL_ATX_RESET   (1 << 31)
 
#define HW_ANA_DIGI_OC   (1 << 15)
 
#define HW_DATA_BUS_32BIT   (1 << 8)
 
#define HW_DACK_POL_HIGH   (1 << 6)
 
#define HW_DREQ_POL_HIGH   (1 << 5)
 
#define HW_INTR_HIGH_ACT   (1 << 2)
 
#define HW_INTR_EDGE_TRIG   (1 << 1)
 
#define HW_GLOBAL_INTR_EN   (1 << 0)
 
#define HC_CHIP_ID_REG   0x304
 
#define HC_SCRATCH_REG   0x308
 
#define HC_RESET_REG   0x30c
 
#define SW_RESET_RESET_HC   (1 << 1)
 
#define SW_RESET_RESET_ALL   (1 << 0)
 
#define HC_BUFFER_STATUS_REG   0x334
 
#define ISO_BUF_FILL   (1 << 2)
 
#define INT_BUF_FILL   (1 << 1)
 
#define ATL_BUF_FILL   (1 << 0)
 
#define HC_MEMORY_REG   0x33c
 
#define ISP_BANK(x)   ((x) << 16)
 
#define HC_PORT1_CTRL   0x374
 
#define PORT1_POWER   (3 << 3)
 
#define PORT1_INIT1   (1 << 7)
 
#define PORT1_INIT2   (1 << 23)
 
#define HW_OTG_CTRL_SET   0x374
 
#define HW_OTG_CTRL_CLR   0x376
 
#define HC_INTERRUPT_REG   0x310
 
#define HC_INTERRUPT_ENABLE   0x314
 
#define HC_ISO_INT   (1 << 9)
 
#define HC_ATL_INT   (1 << 8)
 
#define HC_INTL_INT   (1 << 7)
 
#define HC_EOT_INT   (1 << 3)
 
#define HC_SOT_INT   (1 << 1)
 
#define INTERRUPT_ENABLE_MASK   (HC_INTL_INT | HC_ATL_INT)
 
#define HC_ISO_IRQ_MASK_OR_REG   0x318
 
#define HC_INT_IRQ_MASK_OR_REG   0x31C
 
#define HC_ATL_IRQ_MASK_OR_REG   0x320
 
#define HC_ISO_IRQ_MASK_AND_REG   0x324
 
#define HC_INT_IRQ_MASK_AND_REG   0x328
 
#define HC_ATL_IRQ_MASK_AND_REG   0x32C
 
#define DELETE_URB   (0x0008)
 
#define NO_TRANSFER_ACTIVE   (0xffffffff)
 
#define PTD_OFFSET   0x0400
 
#define ISO_PTD_OFFSET   0x0400
 
#define INT_PTD_OFFSET   0x0800
 
#define ATL_PTD_OFFSET   0x0c00
 
#define PAYLOAD_OFFSET   0x1000
 
#define ISP1760_FLAG_BUS_WIDTH_16   0x00000002 /* 16-bit data bus width */
 
#define ISP1760_FLAG_OTG_EN   0x00000004 /* Port 1 supports OTG */
 
#define ISP1760_FLAG_ANALOG_OC   0x00000008 /* Analog overcurrent */
 
#define ISP1760_FLAG_DACK_POL_HIGH   0x00000010 /* DACK active high */
 
#define ISP1760_FLAG_DREQ_POL_HIGH   0x00000020 /* DREQ active high */
 
#define ISP1760_FLAG_ISP1761   0x00000040 /* Chip is ISP1761 */
 
#define ISP1760_FLAG_INTR_POL_HIGH   0x00000080 /* Interrupt polarity active high */
 
#define ISP1760_FLAG_INTR_EDGE_TRIG   0x00000100 /* Interrupt edge triggered */
 
#define ISP1760_FLAG_RESET_ACTIVE_HIGH   0x80000000 /* RESET GPIO active high */
 
#define BLOCK_1_NUM   32
 
#define BLOCK_2_NUM   20
 
#define BLOCK_3_NUM   4
 
#define BLOCK_1_SIZE   256
 
#define BLOCK_2_SIZE   1024
 
#define BLOCK_3_SIZE   8192
 
#define BLOCKS   (BLOCK_1_NUM + BLOCK_2_NUM + BLOCK_3_NUM)
 
#define MAX_PAYLOAD_SIZE   BLOCK_3_SIZE
 
#define PAYLOAD_AREA_SIZE   0xf000
 
#define DW0_VALID_BIT   1
 
#define FROM_DW0_VALID(x)   ((x) & 0x01)
 
#define TO_DW0_LENGTH(x)   (((u32) x) << 3)
 
#define TO_DW0_MAXPACKET(x)   (((u32) x) << 18)
 
#define TO_DW0_MULTI(x)   (((u32) x) << 29)
 
#define TO_DW0_ENDPOINT(x)   (((u32) x) << 31)
 
#define TO_DW1_DEVICE_ADDR(x)   (((u32) x) << 3)
 
#define TO_DW1_PID_TOKEN(x)   (((u32) x) << 10)
 
#define DW1_TRANS_BULK   ((u32) 2 << 12)
 
#define DW1_TRANS_INT   ((u32) 3 << 12)
 
#define DW1_TRANS_SPLIT   ((u32) 1 << 14)
 
#define DW1_SE_USB_LOSPEED   ((u32) 2 << 16)
 
#define TO_DW1_PORT_NUM(x)   (((u32) x) << 18)
 
#define TO_DW1_HUB_NUM(x)   (((u32) x) << 25)
 
#define TO_DW2_DATA_START_ADDR(x)   (((u32) x) << 8)
 
#define TO_DW2_RL(x)   ((x) << 25)
 
#define FROM_DW2_RL(x)   (((x) >> 25) & 0xf)
 
#define FROM_DW3_NRBYTESTRANSFERRED(x)   ((x) & 0x7fff)
 
#define FROM_DW3_SCS_NRBYTESTRANSFERRED(x)   ((x) & 0x07ff)
 
#define TO_DW3_NAKCOUNT(x)   ((x) << 19)
 
#define FROM_DW3_NAKCOUNT(x)   (((x) >> 19) & 0xf)
 
#define TO_DW3_CERR(x)   ((x) << 23)
 
#define FROM_DW3_CERR(x)   (((x) >> 23) & 0x3)
 
#define TO_DW3_DATA_TOGGLE(x)   ((x) << 25)
 
#define FROM_DW3_DATA_TOGGLE(x)   (((x) >> 25) & 0x1)
 
#define TO_DW3_PING(x)   ((x) << 26)
 
#define FROM_DW3_PING(x)   (((x) >> 26) & 0x1)
 
#define DW3_ERROR_BIT   (1 << 28)
 
#define DW3_BABBLE_BIT   (1 << 29)
 
#define DW3_HALT_BIT   (1 << 30)
 
#define DW3_ACTIVE_BIT   (1 << 31)
 
#define FROM_DW3_ACTIVE(x)   (((x) >> 31) & 0x01)
 
#define INT_UNDERRUN   (1 << 2)
 
#define INT_BABBLE   (1 << 1)
 
#define INT_EXACT   (1 << 0)
 
#define SETUP_PID   (2)
 
#define IN_PID   (1)
 
#define OUT_PID   (0)
 
#define RL_COUNTER   (0)
 
#define NAK_COUNTER   (0)
 
#define ERR_COUNTER   (2)
 

Typedefs

typedef __u32 __bitwise __dw
 
typedef voidpacket_enqueue )(struct usb_hcd *hcd, struct isp1760_qh *qh, struct isp1760_qtd *qtd)
 

Functions

struct usb_hcd * isp1760_register (phys_addr_t res_start, resource_size_t res_len, int irq, unsigned long irqflags, int rst_gpio, struct device *dev, const char *busname, unsigned int devflags)
 
int init_kmem_once (void)
 
void deinit_kmem_cache (void)
 

Macro Definition Documentation

#define ALL_ATX_RESET   (1 << 31)

Definition at line 36 of file isp1760-hcd.h.

#define ATL_BUF_FILL   (1 << 0)

Definition at line 55 of file isp1760-hcd.h.

#define ATL_PTD_OFFSET   0x0c00

Definition at line 104 of file isp1760-hcd.h.

#define BLOCK_1_NUM   32

Definition at line 146 of file isp1760-hcd.h.

#define BLOCK_1_SIZE   256

Definition at line 150 of file isp1760-hcd.h.

#define BLOCK_2_NUM   20

Definition at line 147 of file isp1760-hcd.h.

#define BLOCK_2_SIZE   1024

Definition at line 151 of file isp1760-hcd.h.

#define BLOCK_3_NUM   4

Definition at line 148 of file isp1760-hcd.h.

#define BLOCK_3_SIZE   8192

Definition at line 152 of file isp1760-hcd.h.

#define BLOCKS   (BLOCK_1_NUM + BLOCK_2_NUM + BLOCK_3_NUM)

Definition at line 153 of file isp1760-hcd.h.

#define DELETE_URB   (0x0008)

Definition at line 86 of file isp1760-hcd.h.

#define DW0_VALID_BIT   1

Definition at line 159 of file isp1760-hcd.h.

#define DW1_SE_USB_LOSPEED   ((u32) 2 << 16)

Definition at line 171 of file isp1760-hcd.h.

#define DW1_TRANS_BULK   ((u32) 2 << 12)

Definition at line 168 of file isp1760-hcd.h.

#define DW1_TRANS_INT   ((u32) 3 << 12)

Definition at line 169 of file isp1760-hcd.h.

#define DW1_TRANS_SPLIT   ((u32) 1 << 14)

Definition at line 170 of file isp1760-hcd.h.

#define DW3_ACTIVE_BIT   (1 << 31)

Definition at line 192 of file isp1760-hcd.h.

#define DW3_BABBLE_BIT   (1 << 29)

Definition at line 190 of file isp1760-hcd.h.

#define DW3_ERROR_BIT   (1 << 28)

Definition at line 189 of file isp1760-hcd.h.

#define DW3_HALT_BIT   (1 << 30)

Definition at line 191 of file isp1760-hcd.h.

#define ERR_COUNTER   (2)

Definition at line 206 of file isp1760-hcd.h.

#define FROM_DW0_VALID (   x)    ((x) & 0x01)

Definition at line 160 of file isp1760-hcd.h.

#define FROM_DW2_RL (   x)    (((x) >> 25) & 0xf)

Definition at line 177 of file isp1760-hcd.h.

#define FROM_DW3_ACTIVE (   x)    (((x) >> 31) & 0x01)

Definition at line 193 of file isp1760-hcd.h.

#define FROM_DW3_CERR (   x)    (((x) >> 23) & 0x3)

Definition at line 184 of file isp1760-hcd.h.

#define FROM_DW3_DATA_TOGGLE (   x)    (((x) >> 25) & 0x1)

Definition at line 186 of file isp1760-hcd.h.

#define FROM_DW3_NAKCOUNT (   x)    (((x) >> 19) & 0xf)

Definition at line 182 of file isp1760-hcd.h.

#define FROM_DW3_NRBYTESTRANSFERRED (   x)    ((x) & 0x7fff)

Definition at line 179 of file isp1760-hcd.h.

#define FROM_DW3_PING (   x)    (((x) >> 26) & 0x1)

Definition at line 188 of file isp1760-hcd.h.

#define FROM_DW3_SCS_NRBYTESTRANSFERRED (   x)    ((x) & 0x07ff)

Definition at line 180 of file isp1760-hcd.h.

#define HC_ATL_INT   (1 << 8)

Definition at line 72 of file isp1760-hcd.h.

#define HC_ATL_IRQ_MASK_AND_REG   0x32C

Definition at line 83 of file isp1760-hcd.h.

#define HC_ATL_IRQ_MASK_OR_REG   0x320

Definition at line 80 of file isp1760-hcd.h.

#define HC_ATL_PTD_DONEMAP_REG   0x150

Definition at line 30 of file isp1760-hcd.h.

#define HC_ATL_PTD_LASTPTD_REG   0x158

Definition at line 32 of file isp1760-hcd.h.

#define HC_ATL_PTD_SKIPMAP_REG   0x154

Definition at line 31 of file isp1760-hcd.h.

#define HC_BUFFER_STATUS_REG   0x334

Definition at line 52 of file isp1760-hcd.h.

#define HC_CAPLENGTH   0x00

Definition at line 14 of file isp1760-hcd.h.

#define HC_CHIP_ID_REG   0x304

Definition at line 45 of file isp1760-hcd.h.

#define HC_CONFIGFLAG   0x60

Definition at line 22 of file isp1760-hcd.h.

#define HC_EOT_INT   (1 << 3)

Definition at line 74 of file isp1760-hcd.h.

#define HC_FRINDEX   0x2c

Definition at line 21 of file isp1760-hcd.h.

#define HC_HCCPARAMS   0x08

Definition at line 16 of file isp1760-hcd.h.

#define HC_HCSPARAMS   0x04

Definition at line 15 of file isp1760-hcd.h.

#define HC_HW_MODE_CTRL   0x300

Definition at line 35 of file isp1760-hcd.h.

#define HC_INT_IRQ_MASK_AND_REG   0x328

Definition at line 82 of file isp1760-hcd.h.

#define HC_INT_IRQ_MASK_OR_REG   0x31C

Definition at line 79 of file isp1760-hcd.h.

#define HC_INT_PTD_DONEMAP_REG   0x140

Definition at line 27 of file isp1760-hcd.h.

#define HC_INT_PTD_LASTPTD_REG   0x148

Definition at line 29 of file isp1760-hcd.h.

#define HC_INT_PTD_SKIPMAP_REG   0x144

Definition at line 28 of file isp1760-hcd.h.

#define HC_INTERRUPT_ENABLE   0x314

Definition at line 70 of file isp1760-hcd.h.

#define HC_INTERRUPT_REG   0x310

Definition at line 68 of file isp1760-hcd.h.

#define HC_INTL_INT   (1 << 7)

Definition at line 73 of file isp1760-hcd.h.

#define HC_ISO_INT   (1 << 9)

Definition at line 71 of file isp1760-hcd.h.

#define HC_ISO_IRQ_MASK_AND_REG   0x324

Definition at line 81 of file isp1760-hcd.h.

#define HC_ISO_IRQ_MASK_OR_REG   0x318

Definition at line 78 of file isp1760-hcd.h.

#define HC_ISO_PTD_DONEMAP_REG   0x130

Definition at line 24 of file isp1760-hcd.h.

#define HC_ISO_PTD_LASTPTD_REG   0x138

Definition at line 26 of file isp1760-hcd.h.

#define HC_ISO_PTD_SKIPMAP_REG   0x134

Definition at line 25 of file isp1760-hcd.h.

#define HC_MEMORY_REG   0x33c

Definition at line 57 of file isp1760-hcd.h.

#define HC_PORT1_CTRL   0x374

Definition at line 60 of file isp1760-hcd.h.

#define HC_PORTSC1   0x64

Definition at line 23 of file isp1760-hcd.h.

#define HC_RESET_REG   0x30c

Definition at line 48 of file isp1760-hcd.h.

#define HC_SCRATCH_REG   0x308

Definition at line 46 of file isp1760-hcd.h.

#define HC_SOT_INT   (1 << 1)

Definition at line 75 of file isp1760-hcd.h.

#define HC_USBCMD   0x20

Definition at line 19 of file isp1760-hcd.h.

#define HC_USBSTS   0x24

Definition at line 20 of file isp1760-hcd.h.

#define HW_ANA_DIGI_OC   (1 << 15)

Definition at line 37 of file isp1760-hcd.h.

#define HW_DACK_POL_HIGH   (1 << 6)

Definition at line 39 of file isp1760-hcd.h.

#define HW_DATA_BUS_32BIT   (1 << 8)

Definition at line 38 of file isp1760-hcd.h.

#define HW_DREQ_POL_HIGH   (1 << 5)

Definition at line 40 of file isp1760-hcd.h.

#define HW_GLOBAL_INTR_EN   (1 << 0)

Definition at line 43 of file isp1760-hcd.h.

#define HW_INTR_EDGE_TRIG   (1 << 1)

Definition at line 42 of file isp1760-hcd.h.

#define HW_INTR_HIGH_ACT   (1 << 2)

Definition at line 41 of file isp1760-hcd.h.

#define HW_OTG_CTRL_CLR   0x376

Definition at line 65 of file isp1760-hcd.h.

#define HW_OTG_CTRL_SET   0x374

Definition at line 64 of file isp1760-hcd.h.

#define IN_PID   (1)

Definition at line 200 of file isp1760-hcd.h.

#define INT_BABBLE   (1 << 1)

Definition at line 196 of file isp1760-hcd.h.

#define INT_BUF_FILL   (1 << 1)

Definition at line 54 of file isp1760-hcd.h.

#define INT_EXACT   (1 << 0)

Definition at line 197 of file isp1760-hcd.h.

#define INT_PTD_OFFSET   0x0800

Definition at line 103 of file isp1760-hcd.h.

#define INT_UNDERRUN   (1 << 2)

Definition at line 195 of file isp1760-hcd.h.

#define INTERRUPT_ENABLE_MASK   (HC_INTL_INT | HC_ATL_INT)

Definition at line 76 of file isp1760-hcd.h.

#define ISO_BUF_FILL   (1 << 2)

Definition at line 53 of file isp1760-hcd.h.

#define ISO_PTD_OFFSET   0x0400

Definition at line 102 of file isp1760-hcd.h.

#define ISP1760_FLAG_ANALOG_OC   0x00000008 /* Analog overcurrent */

Definition at line 124 of file isp1760-hcd.h.

#define ISP1760_FLAG_BUS_WIDTH_16   0x00000002 /* 16-bit data bus width */

Definition at line 122 of file isp1760-hcd.h.

#define ISP1760_FLAG_DACK_POL_HIGH   0x00000010 /* DACK active high */

Definition at line 125 of file isp1760-hcd.h.

#define ISP1760_FLAG_DREQ_POL_HIGH   0x00000020 /* DREQ active high */

Definition at line 126 of file isp1760-hcd.h.

#define ISP1760_FLAG_INTR_EDGE_TRIG   0x00000100 /* Interrupt edge triggered */

Definition at line 129 of file isp1760-hcd.h.

#define ISP1760_FLAG_INTR_POL_HIGH   0x00000080 /* Interrupt polarity active high */

Definition at line 128 of file isp1760-hcd.h.

#define ISP1760_FLAG_ISP1761   0x00000040 /* Chip is ISP1761 */

Definition at line 127 of file isp1760-hcd.h.

#define ISP1760_FLAG_OTG_EN   0x00000004 /* Port 1 supports OTG */

Definition at line 123 of file isp1760-hcd.h.

#define ISP1760_FLAG_RESET_ACTIVE_HIGH   0x80000000 /* RESET GPIO active high */

Definition at line 130 of file isp1760-hcd.h.

#define ISP_BANK (   x)    ((x) << 16)

Definition at line 58 of file isp1760-hcd.h.

#define MAX_PAYLOAD_SIZE   BLOCK_3_SIZE

Definition at line 154 of file isp1760-hcd.h.

#define NAK_COUNTER   (0)

Definition at line 205 of file isp1760-hcd.h.

#define NO_TRANSFER_ACTIVE   (0xffffffff)

Definition at line 87 of file isp1760-hcd.h.

#define OUT_PID   (0)

Definition at line 201 of file isp1760-hcd.h.

#define PAYLOAD_AREA_SIZE   0xf000

Definition at line 155 of file isp1760-hcd.h.

#define PAYLOAD_OFFSET   0x1000

Definition at line 105 of file isp1760-hcd.h.

#define PORT1_INIT1   (1 << 7)

Definition at line 62 of file isp1760-hcd.h.

#define PORT1_INIT2   (1 << 23)

Definition at line 63 of file isp1760-hcd.h.

#define PORT1_POWER   (3 << 3)

Definition at line 61 of file isp1760-hcd.h.

#define PTD_OFFSET   0x0400

Definition at line 101 of file isp1760-hcd.h.

#define RL_COUNTER   (0)

Definition at line 204 of file isp1760-hcd.h.

#define SETUP_PID   (2)

Definition at line 199 of file isp1760-hcd.h.

#define SW_RESET_RESET_ALL   (1 << 0)

Definition at line 50 of file isp1760-hcd.h.

#define SW_RESET_RESET_HC   (1 << 1)

Definition at line 49 of file isp1760-hcd.h.

#define TO_DW0_ENDPOINT (   x)    (((u32) x) << 31)

Definition at line 164 of file isp1760-hcd.h.

#define TO_DW0_LENGTH (   x)    (((u32) x) << 3)

Definition at line 161 of file isp1760-hcd.h.

#define TO_DW0_MAXPACKET (   x)    (((u32) x) << 18)

Definition at line 162 of file isp1760-hcd.h.

#define TO_DW0_MULTI (   x)    (((u32) x) << 29)

Definition at line 163 of file isp1760-hcd.h.

#define TO_DW1_DEVICE_ADDR (   x)    (((u32) x) << 3)

Definition at line 166 of file isp1760-hcd.h.

#define TO_DW1_HUB_NUM (   x)    (((u32) x) << 25)

Definition at line 173 of file isp1760-hcd.h.

#define TO_DW1_PID_TOKEN (   x)    (((u32) x) << 10)

Definition at line 167 of file isp1760-hcd.h.

#define TO_DW1_PORT_NUM (   x)    (((u32) x) << 18)

Definition at line 172 of file isp1760-hcd.h.

#define TO_DW2_DATA_START_ADDR (   x)    (((u32) x) << 8)

Definition at line 175 of file isp1760-hcd.h.

#define TO_DW2_RL (   x)    ((x) << 25)

Definition at line 176 of file isp1760-hcd.h.

#define TO_DW3_CERR (   x)    ((x) << 23)

Definition at line 183 of file isp1760-hcd.h.

#define TO_DW3_DATA_TOGGLE (   x)    ((x) << 25)

Definition at line 185 of file isp1760-hcd.h.

#define TO_DW3_NAKCOUNT (   x)    ((x) << 19)

Definition at line 181 of file isp1760-hcd.h.

#define TO_DW3_PING (   x)    ((x) << 26)

Definition at line 187 of file isp1760-hcd.h.

Typedef Documentation

typedef __u32 __bitwise __dw

Definition at line 90 of file isp1760-hcd.h.

typedef void( packet_enqueue)(struct usb_hcd *hcd, struct isp1760_qh *qh, struct isp1760_qtd *qtd)

Definition at line 114 of file isp1760-hcd.h.

Function Documentation

void deinit_kmem_cache ( void  )

Definition at line 2209 of file isp1760-hcd.c.

int init_kmem_once ( void  )

Definition at line 2182 of file isp1760-hcd.c.

struct usb_hcd* isp1760_register ( phys_addr_t  res_start,
resource_size_t  res_len,
int  irq,
unsigned long  irqflags,
int  rst_gpio,
struct device dev,
const char busname,
unsigned int  devflags 
)
read

Definition at line 2216 of file isp1760-hcd.c.