Go to the documentation of this file.
37 #define HW_REV_REG 0xC004
43 #define USB_CTL_REG(x) ((x) ? 0xC0AA : 0xC08A)
45 #define LOW_SPEED_PORT(x) ((x) ? 0x0800 : 0x0400)
46 #define HOST_MODE 0x0200
47 #define PORT_RES_EN(x) ((x) ? 0x0100 : 0x0080)
48 #define SOF_EOP_EN(x) ((x) ? 0x0002 : 0x0001)
51 #define USB_STAT_REG(x) ((x) ? 0xC0B0 : 0xC090)
53 #define EP0_IRQ_FLG 0x0001
54 #define EP1_IRQ_FLG 0x0002
55 #define EP2_IRQ_FLG 0x0004
56 #define EP3_IRQ_FLG 0x0008
57 #define EP4_IRQ_FLG 0x0010
58 #define EP5_IRQ_FLG 0x0020
59 #define EP6_IRQ_FLG 0x0040
60 #define EP7_IRQ_FLG 0x0080
61 #define RESET_IRQ_FLG 0x0100
62 #define SOF_EOP_IRQ_FLG 0x0200
63 #define ID_IRQ_FLG 0x4000
64 #define VBUS_IRQ_FLG 0x8000
70 #define HOST_CTL_REG(x) ((x) ? 0xC0A0 : 0xC080)
72 #define PREAMBLE_EN 0x0080
73 #define SEQ_SEL 0x0040
78 #define HOST_IRQ_EN_REG(x) ((x) ? 0xC0AC : 0xC08C)
80 #define SOF_EOP_IRQ_EN 0x0200
81 #define SOF_EOP_TMOUT_IRQ_EN 0x0800
82 #define ID_IRQ_EN 0x4000
83 #define VBUS_IRQ_EN 0x8000
84 #define DONE_IRQ_EN 0x0001
87 #define HOST_STAT_MASK 0x02FD
88 #define PORT_CONNECT_CHANGE(x) ((x) ? 0x0020 : 0x0010)
89 #define PORT_SE0_STATUS(x) ((x) ? 0x0008 : 0x0004)
92 #define HOST_FRAME_REG(x) ((x) ? 0xC0B6 : 0xC096)
94 #define HOST_FRAME_MASK 0x07FF
100 #define DEVICE_N_PORT_SEL(x) ((x) ? 0xC0A4 : 0xC084)
103 #define DEVICE_N_IRQ_EN_REG(x) ((x) ? 0xC0AC : 0xC08C)
105 #define DEVICE_N_ENDPOINT_N_CTL_REG(dev, ep) ((dev) \
106 ? (0x0280 + (ep << 4)) \
107 : (0x0200 + (ep << 4)))
108 #define DEVICE_N_ENDPOINT_N_STAT_REG(dev, ep) ((dev) \
109 ? (0x0286 + (ep << 4)) \
110 : (0x0206 + (ep << 4)))
112 #define DEVICE_N_ADDRESS(dev) ((dev) ? (0xC0AE) : (0xC08E))
118 #define SOFEOP_FLG(x) (1 << ((x) ? 12 : 10))
119 #define SIEMSG_FLG(x) (1 << (4 + (x)))
120 #define RESET_FLG(x) ((x) ? 0x0200 : 0x0002)
121 #define DONE_FLG(x) (1 << (2 + (x)))
122 #define RESUME_FLG(x) (1 << (6 + (x)))
123 #define MBX_OUT_FLG 0x0001
124 #define MBX_IN_FLG 0x0100
125 #define ID_FLG 0x4000
126 #define VBUS_FLG 0x8000
129 #define HPI_IRQ_ROUTING_REG 0x0142
131 #define HPI_SWAP_ENABLE(x) ((x) ? 0x0100 : 0x0001)
132 #define RESET_TO_HPI_ENABLE(x) ((x) ? 0x0200 : 0x0002)
133 #define DONE_TO_HPI_ENABLE(x) ((x) ? 0x0008 : 0x0004)
134 #define RESUME_TO_HPI_ENABLE(x) ((x) ? 0x0080 : 0x0040)
135 #define SOFEOP_TO_HPI_EN(x) ((x) ? 0x2000 : 0x0800)
136 #define SOFEOP_TO_CPU_EN(x) ((x) ? 0x1000 : 0x0400)
137 #define ID_TO_HPI_ENABLE 0x4000
138 #define VBUS_TO_HPI_ENABLE 0x8000
141 #define SIEMSG_REG(x) ((x) ? 0x0148 : 0x0144)
143 #define HUSB_TDListDone 0x1000
145 #define SUSB_EP0_MSG 0x0001
146 #define SUSB_EP1_MSG 0x0002
147 #define SUSB_EP2_MSG 0x0004
148 #define SUSB_EP3_MSG 0x0008
149 #define SUSB_EP4_MSG 0x0010
150 #define SUSB_EP5_MSG 0x0020
151 #define SUSB_EP6_MSG 0x0040
152 #define SUSB_EP7_MSG 0x0080
153 #define SUSB_RST_MSG 0x0100
154 #define SUSB_SOF_MSG 0x0200
155 #define SUSB_CFG_MSG 0x0400
156 #define SUSB_SUS_MSG 0x0800
157 #define SUSB_ID_MSG 0x4000
158 #define SUSB_VBUS_MSG 0x8000
162 #define SUSBx_RECEIVE_INT(x) ((x) ? 97 : 81)
163 #define SUSBx_SEND_INT(x) ((x) ? 96 : 80)
165 #define SUSBx_DEV_DESC_VEC(x) ((x) ? 0x00D4 : 0x00B4)
166 #define SUSBx_CONF_DESC_VEC(x) ((x) ? 0x00D6 : 0x00B6)
167 #define SUSBx_STRING_DESC_VEC(x) ((x) ? 0x00D8 : 0x00B8)
169 #define CY_HCD_BUF_ADDR 0x500
170 #define SIE_TD_SIZE 0x200
171 #define SIE_TD_BUF_SIZE 0x400
173 #define SIE_TD_OFFSET(host) ((host) ? (SIE_TD_SIZE+SIE_TD_BUF_SIZE) : 0)
174 #define SIE_BUF_OFFSET(host) (SIE_TD_OFFSET(host) + SIE_TD_SIZE)
177 #define CY_UDC_REQ_HEADER_BASE 0x1100
179 #define CY_UDC_REQ_HEADER_SIZE 8
181 #define CY_UDC_REQ_HEADER_ADDR(ep_num) (CY_UDC_REQ_HEADER_BASE + \
182 ((ep_num) * CY_UDC_REQ_HEADER_SIZE))
183 #define CY_UDC_DESC_BASE_ADDRESS (CY_UDC_REQ_HEADER_ADDR(8))
185 #define CY_UDC_BIOS_REPLACE_BASE 0x1800
186 #define CY_UDC_REQ_BUFFER_BASE 0x2000
187 #define CY_UDC_REQ_BUFFER_SIZE 0x0400
188 #define CY_UDC_REQ_BUFFER_ADDR(ep_num) (CY_UDC_REQ_BUFFER_BASE + \
189 ((ep_num) * CY_UDC_REQ_BUFFER_SIZE))
218 #define sie_dev(s) (&(s)->dev->pdev->dev)
240 #define C67X00_SIES 2
241 #define C67X00_PORTS 2
273 void *
data,
int len);
275 void *
data,
int len);