fsl_serdes.h 730 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright 2014 Freescale Semiconductor, Inc.
  4. */
  5. #ifndef __FSL_SERDES_H
  6. #define __FSL_SERDES_H
  7. #include <config.h>
  8. enum srds_prtcl {
  9. /*
  10. * Nobody will check whether the device 'NONE' has been configured,
  11. * So use it to indicate if the serdes_prtcl_map has been initialized.
  12. */
  13. NONE = 0,
  14. PCIE1,
  15. PCIE2,
  16. SATA1,
  17. SGMII_TSEC1,
  18. SGMII_TSEC2,
  19. };
  20. enum srds {
  21. FSL_SRDS_1 = 0,
  22. FSL_SRDS_2 = 1,
  23. };
  24. int is_serdes_configured(enum srds_prtcl device);
  25. void fsl_serdes_init(void);
  26. const char *serdes_clock_to_string(u32 clock);
  27. int serdes_get_first_lane(u32 sd, enum srds_prtcl device);
  28. enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane);
  29. #endif /* __FSL_SERDES_H */