altera_tse.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. /*
  2. * Altera 10/100/1000 triple speed ethernet mac
  3. *
  4. * Copyright (C) 2008 Altera Corporation.
  5. * Copyright (C) 2010 Thomas Chou <thomas@wytron.com.tw>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #ifndef _ALTERA_TSE_H_
  12. #define _ALTERA_TSE_H_
  13. #define __packed_1_ __attribute__ ((packed, aligned(1)))
  14. /* PHY Stuff */
  15. #define miim_end -2
  16. #define miim_read -1
  17. #define PHY_AUTONEGOTIATE_TIMEOUT 5000 /* in ms */
  18. #ifndef CONFIG_SYS_TBIPA_VALUE
  19. #define CONFIG_SYS_TBIPA_VALUE 0x1f
  20. #endif
  21. #define MIIMCFG_INIT_VALUE 0x00000003
  22. #define MIIMCFG_RESET 0x80000000
  23. #define MIIMIND_BUSY 0x00000001
  24. #define MIIMIND_NOTVALID 0x00000004
  25. #define MIIM_CONTROL 0x00
  26. #define MIIM_CONTROL_RESET 0x00009140
  27. #define MIIM_CONTROL_INIT 0x00001140
  28. #define MIIM_CONTROL_RESTART 0x00001340
  29. #define MIIM_ANEN 0x00001000
  30. #define MIIM_CR 0x00
  31. #define MIIM_CR_RST 0x00008000
  32. #define MIIM_CR_INIT 0x00001000
  33. #define MIIM_STATUS 0x1
  34. #define MIIM_STATUS_AN_DONE 0x00000020
  35. #define MIIM_STATUS_LINK 0x0004
  36. #define PHY_BMSR_AUTN_ABLE 0x0008
  37. #define PHY_BMSR_AUTN_COMP 0x0020
  38. #define MIIM_PHYIR1 0x2
  39. #define MIIM_PHYIR2 0x3
  40. #define MIIM_ANAR 0x4
  41. #define MIIM_ANAR_INIT 0x1e1
  42. #define MIIM_TBI_ANLPBPA 0x5
  43. #define MIIM_TBI_ANLPBPA_HALF 0x00000040
  44. #define MIIM_TBI_ANLPBPA_FULL 0x00000020
  45. #define MIIM_TBI_ANEX 0x6
  46. #define MIIM_TBI_ANEX_NP 0x00000004
  47. #define MIIM_TBI_ANEX_PRX 0x00000002
  48. #define MIIM_GBIT_CONTROL 0x9
  49. #define MIIM_GBIT_CONTROL_INIT 0xe00
  50. #define MIIM_EXT_PAGE_ACCESS 0x1f
  51. /* 88E1011 PHY Status Register */
  52. #define MIIM_88E1011_PHY_STATUS 0x11
  53. #define MIIM_88E1011_PHYSTAT_SPEED 0xc000
  54. #define MIIM_88E1011_PHYSTAT_GBIT 0x8000
  55. #define MIIM_88E1011_PHYSTAT_100 0x4000
  56. #define MIIM_88E1011_PHYSTAT_DUPLEX 0x2000
  57. #define MIIM_88E1011_PHYSTAT_SPDDONE 0x0800
  58. #define MIIM_88E1011_PHYSTAT_LINK 0x0400
  59. #define MIIM_88E1011_PHY_SCR 0x10
  60. #define MIIM_88E1011_PHY_MDI_X_AUTO 0x0060
  61. #define MIIM_88E1111_PHY_EXT_CR 0x14
  62. #define MIIM_88E1111_PHY_EXT_SR 0x1b
  63. /* 88E1111 PHY LED Control Register */
  64. #define MIIM_88E1111_PHY_LED_CONTROL 24
  65. #define MIIM_88E1111_PHY_LED_DIRECT 0x4100
  66. #define MIIM_88E1111_PHY_LED_COMBINE 0x411C
  67. #define MIIM_READ_COMMAND 0x00000001
  68. /* struct phy_info: a structure which defines attributes for a PHY
  69. * id will contain a number which represents the PHY. During
  70. * startup, the driver will poll the PHY to find out what its
  71. * UID--as defined by registers 2 and 3--is. The 32-bit result
  72. * gotten from the PHY will be shifted right by "shift" bits to
  73. * discard any bits which may change based on revision numbers
  74. * unimportant to functionality
  75. *
  76. * The struct phy_cmd entries represent pointers to an arrays of
  77. * commands which tell the driver what to do to the PHY.
  78. */
  79. struct phy_info {
  80. uint id;
  81. char *name;
  82. uint shift;
  83. /* Called to configure the PHY, and modify the controller
  84. * based on the results */
  85. struct phy_cmd *config;
  86. /* Called when starting up the controller */
  87. struct phy_cmd *startup;
  88. /* Called when bringing down the controller */
  89. struct phy_cmd *shutdown;
  90. };
  91. /* SGDMA Stuff */
  92. #define ALT_SGDMA_STATUS_ERROR_MSK (0x00000001)
  93. #define ALT_SGDMA_STATUS_EOP_ENCOUNTERED_MSK (0x00000002)
  94. #define ALT_SGDMA_STATUS_DESC_COMPLETED_MSK (0x00000004)
  95. #define ALT_SGDMA_STATUS_CHAIN_COMPLETED_MSK (0x00000008)
  96. #define ALT_SGDMA_STATUS_BUSY_MSK (0x00000010)
  97. #define ALT_SGDMA_CONTROL_IE_ERROR_MSK (0x00000001)
  98. #define ALT_SGDMA_CONTROL_IE_EOP_ENCOUNTERED_MSK (0x00000002)
  99. #define ALT_SGDMA_CONTROL_IE_DESC_COMPLETED_MSK (0x00000004)
  100. #define ALT_SGDMA_CONTROL_IE_CHAIN_COMPLETED_MSK (0x00000008)
  101. #define ALT_SGDMA_CONTROL_IE_GLOBAL_MSK (0x00000010)
  102. #define ALT_SGDMA_CONTROL_RUN_MSK (0x00000020)
  103. #define ALT_SGDMA_CONTROL_STOP_DMA_ER_MSK (0x00000040)
  104. #define ALT_SGDMA_CONTROL_IE_MAX_DESC_PROCESSED_MSK (0x00000080)
  105. #define ALT_SGDMA_CONTROL_MAX_DESC_PROCESSED_MSK (0x0000FF00)
  106. #define ALT_SGDMA_CONTROL_SOFTWARERESET_MSK (0x00010000)
  107. #define ALT_SGDMA_CONTROL_PARK_MSK (0x00020000)
  108. #define ALT_SGDMA_CONTROL_CLEAR_INTERRUPT_MSK (0x80000000)
  109. #define ALTERA_TSE_SGDMA_INTR_MASK (ALT_SGDMA_CONTROL_IE_CHAIN_COMPLETED_MSK \
  110. | ALT_SGDMA_STATUS_DESC_COMPLETED_MSK \
  111. | ALT_SGDMA_CONTROL_IE_GLOBAL_MSK)
  112. /*
  113. * Descriptor control bit masks & offsets
  114. *
  115. * Note: The control byte physically occupies bits [31:24] in memory.
  116. * The following bit-offsets are expressed relative to the LSB of
  117. * the control register bitfield.
  118. */
  119. #define ALT_SGDMA_DESCRIPTOR_CONTROL_GENERATE_EOP_MSK (0x00000001)
  120. #define ALT_SGDMA_DESCRIPTOR_CONTROL_READ_FIXED_ADDRESS_MSK (0x00000002)
  121. #define ALT_SGDMA_DESCRIPTOR_CONTROL_WRITE_FIXED_ADDRESS_MSK (0x00000004)
  122. #define ALT_SGDMA_DESCRIPTOR_CONTROL_ATLANTIC_CHANNEL_MSK (0x00000008)
  123. #define ALT_SGDMA_DESCRIPTOR_CONTROL_OWNED_BY_HW_MSK (0x00000080)
  124. /*
  125. * Descriptor status bit masks & offsets
  126. *
  127. * Note: The status byte physically occupies bits [23:16] in memory.
  128. * The following bit-offsets are expressed relative to the LSB of
  129. * the status register bitfield.
  130. */
  131. #define ALT_SGDMA_DESCRIPTOR_STATUS_E_CRC_MSK (0x00000001)
  132. #define ALT_SGDMA_DESCRIPTOR_STATUS_E_PARITY_MSK (0x00000002)
  133. #define ALT_SGDMA_DESCRIPTOR_STATUS_E_OVERFLOW_MSK (0x00000004)
  134. #define ALT_SGDMA_DESCRIPTOR_STATUS_E_SYNC_MSK (0x00000008)
  135. #define ALT_SGDMA_DESCRIPTOR_STATUS_E_UEOP_MSK (0x00000010)
  136. #define ALT_SGDMA_DESCRIPTOR_STATUS_E_MEOP_MSK (0x00000020)
  137. #define ALT_SGDMA_DESCRIPTOR_STATUS_E_MSOP_MSK (0x00000040)
  138. #define ALT_SGDMA_DESCRIPTOR_STATUS_TERMINATED_BY_EOP_MSK (0x00000080)
  139. #define ALT_SGDMA_DESCRIPTOR_STATUS_ERROR_MSK (0x0000007F)
  140. /*
  141. * The SGDMA controller buffer descriptor allocates
  142. * 64 bits for each address. To support ANSI C, the
  143. * struct implementing a descriptor places 32-bits
  144. * of padding directly above each address; each pad must
  145. * be cleared when initializing a descriptor.
  146. */
  147. /*
  148. * Buffer Descriptor data structure
  149. *
  150. */
  151. struct alt_sgdma_descriptor {
  152. unsigned int *source; /* the address of data to be read. */
  153. unsigned int source_pad;
  154. unsigned int *destination; /* the address to write data */
  155. unsigned int destination_pad;
  156. unsigned int *next; /* the next descriptor in the list. */
  157. unsigned int next_pad;
  158. unsigned short bytes_to_transfer; /* the number of bytes to transfer */
  159. unsigned char read_burst;
  160. unsigned char write_burst;
  161. unsigned short actual_bytes_transferred;/* bytes transferred by DMA */
  162. unsigned char descriptor_status;
  163. unsigned char descriptor_control;
  164. } __packed_1_;
  165. /* SG-DMA Control/Status Slave registers map */
  166. struct alt_sgdma_registers {
  167. unsigned int status;
  168. unsigned int status_pad[3];
  169. unsigned int control;
  170. unsigned int control_pad[3];
  171. unsigned int next_descriptor_pointer;
  172. unsigned int descriptor_pad[3];
  173. };
  174. /* TSE Stuff */
  175. #define ALTERA_TSE_CMD_TX_ENA_MSK (0x00000001)
  176. #define ALTERA_TSE_CMD_RX_ENA_MSK (0x00000002)
  177. #define ALTERA_TSE_CMD_XON_GEN_MSK (0x00000004)
  178. #define ALTERA_TSE_CMD_ETH_SPEED_MSK (0x00000008)
  179. #define ALTERA_TSE_CMD_PROMIS_EN_MSK (0x00000010)
  180. #define ALTERA_TSE_CMD_PAD_EN_MSK (0x00000020)
  181. #define ALTERA_TSE_CMD_CRC_FWD_MSK (0x00000040)
  182. #define ALTERA_TSE_CMD_PAUSE_FWD_MSK (0x00000080)
  183. #define ALTERA_TSE_CMD_PAUSE_IGNORE_MSK (0x00000100)
  184. #define ALTERA_TSE_CMD_TX_ADDR_INS_MSK (0x00000200)
  185. #define ALTERA_TSE_CMD_HD_ENA_MSK (0x00000400)
  186. #define ALTERA_TSE_CMD_EXCESS_COL_MSK (0x00000800)
  187. #define ALTERA_TSE_CMD_LATE_COL_MSK (0x00001000)
  188. #define ALTERA_TSE_CMD_SW_RESET_MSK (0x00002000)
  189. #define ALTERA_TSE_CMD_MHASH_SEL_MSK (0x00004000)
  190. #define ALTERA_TSE_CMD_LOOPBACK_MSK (0x00008000)
  191. /* Bits (18:16) = address select */
  192. #define ALTERA_TSE_CMD_TX_ADDR_SEL_MSK (0x00070000)
  193. #define ALTERA_TSE_CMD_MAGIC_ENA_MSK (0x00080000)
  194. #define ALTERA_TSE_CMD_SLEEP_MSK (0x00100000)
  195. #define ALTERA_TSE_CMD_WAKEUP_MSK (0x00200000)
  196. #define ALTERA_TSE_CMD_XOFF_GEN_MSK (0x00400000)
  197. #define ALTERA_TSE_CMD_CNTL_FRM_ENA_MSK (0x00800000)
  198. #define ALTERA_TSE_CMD_NO_LENGTH_CHECK_MSK (0x01000000)
  199. #define ALTERA_TSE_CMD_ENA_10_MSK (0x02000000)
  200. #define ALTERA_TSE_CMD_RX_ERR_DISC_MSK (0x04000000)
  201. /* Bits (30..27) reserved */
  202. #define ALTERA_TSE_CMD_CNT_RESET_MSK (0x80000000)
  203. #define ALTERA_TSE_TX_CMD_STAT_TX_SHIFT16 (0x00040000)
  204. #define ALTERA_TSE_TX_CMD_STAT_OMIT_CRC (0x00020000)
  205. #define ALTERA_TSE_RX_CMD_STAT_RX_SHIFT16 (0x02000000)
  206. #define ALT_TSE_SW_RESET_WATCHDOG_CNTR 10000
  207. #define ALT_TSE_SGDMA_BUSY_WATCHDOG_CNTR 90000000
  208. /* Command_Config Register Bit Definitions */
  209. typedef volatile union __alt_tse_command_config {
  210. unsigned int image;
  211. struct {
  212. unsigned int
  213. transmit_enable:1, /* bit 0 */
  214. receive_enable:1, /* bit 1 */
  215. pause_frame_xon_gen:1, /* bit 2 */
  216. ethernet_speed:1, /* bit 3 */
  217. promiscuous_enable:1, /* bit 4 */
  218. pad_enable:1, /* bit 5 */
  219. crc_forward:1, /* bit 6 */
  220. pause_frame_forward:1, /* bit 7 */
  221. pause_frame_ignore:1, /* bit 8 */
  222. set_mac_address_on_tx:1, /* bit 9 */
  223. halfduplex_enable:1, /* bit 10 */
  224. excessive_collision:1, /* bit 11 */
  225. late_collision:1, /* bit 12 */
  226. software_reset:1, /* bit 13 */
  227. multicast_hash_mode_sel:1, /* bit 14 */
  228. loopback_enable:1, /* bit 15 */
  229. src_mac_addr_sel_on_tx:3, /* bit 18:16 */
  230. magic_packet_detect:1, /* bit 19 */
  231. sleep_mode_enable:1, /* bit 20 */
  232. wake_up_request:1, /* bit 21 */
  233. pause_frame_xoff_gen:1, /* bit 22 */
  234. control_frame_enable:1, /* bit 23 */
  235. payload_len_chk_disable:1, /* bit 24 */
  236. enable_10mbps_intf:1, /* bit 25 */
  237. rx_error_discard_enable:1, /* bit 26 */
  238. reserved_bits:4, /* bit 30:27 */
  239. self_clear_counter_reset:1; /* bit 31 */
  240. } __packed_1_ bits;
  241. } __packed_1_ alt_tse_command_config;
  242. /* Tx_Cmd_Stat Register Bit Definitions */
  243. typedef volatile union __alt_tse_tx_cmd_stat {
  244. unsigned int image;
  245. struct {
  246. unsigned int reserved_lsbs:17, /* bit 16:0 */
  247. omit_crc:1, /* bit 17 */
  248. tx_shift16:1, /* bit 18 */
  249. reserved_msbs:13; /* bit 31:19 */
  250. } __packed_1_ bits;
  251. } alt_tse_tx_cmd_stat;
  252. /* Rx_Cmd_Stat Register Bit Definitions */
  253. typedef volatile union __alt_tse_rx_cmd_stat {
  254. unsigned int image;
  255. struct {
  256. unsigned int reserved_lsbs:25, /* bit 24:0 */
  257. rx_shift16:1, /* bit 25 */
  258. reserved_msbs:6; /* bit 31:26 */
  259. } __packed_1_ bits;
  260. } alt_tse_rx_cmd_stat;
  261. struct alt_tse_mdio {
  262. unsigned int control; /*PHY device operation control register */
  263. unsigned int status; /*PHY device operation status register */
  264. unsigned int phy_id1; /*Bits 31:16 of PHY identifier. */
  265. unsigned int phy_id2; /*Bits 15:0 of PHY identifier. */
  266. unsigned int auto_negotiation_advertisement;
  267. unsigned int remote_partner_base_page_ability;
  268. unsigned int reg6;
  269. unsigned int reg7;
  270. unsigned int reg8;
  271. unsigned int reg9;
  272. unsigned int rega;
  273. unsigned int regb;
  274. unsigned int regc;
  275. unsigned int regd;
  276. unsigned int rege;
  277. unsigned int regf;
  278. unsigned int reg10;
  279. unsigned int reg11;
  280. unsigned int reg12;
  281. unsigned int reg13;
  282. unsigned int reg14;
  283. unsigned int reg15;
  284. unsigned int reg16;
  285. unsigned int reg17;
  286. unsigned int reg18;
  287. unsigned int reg19;
  288. unsigned int reg1a;
  289. unsigned int reg1b;
  290. unsigned int reg1c;
  291. unsigned int reg1d;
  292. unsigned int reg1e;
  293. unsigned int reg1f;
  294. };
  295. /* MAC register Space */
  296. struct alt_tse_mac {
  297. unsigned int megacore_revision;
  298. unsigned int scratch_pad;
  299. alt_tse_command_config command_config;
  300. unsigned int mac_addr_0;
  301. unsigned int mac_addr_1;
  302. unsigned int max_frame_length;
  303. unsigned int pause_quanta;
  304. unsigned int rx_sel_empty_threshold;
  305. unsigned int rx_sel_full_threshold;
  306. unsigned int tx_sel_empty_threshold;
  307. unsigned int tx_sel_full_threshold;
  308. unsigned int rx_almost_empty_threshold;
  309. unsigned int rx_almost_full_threshold;
  310. unsigned int tx_almost_empty_threshold;
  311. unsigned int tx_almost_full_threshold;
  312. unsigned int mdio_phy0_addr;
  313. unsigned int mdio_phy1_addr;
  314. /* only if 100/1000 BaseX PCS, reserved otherwise */
  315. unsigned int reservedx44[5];
  316. unsigned int reg_read_access_status;
  317. unsigned int min_tx_ipg_length;
  318. /* IEEE 802.3 oEntity Managed Object Support */
  319. unsigned int aMACID_1; /*The MAC addresses */
  320. unsigned int aMACID_2;
  321. unsigned int aFramesTransmittedOK;
  322. unsigned int aFramesReceivedOK;
  323. unsigned int aFramesCheckSequenceErrors;
  324. unsigned int aAlignmentErrors;
  325. unsigned int aOctetsTransmittedOK;
  326. unsigned int aOctetsReceivedOK;
  327. /* IEEE 802.3 oPausedEntity Managed Object Support */
  328. unsigned int aTxPAUSEMACCtrlFrames;
  329. unsigned int aRxPAUSEMACCtrlFrames;
  330. /* IETF MIB (MIB-II) Object Support */
  331. unsigned int ifInErrors;
  332. unsigned int ifOutErrors;
  333. unsigned int ifInUcastPkts;
  334. unsigned int ifInMulticastPkts;
  335. unsigned int ifInBroadcastPkts;
  336. unsigned int ifOutDiscards;
  337. unsigned int ifOutUcastPkts;
  338. unsigned int ifOutMulticastPkts;
  339. unsigned int ifOutBroadcastPkts;
  340. /* IETF RMON MIB Object Support */
  341. unsigned int etherStatsDropEvent;
  342. unsigned int etherStatsOctets;
  343. unsigned int etherStatsPkts;
  344. unsigned int etherStatsUndersizePkts;
  345. unsigned int etherStatsOversizePkts;
  346. unsigned int etherStatsPkts64Octets;
  347. unsigned int etherStatsPkts65to127Octets;
  348. unsigned int etherStatsPkts128to255Octets;
  349. unsigned int etherStatsPkts256to511Octets;
  350. unsigned int etherStatsPkts512to1023Octets;
  351. unsigned int etherStatsPkts1024to1518Octets;
  352. unsigned int etherStatsPkts1519toXOctets;
  353. unsigned int etherStatsJabbers;
  354. unsigned int etherStatsFragments;
  355. unsigned int reservedxE4;
  356. /*FIFO control register. */
  357. alt_tse_tx_cmd_stat tx_cmd_stat;
  358. alt_tse_rx_cmd_stat rx_cmd_stat;
  359. unsigned int ipaccTxConf;
  360. unsigned int ipaccRxConf;
  361. unsigned int ipaccRxStat;
  362. unsigned int ipaccRxStatSum;
  363. /*Multicast address resolution table */
  364. unsigned int hash_table[64];
  365. /*Registers 0 to 31 within PHY device 0/1 */
  366. struct alt_tse_mdio mdio_phy0;
  367. struct alt_tse_mdio mdio_phy1;
  368. /*4 Supplemental MAC Addresses */
  369. unsigned int supp_mac_addr_0_0;
  370. unsigned int supp_mac_addr_0_1;
  371. unsigned int supp_mac_addr_1_0;
  372. unsigned int supp_mac_addr_1_1;
  373. unsigned int supp_mac_addr_2_0;
  374. unsigned int supp_mac_addr_2_1;
  375. unsigned int supp_mac_addr_3_0;
  376. unsigned int supp_mac_addr_3_1;
  377. unsigned int reservedx320[56];
  378. };
  379. /* flags: TSE MII modes */
  380. /* GMII/MII = 0 */
  381. /* RGMII = 1 */
  382. /* RGMII_ID = 2 */
  383. /* RGMII_TXID = 3 */
  384. /* RGMII_RXID = 4 */
  385. /* SGMII = 5 */
  386. struct altera_tse_priv {
  387. char devname[16];
  388. volatile struct alt_tse_mac *mac_dev;
  389. volatile struct alt_sgdma_registers *sgdma_rx;
  390. volatile struct alt_sgdma_registers *sgdma_tx;
  391. unsigned int rx_sgdma_irq;
  392. unsigned int tx_sgdma_irq;
  393. unsigned int has_descriptor_mem;
  394. unsigned int descriptor_mem_base;
  395. unsigned int descriptor_mem_size;
  396. volatile struct alt_sgdma_descriptor *rx_desc;
  397. volatile struct alt_sgdma_descriptor *tx_desc;
  398. volatile unsigned char *rx_buf;
  399. struct phy_info *phyinfo;
  400. unsigned int phyaddr;
  401. unsigned int flags;
  402. unsigned int link;
  403. unsigned int duplexity;
  404. unsigned int speed;
  405. };
  406. /* Phy stuff continued */
  407. /*
  408. * struct phy_cmd: A command for reading or writing a PHY register
  409. *
  410. * mii_reg: The register to read or write
  411. *
  412. * mii_data: For writes, the value to put in the register.
  413. * A value of -1 indicates this is a read.
  414. *
  415. * funct: A function pointer which is invoked for each command.
  416. * For reads, this function will be passed the value read
  417. * from the PHY, and process it.
  418. * For writes, the result of this function will be written
  419. * to the PHY register
  420. */
  421. struct phy_cmd {
  422. uint mii_reg;
  423. uint mii_data;
  424. uint(*funct) (uint mii_reg, struct altera_tse_priv *priv);
  425. };
  426. #endif /* _ALTERA_TSE_H_ */