hns_dsaf_gmac.h 952 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #ifndef _HNS_GMAC_H
  10. #define _HNS_GMAC_H
  11. #include "hns_dsaf_mac.h"
  12. enum hns_port_mode {
  13. GMAC_10M_MII = 0,
  14. GMAC_100M_MII,
  15. GMAC_1000M_GMII,
  16. GMAC_10M_RGMII,
  17. GMAC_100M_RGMII,
  18. GMAC_1000M_RGMII,
  19. GMAC_10M_SGMII,
  20. GMAC_100M_SGMII,
  21. GMAC_1000M_SGMII,
  22. GMAC_10000M_SGMII /* 10GE */
  23. };
  24. enum hns_gmac_duplex_mdoe {
  25. GMAC_HALF_DUPLEX_MODE = 0,
  26. GMAC_FULL_DUPLEX_MODE
  27. };
  28. struct hns_gmac_port_mode_cfg {
  29. enum hns_port_mode port_mode;
  30. u32 max_frm_size;
  31. u32 short_runts_thr;
  32. u32 pad_enable;
  33. u32 crc_add;
  34. u32 an_enable; /*auto-nego enable */
  35. u32 runt_pkt_en;
  36. u32 strip_pad_en;
  37. };
  38. #define ETH_GMAC_DUMP_NUM 96
  39. #endif /* __HNS_GMAC_H__ */