]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.h
Merge remote-tracking branch 'input-current/for-linus'
[karo-tx-linux.git] / drivers / net / ethernet / hisilicon / hns / hns_dsaf_gmac.h
1 /*
2  * Copyright (c) 2014-2015 Hisilicon Limited.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  */
9
10 #ifndef _HNS_GMAC_H
11 #define _HNS_GMAC_H
12
13 #include "hns_dsaf_mac.h"
14
15 enum 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       /* 10GE */
26 };
27
28 enum hns_gmac_duplex_mdoe {
29         GMAC_HALF_DUPLEX_MODE = 0,
30         GMAC_FULL_DUPLEX_MODE
31 };
32
33 struct 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;  /*auto-nego enable  */
40         u32 runt_pkt_en;
41         u32 strip_pad_en;
42 };
43
44 #define ETH_GMAC_DUMP_NUM               96
45 #endif                          /* __HNS_GMAC_H__ */