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

phyxehg.c (1672B)


      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  *
      7  * File:        phyxehg.c
      8  * Purpose:     Defines common PHY driver routines for Broadcom 10G PHYs.
      9  */
     10 
     11 #include <sal/types.h>
     12 #include <sal/core/spl.h>
     13 
     14 #include <soc/drv.h>
     15 #include <soc/debug.h>
     16 #include <soc/error.h>
     17 #include <soc/phyreg.h>
     18 
     19 #include <soc/ll.h>
     20 #include <soc/phy/phyctrl.h>
     21 
     22 #include "phydefs.h"      /* Must include before other phy related includes */
     23 
     24 #if defined(INCLUDE_PHY_XEHG)
     25 #include "phyconfig.h"    /* Must be the first phy include after phydefs.h */
     26 #include "phyreg.h"
     27 #include "phyxehg.h"
     28 
     29 int
     30 phy_xehg_speed_set(int unit, soc_port_t port, int speed)
     31 {
     32     COMPILER_REFERENCE(unit);
     33     COMPILER_REFERENCE(port);
     34 
     35     if (speed != 10000) {
     36         return SOC_E_PARAM;
     37     }
     38 
     39     return SOC_E_NONE;
     40 }
     41 
     42 int
     43 phy_xehg_speed_get(int unit, soc_port_t port, int *speed)
     44 {
     45     COMPILER_REFERENCE(unit);
     46     COMPILER_REFERENCE(port);
     47 
     48     *speed = 10000;
     49    
     50     return SOC_E_NONE;
     51 }
     52 
     53 int
     54 phy_xehg_interface_get(int unit, soc_port_t port, soc_port_if_t *pif)
     55 {
     56     COMPILER_REFERENCE(unit);
     57     COMPILER_REFERENCE(port);
     58 
     59     *pif = SOC_PORT_IF_XAUI;
     60 
     61     return SOC_E_NONE;
     62 }
     63 
     64 int
     65 phy_xehg_ability_get(int unit, soc_port_t port, soc_port_mode_t *mode)
     66 {
     67     COMPILER_REFERENCE(unit);
     68     COMPILER_REFERENCE(port);
     69 
     70     *mode = (SOC_PM_10GB_FD | SOC_PM_XGMII | SOC_PM_LB_PHY |
     71              SOC_PM_PAUSE | SOC_PM_PAUSE_ASYMM);
     72 
     73     return SOC_E_NONE;
     74 }
     75 #else /* INCLUDE_PHY_XEHG */
     76 int _phy_xehg_not_empty;
     77 #endif /* INCLUDE_PHY_XEHG */
     78