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

pm8x50_shared.c (1373B)


      1 /*
      2  *
      3  * 
      4  *
      5  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      6  * 
      7  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      8  */
      9 
     10 #ifdef _ERR_MSG_MODULE_NAME
     11 #error "_ERR_MSG_MODULE_NAME redefined"
     12 #endif
     13 #define _ERR_MSG_MODULE_NAME BSL_LS_SOC_PORT
     14 
     15 #include <soc/portmod/portmod.h>
     16 #include <soc/drv.h>
     17 
     18 #if defined(PORTMOD_PM8X50_SUPPORT) || defined (PORTMOD_PM8X50_FABRIC_SUPPORT)
     19 
     20 #include <soc/portmod/pm8x50_shared.h>
     21 
     22 /*
     23  * Get the VCO rates from given PCS bypassed port speed
     24  */
     25 
     26 int pm8x50_shared_pcs_bypassed_vco_get(int speed, portmod_vco_type_t* vco)
     27 {
     28     SOC_INIT_FUNC_DEFS;
     29 
     30     switch (speed) {
     31         case 56250:
     32         case 28125:
     33             *vco = portmodVCO28P125G;
     34             break;
     35         case 53125:
     36             *vco = portmodVCO26P562G;
     37             break;
     38         case 27343:
     39             *vco = portmodVCO27P343G;
     40             break;
     41         case 25781:
     42             *vco = portmodVCO25P781G;
     43             break;
     44         case 12500:
     45             *vco = portmodVCO25G;
     46             break;
     47         case 10312:
     48             *vco = portmodVCO20P625G;
     49             break;
     50         default:
     51             *vco = portmodVCOInvalid;
     52             break;
     53     }
     54 
     55     SOC_FUNC_RETURN;
     56 }
     57 
     58 #endif /* #if defined(PORTMOD_PM8X50_SUPPORT) || defined (PORTMOD_PM8X50_FABRIC_SUPPORT) */