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