atl2.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /* atl2.h -- atl2 driver definitions
  3. *
  4. * Copyright(c) 2007 Atheros Corporation. All rights reserved.
  5. * Copyright(c) 2006 xiong huang <xiong.huang@atheros.com>
  6. * Copyright(c) 2007 Chris Snook <csnook@redhat.com>
  7. *
  8. * Derived from Intel e1000 driver
  9. * Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved.
  10. */
  11. #ifndef _ATL2_H_
  12. #define _ATL2_H_
  13. #include <linux/atomic.h>
  14. #include <linux/netdevice.h>
  15. #ifndef _ATL2_HW_H_
  16. #define _ATL2_HW_H_
  17. #ifndef _ATL2_OSDEP_H_
  18. #define _ATL2_OSDEP_H_
  19. #include <linux/pci.h>
  20. #include <linux/delay.h>
  21. #include <linux/interrupt.h>
  22. #include <linux/if_ether.h>
  23. #include "atlx.h"
  24. #ifdef ETHTOOL_OPS_COMPAT
  25. int ethtool_ioctl(struct ifreq *ifr);
  26. #endif
  27. #define PCI_COMMAND_REGISTER PCI_COMMAND
  28. #define CMD_MEM_WRT_INVALIDATE PCI_COMMAND_INVALIDATE
  29. #define ATL2_WRITE_REG(a, reg, value) (iowrite32((value), \
  30. ((a)->hw_addr + (reg))))
  31. #define ATL2_WRITE_FLUSH(a) (ioread32((a)->hw_addr))
  32. #define ATL2_READ_REG(a, reg) (ioread32((a)->hw_addr + (reg)))
  33. #define ATL2_WRITE_REGB(a, reg, value) (iowrite8((value), \
  34. ((a)->hw_addr + (reg))))
  35. #define ATL2_READ_REGB(a, reg) (ioread8((a)->hw_addr + (reg)))
  36. #define ATL2_WRITE_REGW(a, reg, value) (iowrite16((value), \
  37. ((a)->hw_addr + (reg))))
  38. #define ATL2_READ_REGW(a, reg) (ioread16((a)->hw_addr + (reg)))
  39. #define ATL2_WRITE_REG_ARRAY(a, reg, offset, value) \
  40. (iowrite32((value), (((a)->hw_addr + (reg)) + ((offset) << 2))))
  41. #define ATL2_READ_REG_ARRAY(a, reg, offset) \
  42. (ioread32(((a)->hw_addr + (reg)) + ((offset) << 2)))
  43. #endif /* _ATL2_OSDEP_H_ */
  44. struct atl2_adapter;
  45. struct atl2_hw;
  46. /* function prototype */
  47. static s32 atl2_reset_hw(struct atl2_hw *hw);
  48. static s32 atl2_read_mac_addr(struct atl2_hw *hw);
  49. static s32 atl2_init_hw(struct atl2_hw *hw);
  50. static s32 atl2_get_speed_and_duplex(struct atl2_hw *hw, u16 *speed,
  51. u16 *duplex);
  52. static u32 atl2_hash_mc_addr(struct atl2_hw *hw, u8 *mc_addr);
  53. static void atl2_hash_set(struct atl2_hw *hw, u32 hash_value);
  54. static s32 atl2_read_phy_reg(struct atl2_hw *hw, u16 reg_addr, u16 *phy_data);
  55. static s32 atl2_write_phy_reg(struct atl2_hw *hw, u32 reg_addr, u16 phy_data);
  56. static void atl2_read_pci_cfg(struct atl2_hw *hw, u32 reg, u16 *value);
  57. static void atl2_write_pci_cfg(struct atl2_hw *hw, u32 reg, u16 *value);
  58. static void atl2_set_mac_addr(struct atl2_hw *hw);
  59. static bool atl2_read_eeprom(struct atl2_hw *hw, u32 Offset, u32 *pValue);
  60. static bool atl2_write_eeprom(struct atl2_hw *hw, u32 offset, u32 value);
  61. static s32 atl2_phy_init(struct atl2_hw *hw);
  62. static int atl2_check_eeprom_exist(struct atl2_hw *hw);
  63. static void atl2_force_ps(struct atl2_hw *hw);
  64. /* register definition */
  65. /* Block IDLE Status Register */
  66. #define IDLE_STATUS_RXMAC 1 /* 1: RXMAC is non-IDLE */
  67. #define IDLE_STATUS_TXMAC 2 /* 1: TXMAC is non-IDLE */
  68. #define IDLE_STATUS_DMAR 8 /* 1: DMAR is non-IDLE */
  69. #define IDLE_STATUS_DMAW 4 /* 1: DMAW is non-IDLE */
  70. /* MDIO Control Register */
  71. #define MDIO_WAIT_TIMES 10
  72. /* MAC Control Register */
  73. #define MAC_CTRL_DBG_TX_BKPRESURE 0x100000 /* 1: TX max backoff */
  74. #define MAC_CTRL_MACLP_CLK_PHY 0x8000000 /* 1: 25MHz from phy */
  75. #define MAC_CTRL_HALF_LEFT_BUF_SHIFT 28
  76. #define MAC_CTRL_HALF_LEFT_BUF_MASK 0xF /* MAC retry buf x32B */
  77. /* Internal SRAM Partition Register */
  78. #define REG_SRAM_TXRAM_END 0x1500 /* Internal tail address of TXRAM
  79. * default: 2byte*1024 */
  80. #define REG_SRAM_RXRAM_END 0x1502 /* Internal tail address of RXRAM
  81. * default: 2byte*1024 */
  82. /* Descriptor Control register */
  83. #define REG_TXD_BASE_ADDR_LO 0x1544 /* The base address of the Transmit
  84. * Data Mem low 32-bit(dword align) */
  85. #define REG_TXD_MEM_SIZE 0x1548 /* Transmit Data Memory size(by
  86. * double word , max 256KB) */
  87. #define REG_TXS_BASE_ADDR_LO 0x154C /* The base address of the Transmit
  88. * Status Memory low 32-bit(dword word
  89. * align) */
  90. #define REG_TXS_MEM_SIZE 0x1550 /* double word unit, max 4*2047
  91. * bytes. */
  92. #define REG_RXD_BASE_ADDR_LO 0x1554 /* The base address of the Transmit
  93. * Status Memory low 32-bit(unit 8
  94. * bytes) */
  95. #define REG_RXD_BUF_NUM 0x1558 /* Receive Data & Status Memory buffer
  96. * number (unit 1536bytes, max
  97. * 1536*2047) */
  98. /* DMAR Control Register */
  99. #define REG_DMAR 0x1580
  100. #define DMAR_EN 0x1 /* 1: Enable DMAR */
  101. /* TX Cur-Through (early tx threshold) Control Register */
  102. #define REG_TX_CUT_THRESH 0x1590 /* TxMac begin transmit packet
  103. * threshold(unit word) */
  104. /* DMAW Control Register */
  105. #define REG_DMAW 0x15A0
  106. #define DMAW_EN 0x1
  107. /* Flow control register */
  108. #define REG_PAUSE_ON_TH 0x15A8 /* RXD high watermark of overflow
  109. * threshold configuration register */
  110. #define REG_PAUSE_OFF_TH 0x15AA /* RXD lower watermark of overflow
  111. * threshold configuration register */
  112. /* Mailbox Register */
  113. #define REG_MB_TXD_WR_IDX 0x15f0 /* double word align */
  114. #define REG_MB_RXD_RD_IDX 0x15F4 /* RXD Read index (unit: 1536byets) */
  115. /* Interrupt Status Register */
  116. #define ISR_TIMER 1 /* Interrupt when Timer counts down to zero */
  117. #define ISR_MANUAL 2 /* Software manual interrupt, for debug. Set
  118. * when SW_MAN_INT_EN is set in Table 51
  119. * Selene Master Control Register
  120. * (Offset 0x1400). */
  121. #define ISR_RXF_OV 4 /* RXF overflow interrupt */
  122. #define ISR_TXF_UR 8 /* TXF underrun interrupt */
  123. #define ISR_TXS_OV 0x10 /* Internal transmit status buffer full
  124. * interrupt */
  125. #define ISR_RXS_OV 0x20 /* Internal receive status buffer full
  126. * interrupt */
  127. #define ISR_LINK_CHG 0x40 /* Link Status Change Interrupt */
  128. #define ISR_HOST_TXD_UR 0x80
  129. #define ISR_HOST_RXD_OV 0x100 /* Host rx data memory full , one pulse */
  130. #define ISR_DMAR_TO_RST 0x200 /* DMAR op timeout interrupt. SW should
  131. * do Reset */
  132. #define ISR_DMAW_TO_RST 0x400
  133. #define ISR_PHY 0x800 /* phy interrupt */
  134. #define ISR_TS_UPDATE 0x10000 /* interrupt after new tx pkt status written
  135. * to host */
  136. #define ISR_RS_UPDATE 0x20000 /* interrupt ater new rx pkt status written
  137. * to host. */
  138. #define ISR_TX_EARLY 0x40000 /* interrupt when txmac begin transmit one
  139. * packet */
  140. #define ISR_TX_EVENT (ISR_TXF_UR | ISR_TXS_OV | ISR_HOST_TXD_UR |\
  141. ISR_TS_UPDATE | ISR_TX_EARLY)
  142. #define ISR_RX_EVENT (ISR_RXF_OV | ISR_RXS_OV | ISR_HOST_RXD_OV |\
  143. ISR_RS_UPDATE)
  144. #define IMR_NORMAL_MASK (\
  145. /*ISR_LINK_CHG |*/\
  146. ISR_MANUAL |\
  147. ISR_DMAR_TO_RST |\
  148. ISR_DMAW_TO_RST |\
  149. ISR_PHY |\
  150. ISR_PHY_LINKDOWN |\
  151. ISR_TS_UPDATE |\
  152. ISR_RS_UPDATE)
  153. /* Receive MAC Statistics Registers */
  154. #define REG_STS_RX_PAUSE 0x1700 /* Num pause packets received */
  155. #define REG_STS_RXD_OV 0x1704 /* Num frames dropped due to RX
  156. * FIFO overflow */
  157. #define REG_STS_RXS_OV 0x1708 /* Num frames dropped due to RX
  158. * Status Buffer Overflow */
  159. #define REG_STS_RX_FILTER 0x170C /* Num packets dropped due to
  160. * address filtering */
  161. /* MII definitions */
  162. /* PHY Common Register */
  163. #define MII_SMARTSPEED 0x14
  164. #define MII_DBG_ADDR 0x1D
  165. #define MII_DBG_DATA 0x1E
  166. /* PCI Command Register Bit Definitions */
  167. #define PCI_REG_COMMAND 0x04
  168. #define CMD_IO_SPACE 0x0001
  169. #define CMD_MEMORY_SPACE 0x0002
  170. #define CMD_BUS_MASTER 0x0004
  171. #define MEDIA_TYPE_100M_FULL 1
  172. #define MEDIA_TYPE_100M_HALF 2
  173. #define MEDIA_TYPE_10M_FULL 3
  174. #define MEDIA_TYPE_10M_HALF 4
  175. #define AUTONEG_ADVERTISE_SPEED_DEFAULT 0x000F /* Everything */
  176. /* The size (in bytes) of a ethernet packet */
  177. #define MAXIMUM_ETHERNET_FRAME_SIZE 1518 /* with FCS */
  178. #define MINIMUM_ETHERNET_FRAME_SIZE 64 /* with FCS */
  179. #define MAX_JUMBO_FRAME_SIZE 0x2000
  180. struct tx_pkt_header {
  181. unsigned pkt_size:11;
  182. unsigned:4; /* reserved */
  183. unsigned ins_vlan:1; /* txmac should insert vlan */
  184. unsigned short vlan; /* vlan tag */
  185. };
  186. /* FIXME: replace above bitfields with MASK/SHIFT defines below */
  187. #define TX_PKT_HEADER_SIZE_MASK 0x7FF
  188. #define TX_PKT_HEADER_SIZE_SHIFT 0
  189. #define TX_PKT_HEADER_INS_VLAN_MASK 0x1
  190. #define TX_PKT_HEADER_INS_VLAN_SHIFT 15
  191. #define TX_PKT_HEADER_VLAN_TAG_MASK 0xFFFF
  192. #define TX_PKT_HEADER_VLAN_TAG_SHIFT 16
  193. struct tx_pkt_status {
  194. unsigned pkt_size:11;
  195. unsigned:5; /* reserved */
  196. unsigned ok:1; /* current packet transmitted without error */
  197. unsigned bcast:1; /* broadcast packet */
  198. unsigned mcast:1; /* multicast packet */
  199. unsigned pause:1; /* transmiited a pause frame */
  200. unsigned ctrl:1;
  201. unsigned defer:1; /* current packet is xmitted with defer */
  202. unsigned exc_defer:1;
  203. unsigned single_col:1;
  204. unsigned multi_col:1;
  205. unsigned late_col:1;
  206. unsigned abort_col:1;
  207. unsigned underrun:1; /* current packet is aborted
  208. * due to txram underrun */
  209. unsigned:3; /* reserved */
  210. unsigned update:1; /* always 1'b1 in tx_status_buf */
  211. };
  212. /* FIXME: replace above bitfields with MASK/SHIFT defines below */
  213. #define TX_PKT_STATUS_SIZE_MASK 0x7FF
  214. #define TX_PKT_STATUS_SIZE_SHIFT 0
  215. #define TX_PKT_STATUS_OK_MASK 0x1
  216. #define TX_PKT_STATUS_OK_SHIFT 16
  217. #define TX_PKT_STATUS_BCAST_MASK 0x1
  218. #define TX_PKT_STATUS_BCAST_SHIFT 17
  219. #define TX_PKT_STATUS_MCAST_MASK 0x1
  220. #define TX_PKT_STATUS_MCAST_SHIFT 18
  221. #define TX_PKT_STATUS_PAUSE_MASK 0x1
  222. #define TX_PKT_STATUS_PAUSE_SHIFT 19
  223. #define TX_PKT_STATUS_CTRL_MASK 0x1
  224. #define TX_PKT_STATUS_CTRL_SHIFT 20
  225. #define TX_PKT_STATUS_DEFER_MASK 0x1
  226. #define TX_PKT_STATUS_DEFER_SHIFT 21
  227. #define TX_PKT_STATUS_EXC_DEFER_MASK 0x1
  228. #define TX_PKT_STATUS_EXC_DEFER_SHIFT 22
  229. #define TX_PKT_STATUS_SINGLE_COL_MASK 0x1
  230. #define TX_PKT_STATUS_SINGLE_COL_SHIFT 23
  231. #define TX_PKT_STATUS_MULTI_COL_MASK 0x1
  232. #define TX_PKT_STATUS_MULTI_COL_SHIFT 24
  233. #define TX_PKT_STATUS_LATE_COL_MASK 0x1
  234. #define TX_PKT_STATUS_LATE_COL_SHIFT 25
  235. #define TX_PKT_STATUS_ABORT_COL_MASK 0x1
  236. #define TX_PKT_STATUS_ABORT_COL_SHIFT 26
  237. #define TX_PKT_STATUS_UNDERRUN_MASK 0x1
  238. #define TX_PKT_STATUS_UNDERRUN_SHIFT 27
  239. #define TX_PKT_STATUS_UPDATE_MASK 0x1
  240. #define TX_PKT_STATUS_UPDATE_SHIFT 31
  241. struct rx_pkt_status {
  242. unsigned pkt_size:11; /* packet size, max 2047 bytes */
  243. unsigned:5; /* reserved */
  244. unsigned ok:1; /* current packet received ok without error */
  245. unsigned bcast:1; /* current packet is broadcast */
  246. unsigned mcast:1; /* current packet is multicast */
  247. unsigned pause:1;
  248. unsigned ctrl:1;
  249. unsigned crc:1; /* received a packet with crc error */
  250. unsigned code:1; /* received a packet with code error */
  251. unsigned runt:1; /* received a packet less than 64 bytes
  252. * with good crc */
  253. unsigned frag:1; /* received a packet less than 64 bytes
  254. * with bad crc */
  255. unsigned trunc:1; /* current frame truncated due to rxram full */
  256. unsigned align:1; /* this packet is alignment error */
  257. unsigned vlan:1; /* this packet has vlan */
  258. unsigned:3; /* reserved */
  259. unsigned update:1;
  260. unsigned short vtag; /* vlan tag */
  261. unsigned:16;
  262. };
  263. /* FIXME: replace above bitfields with MASK/SHIFT defines below */
  264. #define RX_PKT_STATUS_SIZE_MASK 0x7FF
  265. #define RX_PKT_STATUS_SIZE_SHIFT 0
  266. #define RX_PKT_STATUS_OK_MASK 0x1
  267. #define RX_PKT_STATUS_OK_SHIFT 16
  268. #define RX_PKT_STATUS_BCAST_MASK 0x1
  269. #define RX_PKT_STATUS_BCAST_SHIFT 17
  270. #define RX_PKT_STATUS_MCAST_MASK 0x1
  271. #define RX_PKT_STATUS_MCAST_SHIFT 18
  272. #define RX_PKT_STATUS_PAUSE_MASK 0x1
  273. #define RX_PKT_STATUS_PAUSE_SHIFT 19
  274. #define RX_PKT_STATUS_CTRL_MASK 0x1
  275. #define RX_PKT_STATUS_CTRL_SHIFT 20
  276. #define RX_PKT_STATUS_CRC_MASK 0x1
  277. #define RX_PKT_STATUS_CRC_SHIFT 21
  278. #define RX_PKT_STATUS_CODE_MASK 0x1
  279. #define RX_PKT_STATUS_CODE_SHIFT 22
  280. #define RX_PKT_STATUS_RUNT_MASK 0x1
  281. #define RX_PKT_STATUS_RUNT_SHIFT 23
  282. #define RX_PKT_STATUS_FRAG_MASK 0x1
  283. #define RX_PKT_STATUS_FRAG_SHIFT 24
  284. #define RX_PKT_STATUS_TRUNK_MASK 0x1
  285. #define RX_PKT_STATUS_TRUNK_SHIFT 25
  286. #define RX_PKT_STATUS_ALIGN_MASK 0x1
  287. #define RX_PKT_STATUS_ALIGN_SHIFT 26
  288. #define RX_PKT_STATUS_VLAN_MASK 0x1
  289. #define RX_PKT_STATUS_VLAN_SHIFT 27
  290. #define RX_PKT_STATUS_UPDATE_MASK 0x1
  291. #define RX_PKT_STATUS_UPDATE_SHIFT 31
  292. #define RX_PKT_STATUS_VLAN_TAG_MASK 0xFFFF
  293. #define RX_PKT_STATUS_VLAN_TAG_SHIFT 32
  294. struct rx_desc {
  295. struct rx_pkt_status status;
  296. unsigned char packet[1536-sizeof(struct rx_pkt_status)];
  297. };
  298. enum atl2_speed_duplex {
  299. atl2_10_half = 0,
  300. atl2_10_full = 1,
  301. atl2_100_half = 2,
  302. atl2_100_full = 3
  303. };
  304. struct atl2_spi_flash_dev {
  305. const char *manu_name; /* manufacturer id */
  306. /* op-code */
  307. u8 cmdWRSR;
  308. u8 cmdREAD;
  309. u8 cmdPROGRAM;
  310. u8 cmdWREN;
  311. u8 cmdWRDI;
  312. u8 cmdRDSR;
  313. u8 cmdRDID;
  314. u8 cmdSECTOR_ERASE;
  315. u8 cmdCHIP_ERASE;
  316. };
  317. /* Structure containing variables used by the shared code (atl2_hw.c) */
  318. struct atl2_hw {
  319. u8 __iomem *hw_addr;
  320. void *back;
  321. u8 preamble_len;
  322. u8 max_retry; /* Retransmission maximum, afterwards the
  323. * packet will be discarded. */
  324. u8 jam_ipg; /* IPG to start JAM for collision based flow
  325. * control in half-duplex mode. In unit of
  326. * 8-bit time. */
  327. u8 ipgt; /* Desired back to back inter-packet gap. The
  328. * default is 96-bit time. */
  329. u8 min_ifg; /* Minimum number of IFG to enforce in between
  330. * RX frames. Frame gap below such IFP is
  331. * dropped. */
  332. u8 ipgr1; /* 64bit Carrier-Sense window */
  333. u8 ipgr2; /* 96-bit IPG window */
  334. u8 retry_buf; /* When half-duplex mode, should hold some
  335. * bytes for mac retry . (8*4bytes unit) */
  336. u16 fc_rxd_hi;
  337. u16 fc_rxd_lo;
  338. u16 lcol; /* Collision Window */
  339. u16 max_frame_size;
  340. u16 MediaType;
  341. u16 autoneg_advertised;
  342. u16 pci_cmd_word;
  343. u16 mii_autoneg_adv_reg;
  344. u32 mem_rang;
  345. u32 txcw;
  346. u32 mc_filter_type;
  347. u32 num_mc_addrs;
  348. u32 collision_delta;
  349. u32 tx_packet_delta;
  350. u16 phy_spd_default;
  351. u16 device_id;
  352. u16 vendor_id;
  353. u16 subsystem_id;
  354. u16 subsystem_vendor_id;
  355. u8 revision_id;
  356. /* spi flash */
  357. u8 flash_vendor;
  358. u8 dma_fairness;
  359. u8 mac_addr[ETH_ALEN];
  360. u8 perm_mac_addr[ETH_ALEN];
  361. /* FIXME */
  362. /* bool phy_preamble_sup; */
  363. bool phy_configured;
  364. };
  365. #endif /* _ATL2_HW_H_ */
  366. struct atl2_ring_header {
  367. /* pointer to the descriptor ring memory */
  368. void *desc;
  369. /* physical address of the descriptor ring */
  370. dma_addr_t dma;
  371. /* length of descriptor ring in bytes */
  372. unsigned int size;
  373. };
  374. /* board specific private data structure */
  375. struct atl2_adapter {
  376. /* OS defined structs */
  377. struct net_device *netdev;
  378. struct pci_dev *pdev;
  379. u32 wol;
  380. u16 link_speed;
  381. u16 link_duplex;
  382. spinlock_t stats_lock;
  383. struct work_struct reset_task;
  384. struct work_struct link_chg_task;
  385. struct timer_list watchdog_timer;
  386. struct timer_list phy_config_timer;
  387. unsigned long cfg_phy;
  388. bool mac_disabled;
  389. /* All Descriptor memory */
  390. dma_addr_t ring_dma;
  391. void *ring_vir_addr;
  392. int ring_size;
  393. struct tx_pkt_header *txd_ring;
  394. dma_addr_t txd_dma;
  395. struct tx_pkt_status *txs_ring;
  396. dma_addr_t txs_dma;
  397. struct rx_desc *rxd_ring;
  398. dma_addr_t rxd_dma;
  399. u32 txd_ring_size; /* bytes per unit */
  400. u32 txs_ring_size; /* dwords per unit */
  401. u32 rxd_ring_size; /* 1536 bytes per unit */
  402. /* read /write ptr: */
  403. /* host */
  404. u32 txd_write_ptr;
  405. u32 txs_next_clear;
  406. u32 rxd_read_ptr;
  407. /* nic */
  408. atomic_t txd_read_ptr;
  409. atomic_t txs_write_ptr;
  410. u32 rxd_write_ptr;
  411. /* Interrupt Moderator timer ( 2us resolution) */
  412. u16 imt;
  413. /* Interrupt Clear timer (2us resolution) */
  414. u16 ict;
  415. unsigned long flags;
  416. /* structs defined in atl2_hw.h */
  417. u32 bd_number; /* board number */
  418. bool pci_using_64;
  419. bool have_msi;
  420. struct atl2_hw hw;
  421. u32 usr_cmd;
  422. /* FIXME */
  423. /* u32 regs_buff[ATL2_REGS_LEN]; */
  424. u32 pci_state[16];
  425. u32 *config_space;
  426. };
  427. enum atl2_state_t {
  428. __ATL2_TESTING,
  429. __ATL2_RESETTING,
  430. __ATL2_DOWN
  431. };
  432. #endif /* _ATL2_H_ */