blob: fafc44b1a2cd7f77817a4df3de7a3f4dcdd307f1 [file] [log] [blame]
Wang Huan8ce6bec2014-09-05 13:52:34 +08001/*
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
12enum srds_prtcl {
Hou Zhiqiangb435ae92016-08-02 19:03:22 +080013 /*
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 Huan8ce6bec2014-09-05 13:52:34 +080017 NONE = 0,
18 PCIE1,
19 PCIE2,
20 SATA1,
21 SGMII_TSEC1,
22 SGMII_TSEC2,
23};
24
25enum srds {
26 FSL_SRDS_1 = 0,
27 FSL_SRDS_2 = 1,
28};
29
30int is_serdes_configured(enum srds_prtcl device);
31void fsl_serdes_init(void);
32const char *serdes_clock_to_string(u32 clock);
33
34int serdes_get_first_lane(u32 sd, enum srds_prtcl device);
35enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane);
36
37#endif /* __FSL_SERDES_H */