blob: d99a6f318f8b7664d0312fb738bbaee1b8e88aab [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
9#include <config.h>
10
11enum srds_prtcl {
Hou Zhiqiangb435ae92016-08-02 19:03:22 +080012 /*
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 Huan8ce6bec2014-09-05 13:52:34 +080016 NONE = 0,
17 PCIE1,
18 PCIE2,
19 SATA1,
20 SGMII_TSEC1,
21 SGMII_TSEC2,
22};
23
24enum srds {
25 FSL_SRDS_1 = 0,
26 FSL_SRDS_2 = 1,
27};
28
29int is_serdes_configured(enum srds_prtcl device);
30void fsl_serdes_init(void);
31const char *serdes_clock_to_string(u32 clock);
32
33int serdes_get_first_lane(u32 sd, enum srds_prtcl device);
34enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane);
35
36#endif /* __FSL_SERDES_H */