rtl8367.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Realtek RTL8367 ethernet switch driver
  3. *
  4. * Copyright (C) 2011 Gabor Juhos <[email protected]>
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published
  8. * by the Free Software Foundation.
  9. */
  10. #ifndef _RTL8367_H
  11. #define _RTL8367_H
  12. #define RTL8367_DRIVER_NAME "rtl8367"
  13. #define RTL8367B_DRIVER_NAME "rtl8367b"
  14. enum rtl8367_port_speed {
  15. RTL8367_PORT_SPEED_10 = 0,
  16. RTL8367_PORT_SPEED_100,
  17. RTL8367_PORT_SPEED_1000,
  18. };
  19. struct rtl8367_port_ability {
  20. int force_mode;
  21. int nway;
  22. int txpause;
  23. int rxpause;
  24. int link;
  25. int duplex;
  26. enum rtl8367_port_speed speed;
  27. };
  28. enum rtl8367_extif_mode {
  29. RTL8367_EXTIF_MODE_DISABLED = 0,
  30. RTL8367_EXTIF_MODE_RGMII,
  31. RTL8367_EXTIF_MODE_MII_MAC,
  32. RTL8367_EXTIF_MODE_MII_PHY,
  33. RTL8367_EXTIF_MODE_TMII_MAC,
  34. RTL8367_EXTIF_MODE_TMII_PHY,
  35. RTL8367_EXTIF_MODE_GMII,
  36. RTL8367_EXTIF_MODE_RGMII_33V,
  37. RTL8367B_EXTIF_MODE_RMII_MAC = 7,
  38. RTL8367B_EXTIF_MODE_RMII_PHY,
  39. RTL8367B_EXTIF_MODE_RGMII_33V,
  40. };
  41. struct rtl8367_extif_config {
  42. unsigned int txdelay;
  43. unsigned int rxdelay;
  44. enum rtl8367_extif_mode mode;
  45. struct rtl8367_port_ability ability;
  46. };
  47. #endif /* _RTL8367_H */