sxgbe_common.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. /* 10G controller driver for Samsung SoCs
  2. *
  3. * Copyright (C) 2013 Samsung Electronics Co., Ltd.
  4. * http://www.samsung.com
  5. *
  6. * Author: Siva Reddy Kallam <siva.kallam@samsung.com>
  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 version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef __SXGBE_COMMON_H__
  13. #define __SXGBE_COMMON_H__
  14. /* forward references */
  15. struct sxgbe_desc_ops;
  16. struct sxgbe_dma_ops;
  17. struct sxgbe_mtl_ops;
  18. #define SXGBE_RESOURCE_NAME "sam_sxgbeeth"
  19. #define DRV_MODULE_VERSION "November_2013"
  20. /* MAX HW feature words */
  21. #define SXGBE_HW_WORDS 3
  22. #define SXGBE_RX_COE_NONE 0
  23. /* CSR Frequency Access Defines*/
  24. #define SXGBE_CSR_F_150M 150000000
  25. #define SXGBE_CSR_F_250M 250000000
  26. #define SXGBE_CSR_F_300M 300000000
  27. #define SXGBE_CSR_F_350M 350000000
  28. #define SXGBE_CSR_F_400M 400000000
  29. #define SXGBE_CSR_F_500M 500000000
  30. /* pause time */
  31. #define SXGBE_PAUSE_TIME 0x200
  32. /* tx queues */
  33. #define SXGBE_TX_QUEUES 8
  34. #define SXGBE_RX_QUEUES 16
  35. /* Calculated based how much time does it take to fill 256KB Rx memory
  36. * at 10Gb speed at 156MHz clock rate and considered little less then
  37. * the actual value.
  38. */
  39. #define SXGBE_MAX_DMA_RIWT 0x70
  40. #define SXGBE_MIN_DMA_RIWT 0x01
  41. /* Tx coalesce parameters */
  42. #define SXGBE_COAL_TX_TIMER 40000
  43. #define SXGBE_MAX_COAL_TX_TICK 100000
  44. #define SXGBE_TX_MAX_FRAMES 512
  45. #define SXGBE_TX_FRAMES 128
  46. /* SXGBE TX FIFO is 8K, Rx FIFO is 16K */
  47. #define BUF_SIZE_16KiB 16384
  48. #define BUF_SIZE_8KiB 8192
  49. #define BUF_SIZE_4KiB 4096
  50. #define BUF_SIZE_2KiB 2048
  51. #define SXGBE_DEFAULT_LIT_LS 0x3E8
  52. #define SXGBE_DEFAULT_TWT_LS 0x0
  53. /* Flow Control defines */
  54. #define SXGBE_FLOW_OFF 0
  55. #define SXGBE_FLOW_RX 1
  56. #define SXGBE_FLOW_TX 2
  57. #define SXGBE_FLOW_AUTO (SXGBE_FLOW_TX | SXGBE_FLOW_RX)
  58. #define SF_DMA_MODE 1 /* DMA STORE-AND-FORWARD Operation Mode */
  59. /* errors */
  60. #define RX_GMII_ERR 0x01
  61. #define RX_WATCHDOG_ERR 0x02
  62. #define RX_CRC_ERR 0x03
  63. #define RX_GAINT_ERR 0x04
  64. #define RX_IP_HDR_ERR 0x05
  65. #define RX_PAYLOAD_ERR 0x06
  66. #define RX_OVERFLOW_ERR 0x07
  67. /* pkt type */
  68. #define RX_LEN_PKT 0x00
  69. #define RX_MACCTL_PKT 0x01
  70. #define RX_DCBCTL_PKT 0x02
  71. #define RX_ARP_PKT 0x03
  72. #define RX_OAM_PKT 0x04
  73. #define RX_UNTAG_PKT 0x05
  74. #define RX_OTHER_PKT 0x07
  75. #define RX_SVLAN_PKT 0x08
  76. #define RX_CVLAN_PKT 0x09
  77. #define RX_DVLAN_OCVLAN_ICVLAN_PKT 0x0A
  78. #define RX_DVLAN_OSVLAN_ISVLAN_PKT 0x0B
  79. #define RX_DVLAN_OSVLAN_ICVLAN_PKT 0x0C
  80. #define RX_DVLAN_OCVLAN_ISVLAN_PKT 0x0D
  81. #define RX_NOT_IP_PKT 0x00
  82. #define RX_IPV4_TCP_PKT 0x01
  83. #define RX_IPV4_UDP_PKT 0x02
  84. #define RX_IPV4_ICMP_PKT 0x03
  85. #define RX_IPV4_UNKNOWN_PKT 0x07
  86. #define RX_IPV6_TCP_PKT 0x09
  87. #define RX_IPV6_UDP_PKT 0x0A
  88. #define RX_IPV6_ICMP_PKT 0x0B
  89. #define RX_IPV6_UNKNOWN_PKT 0x0F
  90. #define RX_NO_PTP 0x00
  91. #define RX_PTP_SYNC 0x01
  92. #define RX_PTP_FOLLOW_UP 0x02
  93. #define RX_PTP_DELAY_REQ 0x03
  94. #define RX_PTP_DELAY_RESP 0x04
  95. #define RX_PTP_PDELAY_REQ 0x05
  96. #define RX_PTP_PDELAY_RESP 0x06
  97. #define RX_PTP_PDELAY_FOLLOW_UP 0x07
  98. #define RX_PTP_ANNOUNCE 0x08
  99. #define RX_PTP_MGMT 0x09
  100. #define RX_PTP_SIGNAL 0x0A
  101. #define RX_PTP_RESV_MSG 0x0F
  102. /* EEE-LPI mode flags*/
  103. #define TX_ENTRY_LPI_MODE 0x10
  104. #define TX_EXIT_LPI_MODE 0x20
  105. #define RX_ENTRY_LPI_MODE 0x40
  106. #define RX_EXIT_LPI_MODE 0x80
  107. /* EEE-LPI Interrupt status flag */
  108. #define LPI_INT_STATUS BIT(5)
  109. /* EEE-LPI Default timer values */
  110. #define LPI_LINK_STATUS_TIMER 0x3E8
  111. #define LPI_MAC_WAIT_TIMER 0x00
  112. /* EEE-LPI Control and status definitions */
  113. #define LPI_CTRL_STATUS_TXA BIT(19)
  114. #define LPI_CTRL_STATUS_PLSDIS BIT(18)
  115. #define LPI_CTRL_STATUS_PLS BIT(17)
  116. #define LPI_CTRL_STATUS_LPIEN BIT(16)
  117. #define LPI_CTRL_STATUS_TXRSTP BIT(11)
  118. #define LPI_CTRL_STATUS_RXRSTP BIT(10)
  119. #define LPI_CTRL_STATUS_RLPIST BIT(9)
  120. #define LPI_CTRL_STATUS_TLPIST BIT(8)
  121. #define LPI_CTRL_STATUS_RLPIEX BIT(3)
  122. #define LPI_CTRL_STATUS_RLPIEN BIT(2)
  123. #define LPI_CTRL_STATUS_TLPIEX BIT(1)
  124. #define LPI_CTRL_STATUS_TLPIEN BIT(0)
  125. enum dma_irq_status {
  126. tx_hard_error = BIT(0),
  127. tx_bump_tc = BIT(1),
  128. handle_tx = BIT(2),
  129. rx_hard_error = BIT(3),
  130. rx_bump_tc = BIT(4),
  131. handle_rx = BIT(5),
  132. };
  133. #define NETIF_F_HW_VLAN_ALL (NETIF_F_HW_VLAN_CTAG_RX | \
  134. NETIF_F_HW_VLAN_STAG_RX | \
  135. NETIF_F_HW_VLAN_CTAG_TX | \
  136. NETIF_F_HW_VLAN_STAG_TX | \
  137. NETIF_F_HW_VLAN_CTAG_FILTER | \
  138. NETIF_F_HW_VLAN_STAG_FILTER)
  139. /* MMC control defines */
  140. #define SXGBE_MMC_CTRL_CNT_FRZ 0x00000008
  141. /* SXGBE HW ADDR regs */
  142. #define SXGBE_ADDR_HIGH(reg) (((reg > 15) ? 0x00000800 : 0x00000040) + \
  143. (reg * 8))
  144. #define SXGBE_ADDR_LOW(reg) (((reg > 15) ? 0x00000804 : 0x00000044) + \
  145. (reg * 8))
  146. #define SXGBE_MAX_PERFECT_ADDRESSES 32 /* Maximum unicast perfect filtering */
  147. #define SXGBE_FRAME_FILTER 0x00000004 /* Frame Filter */
  148. /* SXGBE Frame Filter defines */
  149. #define SXGBE_FRAME_FILTER_PR 0x00000001 /* Promiscuous Mode */
  150. #define SXGBE_FRAME_FILTER_HUC 0x00000002 /* Hash Unicast */
  151. #define SXGBE_FRAME_FILTER_HMC 0x00000004 /* Hash Multicast */
  152. #define SXGBE_FRAME_FILTER_DAIF 0x00000008 /* DA Inverse Filtering */
  153. #define SXGBE_FRAME_FILTER_PM 0x00000010 /* Pass all multicast */
  154. #define SXGBE_FRAME_FILTER_DBF 0x00000020 /* Disable Broadcast frames */
  155. #define SXGBE_FRAME_FILTER_SAIF 0x00000100 /* Inverse Filtering */
  156. #define SXGBE_FRAME_FILTER_SAF 0x00000200 /* Source Address Filter */
  157. #define SXGBE_FRAME_FILTER_HPF 0x00000400 /* Hash or perfect Filter */
  158. #define SXGBE_FRAME_FILTER_RA 0x80000000 /* Receive all mode */
  159. #define SXGBE_HASH_TABLE_SIZE 64
  160. #define SXGBE_HASH_HIGH 0x00000008 /* Multicast Hash Table High */
  161. #define SXGBE_HASH_LOW 0x0000000c /* Multicast Hash Table Low */
  162. #define SXGBE_HI_REG_AE 0x80000000
  163. /* Minimum and maximum MTU */
  164. #define MIN_MTU 68
  165. #define MAX_MTU 9000
  166. #define SXGBE_FOR_EACH_QUEUE(max_queues, queue_num) \
  167. for (queue_num = 0; queue_num < max_queues; queue_num++)
  168. #define DRV_VERSION "1.0.0"
  169. #define SXGBE_MAX_RX_CHANNELS 16
  170. #define SXGBE_MAX_TX_CHANNELS 16
  171. #define START_MAC_REG_OFFSET 0x0000
  172. #define MAX_MAC_REG_OFFSET 0x0DFC
  173. #define START_MTL_REG_OFFSET 0x1000
  174. #define MAX_MTL_REG_OFFSET 0x18FC
  175. #define START_DMA_REG_OFFSET 0x3000
  176. #define MAX_DMA_REG_OFFSET 0x38FC
  177. #define REG_SPACE_SIZE 0x2000
  178. /* sxgbe statistics counters */
  179. struct sxgbe_extra_stats {
  180. /* TX/RX IRQ events */
  181. unsigned long tx_underflow_irq;
  182. unsigned long tx_process_stopped_irq;
  183. unsigned long tx_ctxt_desc_err;
  184. unsigned long tx_threshold;
  185. unsigned long rx_threshold;
  186. unsigned long tx_pkt_n;
  187. unsigned long rx_pkt_n;
  188. unsigned long normal_irq_n;
  189. unsigned long tx_normal_irq_n;
  190. unsigned long rx_normal_irq_n;
  191. unsigned long napi_poll;
  192. unsigned long tx_clean;
  193. unsigned long tx_reset_ic_bit;
  194. unsigned long rx_process_stopped_irq;
  195. unsigned long rx_underflow_irq;
  196. /* Bus access errors */
  197. unsigned long fatal_bus_error_irq;
  198. unsigned long tx_read_transfer_err;
  199. unsigned long tx_write_transfer_err;
  200. unsigned long tx_desc_access_err;
  201. unsigned long tx_buffer_access_err;
  202. unsigned long tx_data_transfer_err;
  203. unsigned long rx_read_transfer_err;
  204. unsigned long rx_write_transfer_err;
  205. unsigned long rx_desc_access_err;
  206. unsigned long rx_buffer_access_err;
  207. unsigned long rx_data_transfer_err;
  208. /* EEE-LPI stats */
  209. unsigned long tx_lpi_entry_n;
  210. unsigned long tx_lpi_exit_n;
  211. unsigned long rx_lpi_entry_n;
  212. unsigned long rx_lpi_exit_n;
  213. unsigned long eee_wakeup_error_n;
  214. /* RX specific */
  215. /* L2 error */
  216. unsigned long rx_code_gmii_err;
  217. unsigned long rx_watchdog_err;
  218. unsigned long rx_crc_err;
  219. unsigned long rx_gaint_pkt_err;
  220. unsigned long ip_hdr_err;
  221. unsigned long ip_payload_err;
  222. unsigned long overflow_error;
  223. /* L2 Pkt type */
  224. unsigned long len_pkt;
  225. unsigned long mac_ctl_pkt;
  226. unsigned long dcb_ctl_pkt;
  227. unsigned long arp_pkt;
  228. unsigned long oam_pkt;
  229. unsigned long untag_okt;
  230. unsigned long other_pkt;
  231. unsigned long svlan_tag_pkt;
  232. unsigned long cvlan_tag_pkt;
  233. unsigned long dvlan_ocvlan_icvlan_pkt;
  234. unsigned long dvlan_osvlan_isvlan_pkt;
  235. unsigned long dvlan_osvlan_icvlan_pkt;
  236. unsigned long dvan_ocvlan_icvlan_pkt;
  237. /* L3/L4 Pkt type */
  238. unsigned long not_ip_pkt;
  239. unsigned long ip4_tcp_pkt;
  240. unsigned long ip4_udp_pkt;
  241. unsigned long ip4_icmp_pkt;
  242. unsigned long ip4_unknown_pkt;
  243. unsigned long ip6_tcp_pkt;
  244. unsigned long ip6_udp_pkt;
  245. unsigned long ip6_icmp_pkt;
  246. unsigned long ip6_unknown_pkt;
  247. /* Filter specific */
  248. unsigned long vlan_filter_match;
  249. unsigned long sa_filter_fail;
  250. unsigned long da_filter_fail;
  251. unsigned long hash_filter_pass;
  252. unsigned long l3_filter_match;
  253. unsigned long l4_filter_match;
  254. /* RX context specific */
  255. unsigned long timestamp_dropped;
  256. unsigned long rx_msg_type_no_ptp;
  257. unsigned long rx_ptp_type_sync;
  258. unsigned long rx_ptp_type_follow_up;
  259. unsigned long rx_ptp_type_delay_req;
  260. unsigned long rx_ptp_type_delay_resp;
  261. unsigned long rx_ptp_type_pdelay_req;
  262. unsigned long rx_ptp_type_pdelay_resp;
  263. unsigned long rx_ptp_type_pdelay_follow_up;
  264. unsigned long rx_ptp_announce;
  265. unsigned long rx_ptp_mgmt;
  266. unsigned long rx_ptp_signal;
  267. unsigned long rx_ptp_resv_msg_type;
  268. };
  269. struct mac_link {
  270. int port;
  271. int duplex;
  272. int speed;
  273. };
  274. struct mii_regs {
  275. unsigned int addr; /* MII Address */
  276. unsigned int data; /* MII Data */
  277. };
  278. struct sxgbe_core_ops {
  279. /* MAC core initialization */
  280. void (*core_init)(void __iomem *ioaddr);
  281. /* Dump MAC registers */
  282. void (*dump_regs)(void __iomem *ioaddr);
  283. /* Handle extra events on specific interrupts hw dependent */
  284. int (*host_irq_status)(void __iomem *ioaddr,
  285. struct sxgbe_extra_stats *x);
  286. /* Set power management mode (e.g. magic frame) */
  287. void (*pmt)(void __iomem *ioaddr, unsigned long mode);
  288. /* Set/Get Unicast MAC addresses */
  289. void (*set_umac_addr)(void __iomem *ioaddr, unsigned char *addr,
  290. unsigned int reg_n);
  291. void (*get_umac_addr)(void __iomem *ioaddr, unsigned char *addr,
  292. unsigned int reg_n);
  293. void (*enable_rx)(void __iomem *ioaddr, bool enable);
  294. void (*enable_tx)(void __iomem *ioaddr, bool enable);
  295. /* controller version specific operations */
  296. int (*get_controller_version)(void __iomem *ioaddr);
  297. /* If supported then get the optional core features */
  298. unsigned int (*get_hw_feature)(void __iomem *ioaddr,
  299. unsigned char feature_index);
  300. /* adjust SXGBE speed */
  301. void (*set_speed)(void __iomem *ioaddr, unsigned char speed);
  302. /* EEE-LPI specific operations */
  303. void (*set_eee_mode)(void __iomem *ioaddr);
  304. void (*reset_eee_mode)(void __iomem *ioaddr);
  305. void (*set_eee_timer)(void __iomem *ioaddr, const int ls,
  306. const int tw);
  307. void (*set_eee_pls)(void __iomem *ioaddr, const int link);
  308. /* Enable disable checksum offload operations */
  309. void (*enable_rx_csum)(void __iomem *ioaddr);
  310. void (*disable_rx_csum)(void __iomem *ioaddr);
  311. void (*enable_rxqueue)(void __iomem *ioaddr, int queue_num);
  312. void (*disable_rxqueue)(void __iomem *ioaddr, int queue_num);
  313. };
  314. const struct sxgbe_core_ops *sxgbe_get_core_ops(void);
  315. struct sxgbe_ops {
  316. const struct sxgbe_core_ops *mac;
  317. const struct sxgbe_desc_ops *desc;
  318. const struct sxgbe_dma_ops *dma;
  319. const struct sxgbe_mtl_ops *mtl;
  320. struct mii_regs mii; /* MII register Addresses */
  321. struct mac_link link;
  322. unsigned int ctrl_uid;
  323. unsigned int ctrl_id;
  324. };
  325. /* SXGBE private data structures */
  326. struct sxgbe_tx_queue {
  327. unsigned int irq_no;
  328. struct sxgbe_priv_data *priv_ptr;
  329. struct sxgbe_tx_norm_desc *dma_tx;
  330. dma_addr_t dma_tx_phy;
  331. dma_addr_t *tx_skbuff_dma;
  332. struct sk_buff **tx_skbuff;
  333. struct timer_list txtimer;
  334. spinlock_t tx_lock; /* lock for tx queues */
  335. unsigned int cur_tx;
  336. unsigned int dirty_tx;
  337. u32 tx_count_frames;
  338. u32 tx_coal_frames;
  339. u32 tx_coal_timer;
  340. int hwts_tx_en;
  341. u16 prev_mss;
  342. u8 queue_no;
  343. };
  344. struct sxgbe_rx_queue {
  345. struct sxgbe_priv_data *priv_ptr;
  346. struct sxgbe_rx_norm_desc *dma_rx;
  347. struct sk_buff **rx_skbuff;
  348. unsigned int cur_rx;
  349. unsigned int dirty_rx;
  350. unsigned int irq_no;
  351. u32 rx_riwt;
  352. dma_addr_t *rx_skbuff_dma;
  353. dma_addr_t dma_rx_phy;
  354. u8 queue_no;
  355. };
  356. /* SXGBE HW capabilities */
  357. struct sxgbe_hw_features {
  358. /****** CAP [0] *******/
  359. unsigned int pmt_remote_wake_up;
  360. unsigned int pmt_magic_frame;
  361. /* IEEE 1588-2008 */
  362. unsigned int atime_stamp;
  363. unsigned int eee;
  364. unsigned int tx_csum_offload;
  365. unsigned int rx_csum_offload;
  366. unsigned int multi_macaddr;
  367. unsigned int tstamp_srcselect;
  368. unsigned int sa_vlan_insert;
  369. /****** CAP [1] *******/
  370. unsigned int rxfifo_size;
  371. unsigned int txfifo_size;
  372. unsigned int atstmap_hword;
  373. unsigned int dcb_enable;
  374. unsigned int splithead_enable;
  375. unsigned int tcpseg_offload;
  376. unsigned int debug_mem;
  377. unsigned int rss_enable;
  378. unsigned int hash_tsize;
  379. unsigned int l3l4_filer_size;
  380. /* This value is in bytes and
  381. * as mentioned in HW features
  382. * of SXGBE data book
  383. */
  384. unsigned int rx_mtl_qsize;
  385. unsigned int tx_mtl_qsize;
  386. /****** CAP [2] *******/
  387. /* TX and RX number of channels */
  388. unsigned int rx_mtl_queues;
  389. unsigned int tx_mtl_queues;
  390. unsigned int rx_dma_channels;
  391. unsigned int tx_dma_channels;
  392. unsigned int pps_output_count;
  393. unsigned int aux_input_count;
  394. };
  395. struct sxgbe_priv_data {
  396. /* DMA descriptos */
  397. struct sxgbe_tx_queue *txq[SXGBE_TX_QUEUES];
  398. struct sxgbe_rx_queue *rxq[SXGBE_RX_QUEUES];
  399. u8 cur_rx_qnum;
  400. unsigned int dma_tx_size;
  401. unsigned int dma_rx_size;
  402. unsigned int dma_buf_sz;
  403. u32 rx_riwt;
  404. struct napi_struct napi;
  405. void __iomem *ioaddr;
  406. struct net_device *dev;
  407. struct device *device;
  408. struct sxgbe_ops *hw; /* sxgbe specific ops */
  409. int no_csum_insertion;
  410. int irq;
  411. int rxcsum_insertion;
  412. spinlock_t stats_lock; /* lock for tx/rx statatics */
  413. struct phy_device *phydev;
  414. int oldlink;
  415. int speed;
  416. int oldduplex;
  417. struct mii_bus *mii;
  418. int mii_irq[PHY_MAX_ADDR];
  419. u8 rx_pause;
  420. u8 tx_pause;
  421. struct sxgbe_extra_stats xstats;
  422. struct sxgbe_plat_data *plat;
  423. struct sxgbe_hw_features hw_cap;
  424. u32 msg_enable;
  425. struct clk *sxgbe_clk;
  426. int clk_csr;
  427. unsigned int mode;
  428. unsigned int default_addend;
  429. /* advanced time stamp support */
  430. u32 adv_ts;
  431. int use_riwt;
  432. struct ptp_clock *ptp_clock;
  433. /* tc control */
  434. int tx_tc;
  435. int rx_tc;
  436. /* EEE-LPI specific members */
  437. struct timer_list eee_ctrl_timer;
  438. bool tx_path_in_lpi_mode;
  439. int lpi_irq;
  440. int eee_enabled;
  441. int eee_active;
  442. int tx_lpi_timer;
  443. };
  444. /* Function prototypes */
  445. struct sxgbe_priv_data *sxgbe_drv_probe(struct device *device,
  446. struct sxgbe_plat_data *plat_dat,
  447. void __iomem *addr);
  448. int sxgbe_drv_remove(struct net_device *ndev);
  449. void sxgbe_set_ethtool_ops(struct net_device *netdev);
  450. int sxgbe_mdio_unregister(struct net_device *ndev);
  451. int sxgbe_mdio_register(struct net_device *ndev);
  452. int sxgbe_register_platform(void);
  453. void sxgbe_unregister_platform(void);
  454. #ifdef CONFIG_PM
  455. int sxgbe_suspend(struct net_device *ndev);
  456. int sxgbe_resume(struct net_device *ndev);
  457. int sxgbe_freeze(struct net_device *ndev);
  458. int sxgbe_restore(struct net_device *ndev);
  459. #endif /* CONFIG_PM */
  460. const struct sxgbe_mtl_ops *sxgbe_get_mtl_ops(void);
  461. void sxgbe_disable_eee_mode(struct sxgbe_priv_data * const priv);
  462. bool sxgbe_eee_init(struct sxgbe_priv_data * const priv);
  463. #endif /* __SXGBE_COMMON_H__ */