-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsbl_serdes.h
97 lines (84 loc) · 2.71 KB
/
sbl_serdes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright 2019-2020,2022-2023 Hewlett Packard Enterprise Development LP. All rights reserved. */
#ifndef _SBL_SERDES_H_
#define _SBL_SERDES_H_
/**
* @brief SerDes test function
*
* @param sbl sbl_inst pointer containing target config and state
*
* @return 0 on success or negative errno on failure
*/
int sbl_serdes_test(struct sbl_inst *sbl);
/**
* @brief SerDes initial load function
*
* To be called after the Rosetta power cycle or the controller boots
* Applyies the SBus speedup and flashes all SBM/SerDes firmware images
*
* @param sbl sbl_inst pointer containing target config and state
* @param port_num target port number
* @param force reset and flash even if current fw is at the correct
* rev and build number
*
* @return 0 on success or negative errno on failure
*/
int sbl_serdes_load(struct sbl_inst *sbl, int port_num, bool force);
/**
* @brief SerDes link partner detection
*
* This blocking function will use the Serdes to determine if the
* link partner is present ant trying to come up.
*
* @param sbl sbl_inst pointer containing target config and state
* @param port_num target port number
*
* @return 0 on success or negative errno on failure
*/
int sbl_serdes_lp_detect(struct sbl_inst *sbl, int port_num);
/**
* @brief Start the SerDes lanes for a given port
*
* @param sbl sbl_inst pointer containing target config and state
* @param port_num target port number
*
* @return 0 on success or negative errno on failure
*/
int sbl_serdes_start(struct sbl_inst *sbl, int port_num);
/**
* @brief Stops the SerDes lanes for a given port
*
* @param sbl sbl_inst pointer containing target config and state
* @param port_num target port number
*
* @return 0 on success or negative errno on failure
*/
int sbl_serdes_stop(struct sbl_inst *sbl, int port_num);
/**
* @brief Resets all SerDes lanes for a given port
*
* @param sbl sbl_inst pointer containing target config and state
* @param port_num target port number
*
* @return 0 on success or negative errno on failure
*/
int sbl_serdes_reset(struct sbl_inst *sbl, int port_num);
/**
* @brief Sets up the serdes at the correct speed to perform autonegotiation
*
* @param sbl sbl_inst pointer containing target config and state
* @param port_num target port number
*
* @return 0 on success or negative errno on failure
*/
int sbl_an_serdes_start(struct sbl_inst *sbl, int port_num);
/**
* @brief Stops the SerDes lanes for a given port
*
* @param sbl sbl_inst pointer containing target config and state
* @param port_num target port number
*
* @return 0 on success or negative errno on failure
*/
int sbl_an_serdes_stop(struct sbl_inst *sbl, int port_num);
#endif /* _SBL_SERDES_H_ */