b0ca13682c80fcb08a46c9744840d046e0bad635
[openwrt/openwrt.git] / target / linux / mediatek / files-5.10 / drivers / net / phy / rtk / rtl8367c / include / rtk_switch.h
1 /*
2 * Copyright (C) 2013 Realtek Semiconductor Corp.
3 * All Rights Reserved.
4 *
5 * Unless you and Realtek execute a separate written software license
6 * agreement governing use of this software, this software is licensed
7 * to you under the terms of the GNU General Public License version 2,
8 * available at https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
9 *
10 * $Revision: 76336 $
11 * $Date: 2017-03-09 10:41:21 +0800 (ι€±ε››, 09 δΈ‰ζœˆ 2017) $
12 *
13 * Purpose : RTK switch high-level API
14 * Feature : Here is a list of all functions and variables in this module.
15 *
16 */
17
18 #ifndef __RTK_SWITCH_H__
19 #define __RTK_SWITCH_H__
20
21 #include <rtk_types.h>
22
23 #define UNDEFINE_PHY_PORT (0xFF)
24 #define RTK_SWITCH_PORT_NUM (32)
25
26 #define MAXPKTLEN_CFG_ID_MAX (1)
27
28 #define RTK_SWITCH_MAX_PKTLEN (0x3FFF)
29
30 typedef enum init_state_e
31 {
32 INIT_NOT_COMPLETED = 0,
33 INIT_COMPLETED,
34 INIT_STATE_END
35 } init_state_t;
36
37 typedef enum switch_chip_e
38 {
39 CHIP_RTL8367C = 0,
40 CHIP_RTL8370B,
41 CHIP_RTL8364B,
42 CHIP_RTL8363SC_VB,
43 CHIP_END
44 }switch_chip_t;
45
46 typedef enum port_type_e
47 {
48 UTP_PORT = 0,
49 EXT_PORT,
50 UNKNOWN_PORT = 0xFF,
51 PORT_TYPE_END
52 }port_type_t;
53
54 typedef struct rtk_switch_halCtrl_s
55 {
56 switch_chip_t switch_type;
57 rtk_uint32 l2p_port[RTK_SWITCH_PORT_NUM];
58 rtk_uint32 p2l_port[RTK_SWITCH_PORT_NUM];
59 port_type_t log_port_type[RTK_SWITCH_PORT_NUM];
60 rtk_uint32 ptp_port[RTK_SWITCH_PORT_NUM];
61 rtk_uint32 valid_portmask;
62 rtk_uint32 valid_utp_portmask;
63 rtk_uint32 valid_ext_portmask;
64 rtk_uint32 valid_cpu_portmask;
65 rtk_uint32 min_phy_port;
66 rtk_uint32 max_phy_port;
67 rtk_uint32 phy_portmask;
68 rtk_uint32 combo_logical_port;
69 rtk_uint32 hsg_logical_port;
70 rtk_uint32 sg_logical_portmask;
71 rtk_uint32 max_meter_id;
72 rtk_uint32 max_lut_addr_num;
73 rtk_uint32 trunk_group_mask;
74
75 }rtk_switch_halCtrl_t;
76
77 typedef enum rtk_switch_maxPktLen_linkSpeed_e {
78 MAXPKTLEN_LINK_SPEED_FE = 0,
79 MAXPKTLEN_LINK_SPEED_GE,
80 MAXPKTLEN_LINK_SPEED_END,
81 } rtk_switch_maxPktLen_linkSpeed_t;
82
83
84 /* UTIL MACRO */
85 #define RTK_CHK_INIT_STATE() \
86 do \
87 { \
88 if(rtk_switch_initialState_get() != INIT_COMPLETED) \
89 { \
90 return RT_ERR_NOT_INIT; \
91 } \
92 }while(0)
93
94 #define RTK_CHK_PORT_VALID(__port__) \
95 do \
96 { \
97 if(rtk_switch_logicalPortCheck(__port__) != RT_ERR_OK) \
98 { \
99 return RT_ERR_PORT_ID; \
100 } \
101 }while(0)
102
103 #define RTK_CHK_PORT_IS_UTP(__port__) \
104 do \
105 { \
106 if(rtk_switch_isUtpPort(__port__) != RT_ERR_OK) \
107 { \
108 return RT_ERR_PORT_ID; \
109 } \
110 }while(0)
111
112 #define RTK_CHK_PORT_IS_EXT(__port__) \
113 do \
114 { \
115 if(rtk_switch_isExtPort(__port__) != RT_ERR_OK) \
116 { \
117 return RT_ERR_PORT_ID; \
118 } \
119 }while(0)
120
121 #define RTK_CHK_PORT_IS_COMBO(__port__) \
122 do \
123 { \
124 if(rtk_switch_isComboPort(__port__) != RT_ERR_OK) \
125 { \
126 return RT_ERR_PORT_ID; \
127 } \
128 }while(0)
129
130 #define RTK_CHK_PORT_IS_PTP(__port__) \
131 do \
132 { \
133 if(rtk_switch_isPtpPort(__port__) != RT_ERR_OK) \
134 { \
135 return RT_ERR_PORT_ID; \
136 } \
137 }while(0)
138
139 #define RTK_CHK_PORTMASK_VALID(__portmask__) \
140 do \
141 { \
142 if(rtk_switch_isPortMaskValid(__portmask__) != RT_ERR_OK) \
143 { \
144 return RT_ERR_PORT_MASK; \
145 } \
146 }while(0)
147
148 #define RTK_CHK_PORTMASK_VALID_ONLY_UTP(__portmask__) \
149 do \
150 { \
151 if(rtk_switch_isPortMaskUtp(__portmask__) != RT_ERR_OK) \
152 { \
153 return RT_ERR_PORT_MASK; \
154 } \
155 }while(0)
156
157 #define RTK_CHK_PORTMASK_VALID_ONLY_EXT(__portmask__) \
158 do \
159 { \
160 if(rtk_switch_isPortMaskExt(__portmask__) != RT_ERR_OK) \
161 { \
162 return RT_ERR_PORT_MASK; \
163 } \
164 }while(0)
165
166 #define RTK_CHK_TRUNK_GROUP_VALID(__grpId__) \
167 do \
168 { \
169 if(rtk_switch_isValidTrunkGrpId(__grpId__) != RT_ERR_OK) \
170 { \
171 return RT_ERR_LA_TRUNK_ID; \
172 } \
173 }while(0)
174
175 #define RTK_PORTMASK_IS_PORT_SET(__portmask__, __port__) (((__portmask__).bits[0] & (0x00000001 << __port__)) ? 1 : 0)
176 #define RTK_PORTMASK_IS_EMPTY(__portmask__) (((__portmask__).bits[0] == 0) ? 1 : 0)
177 #define RTK_PORTMASK_CLEAR(__portmask__) ((__portmask__).bits[0] = 0)
178 #define RTK_PORTMASK_PORT_SET(__portmask__, __port__) ((__portmask__).bits[0] |= (0x00000001 << __port__))
179 #define RTK_PORTMASK_PORT_CLEAR(__portmask__, __port__) ((__portmask__).bits[0] &= ~(0x00000001 << __port__))
180 #define RTK_PORTMASK_ALLPORT_SET(__portmask__) (rtk_switch_logPortMask_get(&__portmask__))
181 #define RTK_PORTMASK_SCAN(__portmask__, __port__) for(__port__ = 0; __port__ < RTK_SWITCH_PORT_NUM; __port__++) if(RTK_PORTMASK_IS_PORT_SET(__portmask__, __port__))
182 #define RTK_PORTMASK_COMPARE(__portmask_A__, __portmask_B__) ((__portmask_A__).bits[0] - (__portmask_B__).bits[0])
183
184 #define RTK_SCAN_ALL_PHY_PORTMASK(__port__) for(__port__ = 0; __port__ < RTK_SWITCH_PORT_NUM; __port__++) if( (rtk_switch_phyPortMask_get() & (0x00000001 << __port__)))
185 #define RTK_SCAN_ALL_LOG_PORT(__port__) for(__port__ = 0; __port__ < RTK_SWITCH_PORT_NUM; __port__++) if( rtk_switch_logicalPortCheck(__port__) == RT_ERR_OK)
186 #define RTK_SCAN_ALL_LOG_PORTMASK(__portmask__) for((__portmask__).bits[0] = 0; (__portmask__).bits[0] < 0x7FFFF; (__portmask__).bits[0]++) if( rtk_switch_isPortMaskValid(&__portmask__) == RT_ERR_OK)
187
188 /* Port mask defination */
189 #define RTK_PHY_PORTMASK_ALL (rtk_switch_phyPortMask_get())
190
191 /* Port defination*/
192 #define RTK_MAX_LOGICAL_PORT_ID (rtk_switch_maxLogicalPort_get())
193
194 /* Function Name:
195 * rtk_switch_probe
196 * Description:
197 * Probe switch
198 * Input:
199 * None
200 * Output:
201 * None
202 * Return:
203 * RT_ERR_OK - Switch probed
204 * RT_ERR_FAILED - Switch Unprobed.
205 * Note:
206 *
207 */
208 extern rtk_api_ret_t rtk_switch_probe(switch_chip_t *pSwitchChip);
209
210 /* Function Name:
211 * rtk_switch_initialState_set
212 * Description:
213 * Set initial status
214 * Input:
215 * state - Initial state;
216 * Output:
217 * None
218 * Return:
219 * RT_ERR_OK - Initialized
220 * RT_ERR_FAILED - Uninitialized
221 * Note:
222 *
223 */
224 extern rtk_api_ret_t rtk_switch_initialState_set(init_state_t state);
225
226 /* Function Name:
227 * rtk_switch_initialState_get
228 * Description:
229 * Get initial status
230 * Input:
231 * None
232 * Output:
233 * None
234 * Return:
235 * INIT_COMPLETED - Initialized
236 * INIT_NOT_COMPLETED - Uninitialized
237 * Note:
238 *
239 */
240 extern init_state_t rtk_switch_initialState_get(void);
241
242 /* Function Name:
243 * rtk_switch_logicalPortCheck
244 * Description:
245 * Check logical port ID.
246 * Input:
247 * logicalPort - logical port ID
248 * Output:
249 * None
250 * Return:
251 * RT_ERR_OK - Port ID is correct
252 * RT_ERR_FAILED - Port ID is not correct
253 * RT_ERR_NOT_INIT - Not Initialize
254 * Note:
255 *
256 */
257 extern rtk_api_ret_t rtk_switch_logicalPortCheck(rtk_port_t logicalPort);
258
259 /* Function Name:
260 * rtk_switch_isUtpPort
261 * Description:
262 * Check is logical port a UTP port
263 * Input:
264 * logicalPort - logical port ID
265 * Output:
266 * None
267 * Return:
268 * RT_ERR_OK - Port ID is a UTP port
269 * RT_ERR_FAILED - Port ID is not a UTP port
270 * RT_ERR_NOT_INIT - Not Initialize
271 * Note:
272 *
273 */
274 extern rtk_api_ret_t rtk_switch_isUtpPort(rtk_port_t logicalPort);
275
276 /* Function Name:
277 * rtk_switch_isExtPort
278 * Description:
279 * Check is logical port a Extension port
280 * Input:
281 * logicalPort - logical port ID
282 * Output:
283 * None
284 * Return:
285 * RT_ERR_OK - Port ID is a EXT port
286 * RT_ERR_FAILED - Port ID is not a EXT port
287 * RT_ERR_NOT_INIT - Not Initialize
288 * Note:
289 *
290 */
291 extern rtk_api_ret_t rtk_switch_isExtPort(rtk_port_t logicalPort);
292
293 /* Function Name:
294 * rtk_switch_isHsgPort
295 * Description:
296 * Check is logical port a HSG port
297 * Input:
298 * logicalPort - logical port ID
299 * Output:
300 * None
301 * Return:
302 * RT_ERR_OK - Port ID is a HSG port
303 * RT_ERR_FAILED - Port ID is not a HSG port
304 * RT_ERR_NOT_INIT - Not Initialize
305 * Note:
306 *
307 */
308 extern rtk_api_ret_t rtk_switch_isHsgPort(rtk_port_t logicalPort);
309
310 /* Function Name:
311 * rtk_switch_isSgmiiPort
312 * Description:
313 * Check is logical port a SGMII port
314 * Input:
315 * logicalPort - logical port ID
316 * Output:
317 * None
318 * Return:
319 * RT_ERR_OK - Port ID is a SGMII port
320 * RT_ERR_FAILED - Port ID is not a SGMII port
321 * RT_ERR_NOT_INIT - Not Initialize
322 * Note:
323 *
324 */
325 extern rtk_api_ret_t rtk_switch_isSgmiiPort(rtk_port_t logicalPort);
326
327 /* Function Name:
328 * rtk_switch_isCPUPort
329 * Description:
330 * Check is logical port a CPU port
331 * Input:
332 * logicalPort - logical port ID
333 * Output:
334 * None
335 * Return:
336 * RT_ERR_OK - Port ID is a CPU port
337 * RT_ERR_FAILED - Port ID is not a CPU port
338 * RT_ERR_NOT_INIT - Not Initialize
339 * Note:
340 *
341 */
342 extern rtk_api_ret_t rtk_switch_isCPUPort(rtk_port_t logicalPort);
343
344 /* Function Name:
345 * rtk_switch_isComboPort
346 * Description:
347 * Check is logical port a Combo port
348 * Input:
349 * logicalPort - logical port ID
350 * Output:
351 * None
352 * Return:
353 * RT_ERR_OK - Port ID is a combo port
354 * RT_ERR_FAILED - Port ID is not a combo port
355 * RT_ERR_NOT_INIT - Not Initialize
356 * Note:
357 *
358 */
359 extern rtk_api_ret_t rtk_switch_isComboPort(rtk_port_t logicalPort);
360
361 /* Function Name:
362 * rtk_switch_ComboPort_get
363 * Description:
364 * Get Combo port ID
365 * Input:
366 * None
367 * Output:
368 * None
369 * Return:
370 * Port ID of combo port
371 * Note:
372 *
373 */
374 extern rtk_uint32 rtk_switch_ComboPort_get(void);
375
376 /* Function Name:
377 * rtk_switch_isPtpPort
378 * Description:
379 * Check is logical port a PTP port
380 * Input:
381 * logicalPort - logical port ID
382 * Output:
383 * None
384 * Return:
385 * RT_ERR_OK - Port ID is a PTP port
386 * RT_ERR_FAILED - Port ID is not a PTP port
387 * RT_ERR_NOT_INIT - Not Initialize
388 * Note:
389 *
390 */
391 extern rtk_api_ret_t rtk_switch_isPtpPort(rtk_port_t logicalPort);
392
393 /* Function Name:
394 * rtk_switch_port_L2P_get
395 * Description:
396 * Get physical port ID
397 * Input:
398 * logicalPort - logical port ID
399 * Output:
400 * None
401 * Return:
402 * Physical port ID
403 * Note:
404 *
405 */
406 extern rtk_uint32 rtk_switch_port_L2P_get(rtk_port_t logicalPort);
407
408 /* Function Name:
409 * rtk_switch_port_P2L_get
410 * Description:
411 * Get logical port ID
412 * Input:
413 * physicalPort - physical port ID
414 * Output:
415 * None
416 * Return:
417 * logical port ID
418 * Note:
419 *
420 */
421 extern rtk_port_t rtk_switch_port_P2L_get(rtk_uint32 physicalPort);
422
423 /* Function Name:
424 * rtk_switch_isPortMaskValid
425 * Description:
426 * Check portmask is valid or not
427 * Input:
428 * pPmask - logical port mask
429 * Output:
430 * None
431 * Return:
432 * RT_ERR_OK - port mask is valid
433 * RT_ERR_FAILED - port mask is not valid
434 * RT_ERR_NOT_INIT - Not Initialize
435 * RT_ERR_NULL_POINTER - Null pointer
436 * Note:
437 *
438 */
439 extern rtk_api_ret_t rtk_switch_isPortMaskValid(rtk_portmask_t *pPmask);
440
441 /* Function Name:
442 * rtk_switch_isPortMaskUtp
443 * Description:
444 * Check all ports in portmask are only UTP port
445 * Input:
446 * pPmask - logical port mask
447 * Output:
448 * None
449 * Return:
450 * RT_ERR_OK - Only UTP port in port mask
451 * RT_ERR_FAILED - Not only UTP port in port mask
452 * RT_ERR_NOT_INIT - Not Initialize
453 * RT_ERR_NULL_POINTER - Null pointer
454 * Note:
455 *
456 */
457 extern rtk_api_ret_t rtk_switch_isPortMaskUtp(rtk_portmask_t *pPmask);
458
459 /* Function Name:
460 * rtk_switch_isPortMaskExt
461 * Description:
462 * Check all ports in portmask are only EXT port
463 * Input:
464 * pPmask - logical port mask
465 * Output:
466 * None
467 * Return:
468 * RT_ERR_OK - Only EXT port in port mask
469 * RT_ERR_FAILED - Not only EXT port in port mask
470 * RT_ERR_NOT_INIT - Not Initialize
471 * RT_ERR_NULL_POINTER - Null pointer
472 * Note:
473 *
474 */
475 extern rtk_api_ret_t rtk_switch_isPortMaskExt(rtk_portmask_t *pPmask);
476
477 /* Function Name:
478 * rtk_switch_portmask_L2P_get
479 * Description:
480 * Get physicl portmask from logical portmask
481 * Input:
482 * pLogicalPmask - logical port mask
483 * Output:
484 * pPhysicalPortmask - physical port mask
485 * Return:
486 * RT_ERR_OK - OK
487 * RT_ERR_NOT_INIT - Not Initialize
488 * RT_ERR_NULL_POINTER - Null pointer
489 * RT_ERR_PORT_MASK - Error port mask
490 * Note:
491 *
492 */
493 extern rtk_api_ret_t rtk_switch_portmask_L2P_get(rtk_portmask_t *pLogicalPmask, rtk_uint32 *pPhysicalPortmask);
494
495 /* Function Name:
496 * rtk_switch_portmask_P2L_get
497 * Description:
498 * Get logical portmask from physical portmask
499 * Input:
500 * physicalPortmask - physical port mask
501 * Output:
502 * pLogicalPmask - logical port mask
503 * Return:
504 * RT_ERR_OK - OK
505 * RT_ERR_NOT_INIT - Not Initialize
506 * RT_ERR_NULL_POINTER - Null pointer
507 * RT_ERR_PORT_MASK - Error port mask
508 * Note:
509 *
510 */
511 extern rtk_api_ret_t rtk_switch_portmask_P2L_get(rtk_uint32 physicalPortmask, rtk_portmask_t *pLogicalPmask);
512
513 /* Function Name:
514 * rtk_switch_phyPortMask_get
515 * Description:
516 * Get physical portmask
517 * Input:
518 * None
519 * Output:
520 * None
521 * Return:
522 * 0x00 - Not Initialize
523 * Other value - Physical port mask
524 * Note:
525 *
526 */
527 rtk_uint32 rtk_switch_phyPortMask_get(void);
528
529 /* Function Name:
530 * rtk_switch_logPortMask_get
531 * Description:
532 * Get Logical portmask
533 * Input:
534 * None
535 * Output:
536 * None
537 * Return:
538 * RT_ERR_OK - OK
539 * RT_ERR_NOT_INIT - Not Initialize
540 * RT_ERR_NULL_POINTER - Null pointer
541 * Note:
542 *
543 */
544 rtk_api_ret_t rtk_switch_logPortMask_get(rtk_portmask_t *pPortmask);
545
546 /* Function Name:
547 * rtk_switch_init
548 * Description:
549 * Set chip to default configuration enviroment
550 * Input:
551 * None
552 * Output:
553 * None
554 * Return:
555 * RT_ERR_OK - OK
556 * RT_ERR_FAILED - Failed
557 * RT_ERR_SMI - SMI access error
558 * Note:
559 * The API can set chip registers to default configuration for different release chip model.
560 */
561 extern rtk_api_ret_t rtk_switch_init(void);
562
563 /* Function Name:
564 * rtk_switch_portMaxPktLen_set
565 * Description:
566 * Set Max packet length
567 * Input:
568 * port - Port ID
569 * speed - Speed
570 * cfgId - Configuration ID
571 * Output:
572 * None.
573 * Return:
574 * RT_ERR_OK - OK
575 * RT_ERR_FAILED - Failed
576 * RT_ERR_SMI - SMI access error
577 * RT_ERR_INPUT - Error Input
578 * Note:
579 */
580 extern rtk_api_ret_t rtk_switch_portMaxPktLen_set(rtk_port_t port, rtk_switch_maxPktLen_linkSpeed_t speed, rtk_uint32 cfgId);
581
582 /* Function Name:
583 * rtk_switch_portMaxPktLen_get
584 * Description:
585 * Get Max packet length
586 * Input:
587 * port - Port ID
588 * speed - Speed
589 * Output:
590 * pCfgId - Configuration ID
591 * Return:
592 * RT_ERR_OK - OK
593 * RT_ERR_FAILED - Failed
594 * RT_ERR_SMI - SMI access error
595 * RT_ERR_INPUT - Error Input
596 * Note:
597 */
598 extern rtk_api_ret_t rtk_switch_portMaxPktLen_get(rtk_port_t port, rtk_switch_maxPktLen_linkSpeed_t speed, rtk_uint32 *pCfgId);
599
600 /* Function Name:
601 * rtk_switch_maxPktLenCfg_set
602 * Description:
603 * Set Max packet length configuration
604 * Input:
605 * cfgId - Configuration ID
606 * pktLen - Max packet length
607 * Output:
608 * None.
609 * Return:
610 * RT_ERR_OK - OK
611 * RT_ERR_FAILED - Failed
612 * RT_ERR_SMI - SMI access error
613 * RT_ERR_INPUT - Error Input
614 * Note:
615 */
616 extern rtk_api_ret_t rtk_switch_maxPktLenCfg_set(rtk_uint32 cfgId, rtk_uint32 pktLen);
617
618 /* Function Name:
619 * rtk_switch_maxPktLenCfg_get
620 * Description:
621 * Get Max packet length configuration
622 * Input:
623 * cfgId - Configuration ID
624 * pPktLen - Max packet length
625 * Output:
626 * None.
627 * Return:
628 * RT_ERR_OK - OK
629 * RT_ERR_FAILED - Failed
630 * RT_ERR_SMI - SMI access error
631 * RT_ERR_INPUT - Error Input
632 * Note:
633 */
634 extern rtk_api_ret_t rtk_switch_maxPktLenCfg_get(rtk_uint32 cfgId, rtk_uint32 *pPktLen);
635
636 /* Function Name:
637 * rtk_switch_greenEthernet_set
638 * Description:
639 * Set all Ports Green Ethernet state.
640 * Input:
641 * enable - Green Ethernet state.
642 * Output:
643 * None
644 * Return:
645 * RT_ERR_OK - OK
646 * RT_ERR_FAILED - Failed
647 * RT_ERR_SMI - SMI access error
648 * RT_ERR_ENABLE - Invalid enable input.
649 * Note:
650 * This API can set all Ports Green Ethernet state.
651 * The configuration is as following:
652 * - DISABLE
653 * - ENABLE
654 */
655 extern rtk_api_ret_t rtk_switch_greenEthernet_set(rtk_enable_t enable);
656
657 /* Function Name:
658 * rtk_switch_greenEthernet_get
659 * Description:
660 * Get all Ports Green Ethernet state.
661 * Input:
662 * None
663 * Output:
664 * pEnable - Green Ethernet state.
665 * Return:
666 * RT_ERR_OK - OK
667 * RT_ERR_FAILED - Failed
668 * RT_ERR_SMI - SMI access error
669 * Note:
670 * This API can get Green Ethernet state.
671 */
672 extern rtk_api_ret_t rtk_switch_greenEthernet_get(rtk_enable_t *pEnable);
673
674 /* Function Name:
675 * rtk_switch_maxLogicalPort_get
676 * Description:
677 * Get Max logical port ID
678 * Input:
679 * None
680 * Output:
681 * None
682 * Return:
683 * Max logical port
684 * Note:
685 * This API can get max logical port
686 */
687 extern rtk_port_t rtk_switch_maxLogicalPort_get(void);
688
689 /* Function Name:
690 * rtk_switch_maxMeterId_get
691 * Description:
692 * Get Max Meter ID
693 * Input:
694 * None
695 * Output:
696 * None
697 * Return:
698 * 0x00 - Not Initialize
699 * Other value - Max Meter ID
700 * Note:
701 *
702 */
703 extern rtk_uint32 rtk_switch_maxMeterId_get(void);
704
705 /* Function Name:
706 * rtk_switch_maxLutAddrNumber_get
707 * Description:
708 * Get Max LUT Address number
709 * Input:
710 * None
711 * Output:
712 * None
713 * Return:
714 * 0x00 - Not Initialize
715 * Other value - Max LUT Address number
716 * Note:
717 *
718 */
719 extern rtk_uint32 rtk_switch_maxLutAddrNumber_get(void);
720
721 /* Function Name:
722 * rtk_switch_isValidTrunkGrpId
723 * Description:
724 * Check if trunk group is valid or not
725 * Input:
726 * grpId - Group ID
727 * Output:
728 * None
729 * Return:
730 * RT_ERR_OK - Trunk Group ID is valid
731 * RT_ERR_LA_TRUNK_ID - Trunk Group ID is not valid
732 * Note:
733 *
734 */
735 rtk_uint32 rtk_switch_isValidTrunkGrpId(rtk_uint32 grpId);
736
737 #endif