1*14b24e2bSVaishali Kulkarni /*
2*14b24e2bSVaishali Kulkarni * CDDL HEADER START
3*14b24e2bSVaishali Kulkarni *
4*14b24e2bSVaishali Kulkarni * The contents of this file are subject to the terms of the
5*14b24e2bSVaishali Kulkarni * Common Development and Distribution License, v.1,  (the "License").
6*14b24e2bSVaishali Kulkarni * You may not use this file except in compliance with the License.
7*14b24e2bSVaishali Kulkarni *
8*14b24e2bSVaishali Kulkarni * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*14b24e2bSVaishali Kulkarni * or http://opensource.org/licenses/CDDL-1.0.
10*14b24e2bSVaishali Kulkarni * See the License for the specific language governing permissions
11*14b24e2bSVaishali Kulkarni * and limitations under the License.
12*14b24e2bSVaishali Kulkarni *
13*14b24e2bSVaishali Kulkarni * When distributing Covered Code, include this CDDL HEADER in each
14*14b24e2bSVaishali Kulkarni * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*14b24e2bSVaishali Kulkarni * If applicable, add the following below this CDDL HEADER, with the
16*14b24e2bSVaishali Kulkarni * fields enclosed by brackets "[]" replaced with your own identifying
17*14b24e2bSVaishali Kulkarni * information: Portions Copyright [yyyy] [name of copyright owner]
18*14b24e2bSVaishali Kulkarni *
19*14b24e2bSVaishali Kulkarni * CDDL HEADER END
20*14b24e2bSVaishali Kulkarni */
21*14b24e2bSVaishali Kulkarni 
22*14b24e2bSVaishali Kulkarni /*
23*14b24e2bSVaishali Kulkarni * Copyright 2014-2017 Cavium, Inc.
24*14b24e2bSVaishali Kulkarni * The contents of this file are subject to the terms of the Common Development
25*14b24e2bSVaishali Kulkarni * and Distribution License, v.1,  (the "License").
26*14b24e2bSVaishali Kulkarni 
27*14b24e2bSVaishali Kulkarni * You may not use this file except in compliance with the License.
28*14b24e2bSVaishali Kulkarni 
29*14b24e2bSVaishali Kulkarni * You can obtain a copy of the License at available
30*14b24e2bSVaishali Kulkarni * at http://opensource.org/licenses/CDDL-1.0
31*14b24e2bSVaishali Kulkarni 
32*14b24e2bSVaishali Kulkarni * See the License for the specific language governing permissions and
33*14b24e2bSVaishali Kulkarni * limitations under the License.
34*14b24e2bSVaishali Kulkarni */
35*14b24e2bSVaishali Kulkarni 
36*14b24e2bSVaishali Kulkarni #ifndef __ECORE_PHY_API_H__
37*14b24e2bSVaishali Kulkarni #define __ECORE_PHY_API_H__
38*14b24e2bSVaishali Kulkarni 
39*14b24e2bSVaishali Kulkarni /**
40*14b24e2bSVaishali Kulkarni  * @brief Phy core write
41*14b24e2bSVaishali Kulkarni  *
42*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
43*14b24e2bSVaishali Kulkarni  *  @param p_ptt
44*14b24e2bSVaishali Kulkarni  *  @param port
45*14b24e2bSVaishali Kulkarni  *  @param addr - nvm offset
46*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
47*14b24e2bSVaishali Kulkarni  *  @param data_hi - low 32 bit of data to write
48*14b24e2bSVaishali Kulkarni  *  @param data_lo - high 32 bit of data to write
49*14b24e2bSVaishali Kulkarni  *
50*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
51*14b24e2bSVaishali Kulkarni  */
52*14b24e2bSVaishali Kulkarni int ecore_phy_core_write(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
53*14b24e2bSVaishali Kulkarni 			  u32 port, u32 addr, u32 data_lo, u32 data_hi,
54*14b24e2bSVaishali Kulkarni 			  char *p_phy_result_buf);
55*14b24e2bSVaishali Kulkarni 
56*14b24e2bSVaishali Kulkarni /**
57*14b24e2bSVaishali Kulkarni  * @brief Phy core read
58*14b24e2bSVaishali Kulkarni  *
59*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
60*14b24e2bSVaishali Kulkarni  *  @param p_ptt
61*14b24e2bSVaishali Kulkarni  *  @param port
62*14b24e2bSVaishali Kulkarni  *  @param addr - nvm offset
63*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
64*14b24e2bSVaishali Kulkarni  *
65*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
66*14b24e2bSVaishali Kulkarni  */
67*14b24e2bSVaishali Kulkarni int ecore_phy_core_read(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
68*14b24e2bSVaishali Kulkarni 			 u32 port, u32 addr, char *p_phy_result_buf);
69*14b24e2bSVaishali Kulkarni 
70*14b24e2bSVaishali Kulkarni /**
71*14b24e2bSVaishali Kulkarni  * @brief Phy raw write
72*14b24e2bSVaishali Kulkarni  *
73*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
74*14b24e2bSVaishali Kulkarni  *  @param p_ptt
75*14b24e2bSVaishali Kulkarni  *  @param port
76*14b24e2bSVaishali Kulkarni  *  @param lane
77*14b24e2bSVaishali Kulkarni  *  @param addr - nvm offset
78*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
79*14b24e2bSVaishali Kulkarni  *  @param data_hi - low 32 bit of data to write
80*14b24e2bSVaishali Kulkarni  *  @param data_lo - high 32 bit of data to write
81*14b24e2bSVaishali Kulkarni  *
82*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
83*14b24e2bSVaishali Kulkarni  */
84*14b24e2bSVaishali Kulkarni int ecore_phy_raw_write(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
85*14b24e2bSVaishali Kulkarni 			 u32 port, u32 lane, u32 addr, u32 data_lo,
86*14b24e2bSVaishali Kulkarni 			 u32 data_hi, char *p_phy_result_buf);
87*14b24e2bSVaishali Kulkarni 
88*14b24e2bSVaishali Kulkarni /**
89*14b24e2bSVaishali Kulkarni  * @brief Phy raw read
90*14b24e2bSVaishali Kulkarni  *
91*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
92*14b24e2bSVaishali Kulkarni  *  @param p_ptt
93*14b24e2bSVaishali Kulkarni  *  @param port
94*14b24e2bSVaishali Kulkarni  *  @param lane
95*14b24e2bSVaishali Kulkarni  *  @param addr - nvm offset
96*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
97*14b24e2bSVaishali Kulkarni  *
98*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
99*14b24e2bSVaishali Kulkarni  */
100*14b24e2bSVaishali Kulkarni int ecore_phy_raw_read(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
101*14b24e2bSVaishali Kulkarni 			u32 port, u32 lane, u32 addr, char *p_phy_result_buf);
102*14b24e2bSVaishali Kulkarni 
103*14b24e2bSVaishali Kulkarni /**
104*14b24e2bSVaishali Kulkarni  * @brief Phy mac status
105*14b24e2bSVaishali Kulkarni  *
106*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
107*14b24e2bSVaishali Kulkarni  *  @param p_ptt
108*14b24e2bSVaishali Kulkarni  *  @param port
109*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
110*14b24e2bSVaishali Kulkarni  *
111*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
112*14b24e2bSVaishali Kulkarni  */
113*14b24e2bSVaishali Kulkarni int ecore_phy_mac_stat(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
114*14b24e2bSVaishali Kulkarni 			u32 port, char *p_phy_result_buf);
115*14b24e2bSVaishali Kulkarni 
116*14b24e2bSVaishali Kulkarni /**
117*14b24e2bSVaishali Kulkarni  * @brief Phy info
118*14b24e2bSVaishali Kulkarni  *
119*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
120*14b24e2bSVaishali Kulkarni  *  @param p_ptt
121*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
122*14b24e2bSVaishali Kulkarni  *
123*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
124*14b24e2bSVaishali Kulkarni  */
125*14b24e2bSVaishali Kulkarni int ecore_phy_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
126*14b24e2bSVaishali Kulkarni 		    char *p_phy_result_buf);
127*14b24e2bSVaishali Kulkarni 
128*14b24e2bSVaishali Kulkarni /**
129*14b24e2bSVaishali Kulkarni  * @brief Sfp write
130*14b24e2bSVaishali Kulkarni  *
131*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
132*14b24e2bSVaishali Kulkarni  *  @param p_ptt
133*14b24e2bSVaishali Kulkarni  *  @param port
134*14b24e2bSVaishali Kulkarni  *  @param addr - I2C address
135*14b24e2bSVaishali Kulkarni  *  @param offset - EEPROM offset
136*14b24e2bSVaishali Kulkarni  *  @param size - number of bytes to write
137*14b24e2bSVaishali Kulkarni  *  @param val - byte array to write (1, 2 or 4 bytes)
138*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
139*14b24e2bSVaishali Kulkarni  *
140*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
141*14b24e2bSVaishali Kulkarni  */
142*14b24e2bSVaishali Kulkarni int ecore_phy_sfp_write(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
143*14b24e2bSVaishali Kulkarni 			u32 port, u32 addr, u32 offset, u32 size,
144*14b24e2bSVaishali Kulkarni 			u32 val, char *p_phy_result_buf);
145*14b24e2bSVaishali Kulkarni 
146*14b24e2bSVaishali Kulkarni /**
147*14b24e2bSVaishali Kulkarni  * @brief Sfp read
148*14b24e2bSVaishali Kulkarni  *
149*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
150*14b24e2bSVaishali Kulkarni  *  @param p_ptt
151*14b24e2bSVaishali Kulkarni  *  @param port
152*14b24e2bSVaishali Kulkarni  *  @param addr - I2C address
153*14b24e2bSVaishali Kulkarni  *  @param offset - EEPROM offset
154*14b24e2bSVaishali Kulkarni  *  @param size - number of bytes to read
155*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
156*14b24e2bSVaishali Kulkarni  *
157*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
158*14b24e2bSVaishali Kulkarni  */
159*14b24e2bSVaishali Kulkarni int ecore_phy_sfp_read(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
160*14b24e2bSVaishali Kulkarni 		       u32 port, u32 addr, u32 offset, u32 size,
161*14b24e2bSVaishali Kulkarni 		       char *p_phy_result_buf);
162*14b24e2bSVaishali Kulkarni 
163*14b24e2bSVaishali Kulkarni /**
164*14b24e2bSVaishali Kulkarni  * @brief Sfp decode
165*14b24e2bSVaishali Kulkarni  *
166*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
167*14b24e2bSVaishali Kulkarni  *  @param p_ptt
168*14b24e2bSVaishali Kulkarni  *  @param port
169*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
170*14b24e2bSVaishali Kulkarni  *
171*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
172*14b24e2bSVaishali Kulkarni  */
173*14b24e2bSVaishali Kulkarni int ecore_phy_sfp_decode(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
174*14b24e2bSVaishali Kulkarni 			 u32 port, char *p_phy_result_buf);
175*14b24e2bSVaishali Kulkarni 
176*14b24e2bSVaishali Kulkarni /**
177*14b24e2bSVaishali Kulkarni  * @brief Sfp get inserted
178*14b24e2bSVaishali Kulkarni  *
179*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
180*14b24e2bSVaishali Kulkarni  *  @param p_ptt
181*14b24e2bSVaishali Kulkarni  *  @param port
182*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
183*14b24e2bSVaishali Kulkarni  *
184*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
185*14b24e2bSVaishali Kulkarni  */
186*14b24e2bSVaishali Kulkarni int ecore_phy_sfp_get_inserted(struct ecore_hwfn *p_hwfn,
187*14b24e2bSVaishali Kulkarni 			       struct ecore_ptt *p_ptt,
188*14b24e2bSVaishali Kulkarni 			       u32 port, char *p_phy_result_buf);
189*14b24e2bSVaishali Kulkarni 
190*14b24e2bSVaishali Kulkarni /**
191*14b24e2bSVaishali Kulkarni  * @brief Sfp get txdisable
192*14b24e2bSVaishali Kulkarni  *
193*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
194*14b24e2bSVaishali Kulkarni  *  @param p_ptt
195*14b24e2bSVaishali Kulkarni  *  @param port
196*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
197*14b24e2bSVaishali Kulkarni  *
198*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
199*14b24e2bSVaishali Kulkarni  */
200*14b24e2bSVaishali Kulkarni int ecore_phy_sfp_get_txdisable(struct ecore_hwfn *p_hwfn,
201*14b24e2bSVaishali Kulkarni 				struct ecore_ptt *p_ptt,
202*14b24e2bSVaishali Kulkarni 				u32 port, char *p_phy_result_buf);
203*14b24e2bSVaishali Kulkarni 
204*14b24e2bSVaishali Kulkarni /**
205*14b24e2bSVaishali Kulkarni  * @brief Sfp set txdisable
206*14b24e2bSVaishali Kulkarni  *
207*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
208*14b24e2bSVaishali Kulkarni  *  @param p_ptt
209*14b24e2bSVaishali Kulkarni  *  @param port
210*14b24e2bSVaishali Kulkarni  *  @param txdisable - tx disable value to set
211*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
212*14b24e2bSVaishali Kulkarni  *
213*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
214*14b24e2bSVaishali Kulkarni  */
215*14b24e2bSVaishali Kulkarni int ecore_phy_sfp_set_txdisable(struct ecore_hwfn *p_hwfn,
216*14b24e2bSVaishali Kulkarni 				struct ecore_ptt *p_ptt,
217*14b24e2bSVaishali Kulkarni 				u32 port, u8 txdisable,
218*14b24e2bSVaishali Kulkarni 				char *p_phy_result_buf);
219*14b24e2bSVaishali Kulkarni 
220*14b24e2bSVaishali Kulkarni /**
221*14b24e2bSVaishali Kulkarni  * @brief Sfp get txreset
222*14b24e2bSVaishali Kulkarni  *
223*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
224*14b24e2bSVaishali Kulkarni  *  @param p_ptt
225*14b24e2bSVaishali Kulkarni  *  @param port
226*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
227*14b24e2bSVaishali Kulkarni  *
228*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
229*14b24e2bSVaishali Kulkarni  */
230*14b24e2bSVaishali Kulkarni int ecore_phy_sfp_get_txreset(struct ecore_hwfn *p_hwfn,
231*14b24e2bSVaishali Kulkarni 			      struct ecore_ptt *p_ptt,
232*14b24e2bSVaishali Kulkarni 			      u32 port, char *p_phy_result_buf);
233*14b24e2bSVaishali Kulkarni 
234*14b24e2bSVaishali Kulkarni /**
235*14b24e2bSVaishali Kulkarni  * @brief Sfp get rxlos
236*14b24e2bSVaishali Kulkarni  *
237*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
238*14b24e2bSVaishali Kulkarni  *  @param p_ptt
239*14b24e2bSVaishali Kulkarni  *  @param port
240*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
241*14b24e2bSVaishali Kulkarni  *
242*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
243*14b24e2bSVaishali Kulkarni  */
244*14b24e2bSVaishali Kulkarni int ecore_phy_sfp_get_rxlos(struct ecore_hwfn *p_hwfn,
245*14b24e2bSVaishali Kulkarni 			    struct ecore_ptt *p_ptt,
246*14b24e2bSVaishali Kulkarni 			    u32 port, char *p_phy_result_buf);
247*14b24e2bSVaishali Kulkarni 
248*14b24e2bSVaishali Kulkarni /**
249*14b24e2bSVaishali Kulkarni  * @brief Sfp get eeprom
250*14b24e2bSVaishali Kulkarni  *
251*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
252*14b24e2bSVaishali Kulkarni  *  @param p_ptt
253*14b24e2bSVaishali Kulkarni  *  @param port
254*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
255*14b24e2bSVaishali Kulkarni  *
256*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
257*14b24e2bSVaishali Kulkarni  */
258*14b24e2bSVaishali Kulkarni int ecore_phy_sfp_get_eeprom(struct ecore_hwfn *p_hwfn,
259*14b24e2bSVaishali Kulkarni 			     struct ecore_ptt *p_ptt,
260*14b24e2bSVaishali Kulkarni 			     u32 port, char *p_phy_result_buf);
261*14b24e2bSVaishali Kulkarni 
262*14b24e2bSVaishali Kulkarni /**
263*14b24e2bSVaishali Kulkarni  * @brief Gpio write
264*14b24e2bSVaishali Kulkarni  *
265*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
266*14b24e2bSVaishali Kulkarni  *  @param p_ptt
267*14b24e2bSVaishali Kulkarni  *  @param gpio - gpio number
268*14b24e2bSVaishali Kulkarni  *  @param gpio_val - value to write to gpio
269*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
270*14b24e2bSVaishali Kulkarni  *
271*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
272*14b24e2bSVaishali Kulkarni  */
273*14b24e2bSVaishali Kulkarni int ecore_phy_gpio_write(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
274*14b24e2bSVaishali Kulkarni 			 u16 gpio, u16 gpio_val, char *p_phy_result_buf);
275*14b24e2bSVaishali Kulkarni 
276*14b24e2bSVaishali Kulkarni /**
277*14b24e2bSVaishali Kulkarni  * @brief Gpio read
278*14b24e2bSVaishali Kulkarni  *
279*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
280*14b24e2bSVaishali Kulkarni  *  @param p_ptt
281*14b24e2bSVaishali Kulkarni  *  @param gpio - gpio number
282*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
283*14b24e2bSVaishali Kulkarni  *
284*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
285*14b24e2bSVaishali Kulkarni  */
286*14b24e2bSVaishali Kulkarni int ecore_phy_gpio_read(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
287*14b24e2bSVaishali Kulkarni 			u16 gpio, char *p_phy_result_buf);
288*14b24e2bSVaishali Kulkarni 
289*14b24e2bSVaishali Kulkarni /**
290*14b24e2bSVaishali Kulkarni  * @brief Gpio get information
291*14b24e2bSVaishali Kulkarni  *
292*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
293*14b24e2bSVaishali Kulkarni  *  @param p_ptt
294*14b24e2bSVaishali Kulkarni  *  @param gpio - gpio number
295*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
296*14b24e2bSVaishali Kulkarni  *
297*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
298*14b24e2bSVaishali Kulkarni  */
299*14b24e2bSVaishali Kulkarni int ecore_phy_gpio_info(struct ecore_hwfn *p_hwfn,
300*14b24e2bSVaishali Kulkarni 			struct ecore_ptt *p_ptt,
301*14b24e2bSVaishali Kulkarni 			u16 gpio, char *p_phy_result_buf);
302*14b24e2bSVaishali Kulkarni 
303*14b24e2bSVaishali Kulkarni /**
304*14b24e2bSVaishali Kulkarni  * @brief Ext-Phy Read operation
305*14b24e2bSVaishali Kulkarni  *
306*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
307*14b24e2bSVaishali Kulkarni  *  @param p_ptt
308*14b24e2bSVaishali Kulkarni  *  @param port - port number
309*14b24e2bSVaishali Kulkarni  *  @param devad - device address
310*14b24e2bSVaishali Kulkarni  *  @param reg - register
311*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
312*14b24e2bSVaishali Kulkarni  *
313*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
314*14b24e2bSVaishali Kulkarni  */
315*14b24e2bSVaishali Kulkarni int ecore_phy_extphy_read(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
316*14b24e2bSVaishali Kulkarni 			  u16 port, u16 devad, u16 reg, char *p_phy_result_buf);
317*14b24e2bSVaishali Kulkarni 
318*14b24e2bSVaishali Kulkarni /**
319*14b24e2bSVaishali Kulkarni  * @brief Ext-Phy Write operation
320*14b24e2bSVaishali Kulkarni  *
321*14b24e2bSVaishali Kulkarni  *  @param p_hwfn
322*14b24e2bSVaishali Kulkarni  *  @param p_ptt
323*14b24e2bSVaishali Kulkarni  *  @param port - port number
324*14b24e2bSVaishali Kulkarni  *  @param devad - device address
325*14b24e2bSVaishali Kulkarni  *  @param reg - register
326*14b24e2bSVaishali Kulkarni  *  @param val - value to be written
327*14b24e2bSVaishali Kulkarni  *  @param p_phy_result_buf - result buffer
328*14b24e2bSVaishali Kulkarni  *
329*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
330*14b24e2bSVaishali Kulkarni  */
331*14b24e2bSVaishali Kulkarni int ecore_phy_extphy_write(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
332*14b24e2bSVaishali Kulkarni 			   u16 port, u16 devad, u16 reg, u16 val,
333*14b24e2bSVaishali Kulkarni 			   char *p_phy_result_buf);
334*14b24e2bSVaishali Kulkarni 
335*14b24e2bSVaishali Kulkarni #endif