blob: 9244e0a78fd341c7b3e9ee5c5265e249a390d959 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Wang Huan8ce6bec2014-09-05 13:52:34 +08002/*
3 * Copyright 2014 Freescale Semiconductor, Inc.
Wang Huan8ce6bec2014-09-05 13:52:34 +08004 */
5
6#ifndef __FSL_SERDES_H
7#define __FSL_SERDES_H
8
Wang Huan8ce6bec2014-09-05 13:52:34 +08009enum srds_prtcl {
Hou Zhiqiangb435ae92016-08-02 19:03:22 +080010 /*
11 * Nobody will check whether the device 'NONE' has been configured,
12 * So use it to indicate if the serdes_prtcl_map has been initialized.
13 */
Wang Huan8ce6bec2014-09-05 13:52:34 +080014 NONE = 0,
15 PCIE1,
16 PCIE2,
17 SATA1,
18 SGMII_TSEC1,
19 SGMII_TSEC2,
20};
21
22enum srds {
23 FSL_SRDS_1 = 0,
24 FSL_SRDS_2 = 1,
25};
26
27int is_serdes_configured(enum srds_prtcl device);
28void fsl_serdes_init(void);
29const char *serdes_clock_to_string(u32 clock);
30
31int serdes_get_first_lane(u32 sd, enum srds_prtcl device);
32enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane);
33
34#endif /* __FSL_SERDES_H */