net2280.h 15 KB

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