Wang Huan | 8ce6bec | 2014-09-05 13:52:34 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Freescale Semiconductor, Inc. |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef __FSL_SERDES_H |
| 8 | #define __FSL_SERDES_H |
| 9 | |
| 10 | #include <config.h> |
| 11 | |
| 12 | enum srds_prtcl { |
Hou Zhiqiang | b435ae9 | 2016-08-02 19:03:22 +0800 | [diff] [blame^] | 13 | /* |
| 14 | * Nobody will check whether the device 'NONE' has been configured, |
| 15 | * So use it to indicate if the serdes_prtcl_map has been initialized. |
| 16 | */ |
Wang Huan | 8ce6bec | 2014-09-05 13:52:34 +0800 | [diff] [blame] | 17 | NONE = 0, |
| 18 | PCIE1, |
| 19 | PCIE2, |
| 20 | SATA1, |
| 21 | SGMII_TSEC1, |
| 22 | SGMII_TSEC2, |
| 23 | }; |
| 24 | |
| 25 | enum srds { |
| 26 | FSL_SRDS_1 = 0, |
| 27 | FSL_SRDS_2 = 1, |
| 28 | }; |
| 29 | |
| 30 | int is_serdes_configured(enum srds_prtcl device); |
| 31 | void fsl_serdes_init(void); |
| 32 | const char *serdes_clock_to_string(u32 clock); |
| 33 | |
| 34 | int serdes_get_first_lane(u32 sd, enum srds_prtcl device); |
| 35 | enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane); |
| 36 | |
| 37 | #endif /* __FSL_SERDES_H */ |