net2280.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. /*
  2. * NetChip 2280 high/full speed USB device controller.
  3. * Unlike many such controllers, this one talks PCI.
  4. *
  5. * Copyright (C) 2002 NetChip Technology, Inc. (http://www.netchip.com)
  6. * Copyright (C) 2003 David Brownell
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. */
  22. #ifndef __LINUX_USB_NET2280_H
  23. #define __LINUX_USB_NET2280_H
  24. /*-------------------------------------------------------------------------*/
  25. /* NET2280 MEMORY MAPPED REGISTERS
  26. *
  27. * The register layout came from the chip documentation, and the bit
  28. * number definitions were extracted from chip specification.
  29. *
  30. * Use the shift operator ('<<') to build bit masks, with readl/writel
  31. * to access the registers through PCI.
  32. */
  33. /* main registers, BAR0 + 0x0000 */
  34. struct net2280_regs {
  35. /* offset 0x0000 */
  36. u32 devinit;
  37. #define LOCAL_CLOCK_FREQUENCY 8
  38. #define FORCE_PCI_RESET 7
  39. #define PCI_ID 6
  40. #define PCI_ENABLE 5
  41. #define FIFO_SOFT_RESET 4
  42. #define CFG_SOFT_RESET 3
  43. #define PCI_SOFT_RESET 2
  44. #define USB_SOFT_RESET 1
  45. #define M8051_RESET 0
  46. u32 eectl;
  47. #define EEPROM_ADDRESS_WIDTH 23
  48. #define EEPROM_CHIP_SELECT_ACTIVE 22
  49. #define EEPROM_PRESENT 21
  50. #define EEPROM_VALID 20
  51. #define EEPROM_BUSY 19
  52. #define EEPROM_CHIP_SELECT_ENABLE 18
  53. #define EEPROM_BYTE_READ_START 17
  54. #define EEPROM_BYTE_WRITE_START 16
  55. #define EEPROM_READ_DATA 8
  56. #define EEPROM_WRITE_DATA 0
  57. u32 eeclkfreq;
  58. u32 _unused0;
  59. /* offset 0x0010 */
  60. u32 pciirqenb0; /* interrupt PCI master ... */
  61. #define SETUP_PACKET_INTERRUPT_ENABLE 7
  62. #define ENDPOINT_F_INTERRUPT_ENABLE 6
  63. #define ENDPOINT_E_INTERRUPT_ENABLE 5
  64. #define ENDPOINT_D_INTERRUPT_ENABLE 4
  65. #define ENDPOINT_C_INTERRUPT_ENABLE 3
  66. #define ENDPOINT_B_INTERRUPT_ENABLE 2
  67. #define ENDPOINT_A_INTERRUPT_ENABLE 1
  68. #define ENDPOINT_0_INTERRUPT_ENABLE 0
  69. u32 pciirqenb1;
  70. #define PCI_INTERRUPT_ENABLE 31
  71. #define POWER_STATE_CHANGE_INTERRUPT_ENABLE 27
  72. #define PCI_ARBITER_TIMEOUT_INTERRUPT_ENABLE 26
  73. #define PCI_PARITY_ERROR_INTERRUPT_ENABLE 25
  74. #define PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE 20
  75. #define PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE 19
  76. #define PCI_TARGET_ABORT_ASSERTED_INTERRUPT_ENABLE 18
  77. #define PCI_RETRY_ABORT_INTERRUPT_ENABLE 17
  78. #define PCI_MASTER_CYCLE_DONE_INTERRUPT_ENABLE 16
  79. #define GPIO_INTERRUPT_ENABLE 13
  80. #define DMA_D_INTERRUPT_ENABLE 12
  81. #define DMA_C_INTERRUPT_ENABLE 11
  82. #define DMA_B_INTERRUPT_ENABLE 10
  83. #define DMA_A_INTERRUPT_ENABLE 9
  84. #define EEPROM_DONE_INTERRUPT_ENABLE 8
  85. #define VBUS_INTERRUPT_ENABLE 7
  86. #define CONTROL_STATUS_INTERRUPT_ENABLE 6
  87. #define ROOT_PORT_RESET_INTERRUPT_ENABLE 4
  88. #define SUSPEND_REQUEST_INTERRUPT_ENABLE 3
  89. #define SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE 2
  90. #define RESUME_INTERRUPT_ENABLE 1
  91. #define SOF_INTERRUPT_ENABLE 0
  92. u32 cpu_irqenb0; /* ... or onboard 8051 */
  93. #define SETUP_PACKET_INTERRUPT_ENABLE 7
  94. #define ENDPOINT_F_INTERRUPT_ENABLE 6
  95. #define ENDPOINT_E_INTERRUPT_ENABLE 5
  96. #define ENDPOINT_D_INTERRUPT_ENABLE 4
  97. #define ENDPOINT_C_INTERRUPT_ENABLE 3
  98. #define ENDPOINT_B_INTERRUPT_ENABLE 2
  99. #define ENDPOINT_A_INTERRUPT_ENABLE 1
  100. #define ENDPOINT_0_INTERRUPT_ENABLE 0
  101. u32 cpu_irqenb1;
  102. #define CPU_INTERRUPT_ENABLE 31
  103. #define POWER_STATE_CHANGE_INTERRUPT_ENABLE 27
  104. #define PCI_ARBITER_TIMEOUT_INTERRUPT_ENABLE 26
  105. #define PCI_PARITY_ERROR_INTERRUPT_ENABLE 25
  106. #define PCI_INTA_INTERRUPT_ENABLE 24
  107. #define PCI_PME_INTERRUPT_ENABLE 23
  108. #define PCI_SERR_INTERRUPT_ENABLE 22
  109. #define PCI_PERR_INTERRUPT_ENABLE 21
  110. #define PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE 20
  111. #define PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE 19
  112. #define PCI_RETRY_ABORT_INTERRUPT_ENABLE 17
  113. #define PCI_MASTER_CYCLE_DONE_INTERRUPT_ENABLE 16
  114. #define GPIO_INTERRUPT_ENABLE 13
  115. #define DMA_D_INTERRUPT_ENABLE 12
  116. #define DMA_C_INTERRUPT_ENABLE 11
  117. #define DMA_B_INTERRUPT_ENABLE 10
  118. #define DMA_A_INTERRUPT_ENABLE 9
  119. #define EEPROM_DONE_INTERRUPT_ENABLE 8
  120. #define VBUS_INTERRUPT_ENABLE 7
  121. #define CONTROL_STATUS_INTERRUPT_ENABLE 6
  122. #define ROOT_PORT_RESET_INTERRUPT_ENABLE 4
  123. #define SUSPEND_REQUEST_INTERRUPT_ENABLE 3
  124. #define SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE 2
  125. #define RESUME_INTERRUPT_ENABLE 1
  126. #define SOF_INTERRUPT_ENABLE 0
  127. /* offset 0x0020 */
  128. u32 _unused1;
  129. u32 usbirqenb1;
  130. #define USB_INTERRUPT_ENABLE 31
  131. #define POWER_STATE_CHANGE_INTERRUPT_ENABLE 27
  132. #define PCI_ARBITER_TIMEOUT_INTERRUPT_ENABLE 26
  133. #define PCI_PARITY_ERROR_INTERRUPT_ENABLE 25
  134. #define PCI_INTA_INTERRUPT_ENABLE 24
  135. #define PCI_PME_INTERRUPT_ENABLE 23
  136. #define PCI_SERR_INTERRUPT_ENABLE 22
  137. #define PCI_PERR_INTERRUPT_ENABLE 21
  138. #define PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE 20
  139. #define PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE 19
  140. #define PCI_RETRY_ABORT_INTERRUPT_ENABLE 17
  141. #define PCI_MASTER_CYCLE_DONE_INTERRUPT_ENABLE 16
  142. #define GPIO_INTERRUPT_ENABLE 13
  143. #define DMA_D_INTERRUPT_ENABLE 12
  144. #define DMA_C_INTERRUPT_ENABLE 11
  145. #define DMA_B_INTERRUPT_ENABLE 10
  146. #define DMA_A_INTERRUPT_ENABLE 9
  147. #define EEPROM_DONE_INTERRUPT_ENABLE 8
  148. #define VBUS_INTERRUPT_ENABLE 7
  149. #define CONTROL_STATUS_INTERRUPT_ENABLE 6
  150. #define ROOT_PORT_RESET_INTERRUPT_ENABLE 4
  151. #define SUSPEND_REQUEST_INTERRUPT_ENABLE 3
  152. #define SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE 2
  153. #define RESUME_INTERRUPT_ENABLE 1
  154. #define SOF_INTERRUPT_ENABLE 0
  155. u32 irqstat0;
  156. #define INTA_ASSERTED 12
  157. #define SETUP_PACKET_INTERRUPT 7
  158. #define ENDPOINT_F_INTERRUPT 6
  159. #define ENDPOINT_E_INTERRUPT 5
  160. #define ENDPOINT_D_INTERRUPT 4
  161. #define ENDPOINT_C_INTERRUPT 3
  162. #define ENDPOINT_B_INTERRUPT 2
  163. #define ENDPOINT_A_INTERRUPT 1
  164. #define ENDPOINT_0_INTERRUPT 0
  165. #define USB3380_IRQSTAT0_EP_INTR_MASK_IN (0xF << 17)
  166. #define USB3380_IRQSTAT0_EP_INTR_MASK_OUT (0xF << 1)
  167. u32 irqstat1;
  168. #define POWER_STATE_CHANGE_INTERRUPT 27
  169. #define PCI_ARBITER_TIMEOUT_INTERRUPT 26
  170. #define PCI_PARITY_ERROR_INTERRUPT 25
  171. #define PCI_INTA_INTERRUPT 24
  172. #define PCI_PME_INTERRUPT 23
  173. #define PCI_SERR_INTERRUPT 22
  174. #define PCI_PERR_INTERRUPT 21
  175. #define PCI_MASTER_ABORT_RECEIVED_INTERRUPT 20
  176. #define PCI_TARGET_ABORT_RECEIVED_INTERRUPT 19
  177. #define PCI_RETRY_ABORT_INTERRUPT 17
  178. #define PCI_MASTER_CYCLE_DONE_INTERRUPT 16
  179. #define SOF_DOWN_INTERRUPT 14
  180. #define GPIO_INTERRUPT 13
  181. #define DMA_D_INTERRUPT 12
  182. #define DMA_C_INTERRUPT 11
  183. #define DMA_B_INTERRUPT 10
  184. #define DMA_A_INTERRUPT 9
  185. #define EEPROM_DONE_INTERRUPT 8
  186. #define VBUS_INTERRUPT 7
  187. #define CONTROL_STATUS_INTERRUPT 6
  188. #define ROOT_PORT_RESET_INTERRUPT 4
  189. #define SUSPEND_REQUEST_INTERRUPT 3
  190. #define SUSPEND_REQUEST_CHANGE_INTERRUPT 2
  191. #define RESUME_INTERRUPT 1
  192. #define SOF_INTERRUPT 0
  193. /* offset 0x0030 */
  194. u32 idxaddr;
  195. u32 idxdata;
  196. u32 fifoctl;
  197. #define PCI_BASE2_RANGE 16
  198. #define IGNORE_FIFO_AVAILABILITY 3
  199. #define PCI_BASE2_SELECT 2
  200. #define FIFO_CONFIGURATION_SELECT 0
  201. u32 _unused2;
  202. /* offset 0x0040 */
  203. u32 memaddr;
  204. #define START 28
  205. #define DIRECTION 27
  206. #define FIFO_DIAGNOSTIC_SELECT 24
  207. #define MEMORY_ADDRESS 0
  208. u32 memdata0;
  209. u32 memdata1;
  210. u32 _unused3;
  211. /* offset 0x0050 */
  212. u32 gpioctl;
  213. #define GPIO3_LED_SELECT 12
  214. #define GPIO3_INTERRUPT_ENABLE 11
  215. #define GPIO2_INTERRUPT_ENABLE 10
  216. #define GPIO1_INTERRUPT_ENABLE 9
  217. #define GPIO0_INTERRUPT_ENABLE 8
  218. #define GPIO3_OUTPUT_ENABLE 7
  219. #define GPIO2_OUTPUT_ENABLE 6
  220. #define GPIO1_OUTPUT_ENABLE 5
  221. #define GPIO0_OUTPUT_ENABLE 4
  222. #define GPIO3_DATA 3
  223. #define GPIO2_DATA 2
  224. #define GPIO1_DATA 1
  225. #define GPIO0_DATA 0
  226. u32 gpiostat;
  227. #define GPIO3_INTERRUPT 3
  228. #define GPIO2_INTERRUPT 2
  229. #define GPIO1_INTERRUPT 1
  230. #define GPIO0_INTERRUPT 0
  231. } __attribute__ ((packed));
  232. /* usb control, BAR0 + 0x0080 */
  233. struct net2280_usb_regs {
  234. /* offset 0x0080 */
  235. u32 stdrsp;
  236. #define STALL_UNSUPPORTED_REQUESTS 31
  237. #define SET_TEST_MODE 16
  238. #define GET_OTHER_SPEED_CONFIGURATION 15
  239. #define GET_DEVICE_QUALIFIER 14
  240. #define SET_ADDRESS 13
  241. #define ENDPOINT_SET_CLEAR_HALT 12
  242. #define DEVICE_SET_CLEAR_DEVICE_REMOTE_WAKEUP 11
  243. #define GET_STRING_DESCRIPTOR_2 10
  244. #define GET_STRING_DESCRIPTOR_1 9
  245. #define GET_STRING_DESCRIPTOR_0 8
  246. #define GET_SET_INTERFACE 6
  247. #define GET_SET_CONFIGURATION 5
  248. #define GET_CONFIGURATION_DESCRIPTOR 4
  249. #define GET_DEVICE_DESCRIPTOR 3
  250. #define GET_ENDPOINT_STATUS 2
  251. #define GET_INTERFACE_STATUS 1
  252. #define GET_DEVICE_STATUS 0
  253. u32 prodvendid;
  254. #define PRODUCT_ID 16
  255. #define VENDOR_ID 0
  256. u32 relnum;
  257. u32 usbctl;
  258. #define SERIAL_NUMBER_INDEX 16
  259. #define PRODUCT_ID_STRING_ENABLE 13
  260. #define VENDOR_ID_STRING_ENABLE 12
  261. #define USB_ROOT_PORT_WAKEUP_ENABLE 11
  262. #define VBUS_PIN 10
  263. #define TIMED_DISCONNECT 9
  264. #define SUSPEND_IMMEDIATELY 7
  265. #define SELF_POWERED_USB_DEVICE 6
  266. #define REMOTE_WAKEUP_SUPPORT 5
  267. #define PME_POLARITY 4
  268. #define USB_DETECT_ENABLE 3
  269. #define PME_WAKEUP_ENABLE 2
  270. #define DEVICE_REMOTE_WAKEUP_ENABLE 1
  271. #define SELF_POWERED_STATUS 0
  272. /* offset 0x0090 */
  273. u32 usbstat;
  274. #define HIGH_SPEED 7
  275. #define FULL_SPEED 6
  276. #define GENERATE_RESUME 5
  277. #define GENERATE_DEVICE_REMOTE_WAKEUP 4
  278. u32 xcvrdiag;
  279. #define FORCE_HIGH_SPEED_MODE 31
  280. #define FORCE_FULL_SPEED_MODE 30
  281. #define USB_TEST_MODE 24
  282. #define LINE_STATE 16
  283. #define TRANSCEIVER_OPERATION_MODE 2
  284. #define TRANSCEIVER_SELECT 1
  285. #define TERMINATION_SELECT 0
  286. u32 setup0123;
  287. u32 setup4567;
  288. /* offset 0x0090 */
  289. u32 _unused0;
  290. u32 ouraddr;
  291. #define FORCE_IMMEDIATE 7
  292. #define OUR_USB_ADDRESS 0
  293. u32 ourconfig;
  294. } __attribute__ ((packed));
  295. /* pci control, BAR0 + 0x0100 */
  296. struct net2280_pci_regs {
  297. /* offset 0x0100 */
  298. u32 pcimstctl;
  299. #define PCI_ARBITER_PARK_SELECT 13
  300. #define PCI_MULTI LEVEL_ARBITER 12
  301. #define PCI_RETRY_ABORT_ENABLE 11
  302. #define DMA_MEMORY_WRITE_AND_INVALIDATE_ENABLE 10
  303. #define DMA_READ_MULTIPLE_ENABLE 9
  304. #define DMA_READ_LINE_ENABLE 8
  305. #define PCI_MASTER_COMMAND_SELECT 6
  306. #define MEM_READ_OR_WRITE 0
  307. #define IO_READ_OR_WRITE 1
  308. #define CFG_READ_OR_WRITE 2
  309. #define PCI_MASTER_START 5
  310. #define PCI_MASTER_READ_WRITE 4
  311. #define PCI_MASTER_WRITE 0
  312. #define PCI_MASTER_READ 1
  313. #define PCI_MASTER_BYTE_WRITE_ENABLES 0
  314. u32 pcimstaddr;
  315. u32 pcimstdata;
  316. u32 pcimststat;
  317. #define PCI_ARBITER_CLEAR 2
  318. #define PCI_EXTERNAL_ARBITER 1
  319. #define PCI_HOST_MODE 0
  320. } __attribute__ ((packed));
  321. /* dma control, BAR0 + 0x0180 ... array of four structs like this,
  322. * for channels 0..3. see also struct net2280_dma: descriptor
  323. * that can be loaded into some of these registers.
  324. */
  325. struct net2280_dma_regs { /* [11.7] */
  326. /* offset 0x0180, 0x01a0, 0x01c0, 0x01e0, */
  327. u32 dmactl;
  328. #define DMA_SCATTER_GATHER_DONE_INTERRUPT_ENABLE 25
  329. #define DMA_CLEAR_COUNT_ENABLE 21
  330. #define DESCRIPTOR_POLLING_RATE 19
  331. #define POLL_CONTINUOUS 0
  332. #define POLL_1_USEC 1
  333. #define POLL_100_USEC 2
  334. #define POLL_1_MSEC 3
  335. #define DMA_VALID_BIT_POLLING_ENABLE 18
  336. #define DMA_VALID_BIT_ENABLE 17
  337. #define DMA_SCATTER_GATHER_ENABLE 16
  338. #define DMA_OUT_AUTO_START_ENABLE 4
  339. #define DMA_PREEMPT_ENABLE 3
  340. #define DMA_FIFO_VALIDATE 2
  341. #define DMA_ENABLE 1
  342. #define DMA_ADDRESS_HOLD 0
  343. u32 dmastat;
  344. #define DMA_ABORT_DONE_INTERRUPT 27
  345. #define DMA_SCATTER_GATHER_DONE_INTERRUPT 25
  346. #define DMA_TRANSACTION_DONE_INTERRUPT 24
  347. #define DMA_ABORT 1
  348. #define DMA_START 0
  349. u32 _unused0[2];
  350. /* offset 0x0190, 0x01b0, 0x01d0, 0x01f0, */
  351. u32 dmacount;
  352. #define VALID_BIT 31
  353. #define DMA_DIRECTION 30
  354. #define DMA_DONE_INTERRUPT_ENABLE 29
  355. #define END_OF_CHAIN 28
  356. #define DMA_BYTE_COUNT_MASK ((1<<24)-1)
  357. #define DMA_BYTE_COUNT 0
  358. u32 dmaaddr;
  359. u32 dmadesc;
  360. u32 _unused1;
  361. } __attribute__ ((packed));
  362. /* dedicated endpoint registers, BAR0 + 0x0200 */
  363. struct net2280_dep_regs { /* [11.8] */
  364. /* offset 0x0200, 0x0210, 0x220, 0x230, 0x240 */
  365. u32 dep_cfg;
  366. /* offset 0x0204, 0x0214, 0x224, 0x234, 0x244 */
  367. u32 dep_rsp;
  368. u32 _unused[2];
  369. } __attribute__ ((packed));
  370. /* configurable endpoint registers, BAR0 + 0x0300 ... array of seven structs
  371. * like this, for ep0 then the configurable endpoints A..F
  372. * ep0 reserved for control; E and F have only 64 bytes of fifo
  373. */
  374. struct net2280_ep_regs { /* [11.9] */
  375. /* offset 0x0300, 0x0320, 0x0340, 0x0360, 0x0380, 0x03a0, 0x03c0 */
  376. u32 ep_cfg;
  377. #define ENDPOINT_BYTE_COUNT 16
  378. #define ENDPOINT_ENABLE 10
  379. #define ENDPOINT_TYPE 8
  380. #define ENDPOINT_DIRECTION 7
  381. #define ENDPOINT_NUMBER 0
  382. u32 ep_rsp;
  383. #define SET_NAK_OUT_PACKETS 15
  384. #define SET_EP_HIDE_STATUS_PHASE 14
  385. #define SET_EP_FORCE_CRC_ERROR 13
  386. #define SET_INTERRUPT_MODE 12
  387. #define SET_CONTROL_STATUS_PHASE_HANDSHAKE 11
  388. #define SET_NAK_OUT_PACKETS_MODE 10
  389. #define SET_ENDPOINT_TOGGLE 9
  390. #define SET_ENDPOINT_HALT 8
  391. #define CLEAR_NAK_OUT_PACKETS 7
  392. #define CLEAR_EP_HIDE_STATUS_PHASE 6
  393. #define CLEAR_EP_FORCE_CRC_ERROR 5
  394. #define CLEAR_INTERRUPT_MODE 4
  395. #define CLEAR_CONTROL_STATUS_PHASE_HANDSHAKE 3
  396. #define CLEAR_NAK_OUT_PACKETS_MODE 2
  397. #define CLEAR_ENDPOINT_TOGGLE 1
  398. #define CLEAR_ENDPOINT_HALT 0
  399. u32 ep_irqenb;
  400. #define SHORT_PACKET_OUT_DONE_INTERRUPT_ENABLE 6
  401. #define SHORT_PACKET_TRANSFERRED_INTERRUPT_ENABLE 5
  402. #define DATA_PACKET_RECEIVED_INTERRUPT_ENABLE 3
  403. #define DATA_PACKET_TRANSMITTED_INTERRUPT_ENABLE 2
  404. #define DATA_OUT_PING_TOKEN_INTERRUPT_ENABLE 1
  405. #define DATA_IN_TOKEN_INTERRUPT_ENABLE 0
  406. u32 ep_stat;
  407. #define FIFO_VALID_COUNT 24
  408. #define HIGH_BANDWIDTH_OUT_TRANSACTION_PID 22
  409. #define TIMEOUT 21
  410. #define USB_STALL_SENT 20
  411. #define USB_IN_NAK_SENT 19
  412. #define USB_IN_ACK_RCVD 18
  413. #define USB_OUT_PING_NAK_SENT 17
  414. #define USB_OUT_ACK_SENT 16
  415. #define FIFO_OVERFLOW 13
  416. #define FIFO_UNDERFLOW 12
  417. #define FIFO_FULL 11
  418. #define FIFO_EMPTY 10
  419. #define FIFO_FLUSH 9
  420. #define SHORT_PACKET_OUT_DONE_INTERRUPT 6
  421. #define SHORT_PACKET_TRANSFERRED_INTERRUPT 5
  422. #define NAK_OUT_PACKETS 4
  423. #define DATA_PACKET_RECEIVED_INTERRUPT 3
  424. #define DATA_PACKET_TRANSMITTED_INTERRUPT 2
  425. #define DATA_OUT_PING_TOKEN_INTERRUPT 1
  426. #define DATA_IN_TOKEN_INTERRUPT 0
  427. /* offset 0x0310, 0x0330, 0x0350, 0x0370, 0x0390, 0x03b0, 0x03d0 */
  428. u32 ep_avail;
  429. u32 ep_data;
  430. u32 _unused0[2];
  431. } __attribute__ ((packed));
  432. #endif /* __LINUX_USB_NET2280_H */