openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

tdm_hx5_shim.c (1641B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6  * $All Rights Reserved.$
      7  *
      8  * TDM chip to core API shim layer
      9  */
     10 #ifdef _TDM_STANDALONE
     11 	#include <tdm_top.h>
     12 #else
     13 	#include <soc/tdm/core/tdm_top.h>
     14 #endif
     15 
     16 
     17 /**
     18 @name: tdm_hx5_shim_get_port_pm
     19 @param:
     20 
     21 Return PM number to which the input port belongs
     22  */
     23 int
     24 tdm_hx5_shim_get_port_pm(tdm_mod_t *_tdm)
     25 {
     26     return (tdm_hx5_cmn_get_port_pm(_tdm->_core_data.vars_pkg.port, _tdm));
     27 }
     28 
     29 
     30 /**
     31 @name: tdm_hx5_shim_get_pipe_ethernet
     32 @param:
     33 
     34 Returns BOOL_TRUE if pipe of the given port has traffic entirely Ethernet,
     35 otherwise returns BOOL_FALSE.
     36  */
     37 int
     38 tdm_hx5_shim_get_pipe_ethernet(tdm_mod_t *_tdm)
     39 {
     40     int result = BOOL_TRUE;
     41 
     42     if (_tdm->_core_data.vars_pkg.port<=64) {
     43         result = tdm_hx5_cmn_get_pipe_ethernet(0, _tdm);
     44     } else if (_tdm->_core_data.vars_pkg.port<=128){
     45         result = tdm_hx5_cmn_get_pipe_ethernet(1, _tdm);
     46     }
     47 
     48     return (result);
     49 }
     50 
     51 
     52 /**
     53 @name: tdm_chip_th2_shim__core_vbs_scheduler_ovs
     54 @param:
     55 
     56 Passthru function for oversub scheduling request from TD2/TD2+
     57  */
     58 int
     59 tdm_hx5_shim_core_vbs_scheduler_ovs(tdm_mod_t *_tdm)
     60 {
     61     if (_tdm->_chip_data.soc_pkg.flex_port_en) {
     62         /* Used for FlexPort */
     63         /* return tdm_hx5_vbs_scheduler_ovs_flex_port(_tdm); */
     64         /* return tdm_hx5_vbs_scheduler_ovs_flex_port_delta(_tdm) */;
     65         return tdm_core_vbs_scheduler_ovs(_tdm);
     66     } else {
     67         /* Used for initial config */
     68         return tdm_core_vbs_scheduler_ovs(_tdm);
     69     }
     70 }