1
2
3
4
5
6
7
8
9
10#ifndef _HNS_GMAC_H
11#define _HNS_GMAC_H
12
13#include "hns_dsaf_mac.h"
14
15enum hns_port_mode {
16 GMAC_10M_MII = 0,
17 GMAC_100M_MII,
18 GMAC_1000M_GMII,
19 GMAC_10M_RGMII,
20 GMAC_100M_RGMII,
21 GMAC_1000M_RGMII,
22 GMAC_10M_SGMII,
23 GMAC_100M_SGMII,
24 GMAC_1000M_SGMII,
25 GMAC_10000M_SGMII
26};
27
28enum hns_gmac_duplex_mdoe {
29 GMAC_HALF_DUPLEX_MODE = 0,
30 GMAC_FULL_DUPLEX_MODE
31};
32
33struct hns_gmac_port_mode_cfg {
34 enum hns_port_mode port_mode;
35 u32 max_frm_size;
36 u32 short_runts_thr;
37 u32 pad_enable;
38 u32 crc_add;
39 u32 an_enable;
40 u32 runt_pkt_en;
41 u32 strip_pad_en;
42};
43
44#define ETH_GMAC_DUMP_NUM 96
45#endif
46