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

temod.h (17739B)


      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  *  Broadcom Corporation
      8  *  Proprietary and Confidential information
      9  *  All rights reserved
     10  *  This source file is the property of Broadcom Corporation, and
     11  *  may not be copied or distributed in any isomorphic form without the
     12  *  prior written consent of Broadcom Corporation.
     13  *----------------------------------------------------------------------
     14  *  Description: define enumerators  
     15  *----------------------------------------------------------------------*/
     16 /*
     17  *  
     18  * $Copyright:
     19  * All Rights Reserved.$
     20  */
     21 #ifndef _TEMOD_H_
     22 #define _TEMOD_H_
     23 
     24 #ifndef _DV_TB_
     25 #define _SDK_TEMOD_ 1
     26 #endif
     27 
     28 #ifdef _SDK_TEMOD_
     29 #include <phymod/phymod.h>
     30 #endif
     31 
     32 #ifndef PHYMOD_ST
     33 #ifdef _SDK_TEMOD_
     34   #define PHYMOD_ST  const phymod_access_t
     35 #else
     36   #define PHYMOD_ST  temod_st
     37 #endif /* _SDK_TEMOD_ */
     38 #endif /* PHYMOD_ST */
     39 
     40 #ifdef _DV_TB_
     41 #include <stdint.h>
     42 #include <stdio.h>
     43 #include <string.h>
     44 #include <stdlib.h>
     45 #include "errno.h"
     46 #endif
     47 
     48 /* So far 4 bits debug mask are used by TMOD */
     49 /* Moved to temod_device.h chip specific debug.
     50 #define TEMOD_DBG_REGACC     (1L << 3) * Print all register accesses * 
     51 #define TEMOD_DBG_FUNCVALOUT (1L << 2) * All values returned by Tier1*
     52 #define TEMOD_DBG_FUNCVALIN  (1L << 1) * All values pumped into Tier1*
     53 #define TEMOD_DBG_FUNC       (1L << 0) * Every time we enter a  Tier1*
     54 */
     55 
     56 #define TEMOD_OVERRIDE_CFG 0x80000000
     57 
     58 typedef enum {
     59     TEMOD_NONE = 0, 
     60     TEMOD_DECODER_CL49,
     61     TEMOD_DECODER_BRCMCL49,
     62     TEMOD_DECODER_CUSTOM,
     63     TEMOD_DECODER_CL48,
     64     TEMOD_DECODER_CL36,
     65     TEMOD_DECODER_TYPE_COUNT
     66 }temod_decoder_type_t;
     67 
     68 typedef enum {
     69     TEMOD_ENCODER_DISABLE = 0, 
     70     TEMOD_ENCODER_CL48,
     71     TEMOD_ENCODER_RXAUI_CL48,
     72     TEMOD_ENCODER_CL36,
     73     TEMOD_ENCODER_CL82,
     74     TEMOD_ENCODER_CL49,
     75     TEMOD_ENCODER_BRCMCL49,
     76     TEMOD_ENCODER_TYPE_COUNT
     77 }temod_encoder_type_t;
     78 
     79 typedef enum {
     80     TEMOD_AN_SET_RF_DISABLE = 0,
     81     TEMOD_AN_SET_SGMII_SPEED,
     82     TEMOD_AN_SET_SGMII_MASTER,
     83     TEMOD_AN_SET_HG_MODE,
     84     TEMOD_AN_SET_FEC_MODE,
     85     TEMOD_AN_SET_CL72_MODE,
     86     TEMOD_AN_SET_CL37_ATTR,
     87     TEMOD_AN_SET_CL48_SYNC,
     88     TEMOD_AN_SET_LK_FAIL_INHIBIT_TIMER_NO_CL72,
     89     TEMOD_AN_SET_CL73_FEC_OFF,
     90     TEMOD_AN_SET_CL73_FEC_ON,
     91     TEMOD_AN_SET_SPEED_PAUSE,
     92     TEMOD_AN_SET_TYPE_COUNT
     93 }temod_an_set_type_t;
     94 
     95 typedef union {
     96     int temod_an_set_rf_disable;
     97     int temod_an_set_sgmii_speed;
     98     int temod_an_set_sgmii_master;
     99     temod_an_set_type_t temod_an_set_cl37_attr;
    100 }temod_an_set_value_t;     
    101     
    102 
    103 typedef enum {
    104     TEMOD_AN_MODE_CL73 = 0,
    105     TEMOD_AN_MODE_CL37,
    106     TEMOD_AN_MODE_CL73BAM ,
    107     TEMOD_AN_MODE_CL37BAM ,
    108     TEMOD_AN_MODE_SGMII  ,
    109     TEMOD_AN_MODE_HPAM ,          /* this macro needed to be identical to temod_an_type */
    110     TEMOD_AN_MODE_CL37_SGMII,
    111     TEMOD_AN_MODE_NONE ,
    112     TEMOD_AN_MODE_TYPE_COUNT
    113 }temod_an_mode_type_t;
    114 
    115 typedef enum {
    116     TEMOD_AN_PORT_MODE_QUAD = 0,    /* 4 port on the core */
    117     TEMOD_AN_PORT_MODE_SINGLE,      /* 1 port using all 4 lane */
    118     TEMOD_AN_PORT_MODE_DUAL,        /* two port each using 2 lanes */
    119     TEMOD_AN_PORT_MODE_TRI_23,      /* three port, lane 2 and3 are aggregated */
    120     TEMOD_AN_PORT_MODE_TRI_10,      /* three ports, lane 0 and 1 are aggregated */
    121     TSMOD_AN_PORT_MODE_TYPE_COUNT
    122 }an_port_mode_type_t;
    123 
    124 typedef enum {
    125     TEMOD_TX_LANE_RESET = 0,
    126     TEMOD_TX_LANE_TRAFFIC_ENABLE = 1,  
    127     TEMOD_TX_LANE_TRAFFIC_DISABLE = 2,  
    128     TEMOD_TX_LANE_RESET_TRAFFIC_ENABLE = 3,
    129     TEMOD_TX_LANE_RESET_TRAFFIC_DISABLE = 4,
    130     TEMOD_TX_LANE_TYPE_COUNT
    131 }tx_lane_disable_type_t;
    132 
    133 typedef struct temod_an_control_s {
    134   temod_an_mode_type_t an_type; 
    135   uint16_t num_lane_adv; 
    136   uint16_t enable;
    137   uint16_t pd_kx_en;
    138   uint16_t pd_kx4_en; 
    139   an_property_enable  an_property_type;
    140 } temod_an_control_t;
    141 
    142 typedef enum {
    143     TEMOD_CL73_100GBASE_CR10 = 0,  
    144     TEMOD_CL73_40GBASE_CR4,  
    145     TEMOD_CL73_40GBASE_KR4,  
    146     TEMOD_CL73_10GBASE_KR,
    147     TEMOD_CL73_10GBASE_KX4,
    148     TEMOD_CL73_1000BASE_KX,
    149     TEMOD_CL73_SPEED_COUNT
    150 }temod_cl73_speed_t;
    151 
    152 typedef enum {
    153     TEMOD_CL73_BAM_20GBASE_KR2 = 0,  
    154     TEMOD_CL73_BAM_20GBASE_CR2,  
    155     TEMOD_CL73_BAM_SPEED_COUNT
    156 }temod_cl73_bam_speed_t;
    157 
    158 typedef enum {
    159     TEMOD_CL37_SGMII_10M = 0,  
    160     TEMOD_CL37_SGMII_100M,  
    161     TEMOD_CL37_SGMII_1000M,  
    162     TEMOD_CL37_SGMII_SPEED_COUNT
    163 }temod_cl37_sgmii_speed_t;
    164 
    165 
    166 typedef enum {
    167     TEMOD_CL37_BAM_13GBASE_X4 = 0,  
    168     TEMOD_CL37_BAM_15GBASE_X4,  
    169     TEMOD_CL37_BAM_15p75GBASE_X2,  
    170     TEMOD_CL37_BAM_16GBASE_X4,  
    171     TEMOD_CL37_BAM_20GBASE_X4_CX4,  
    172     TEMOD_CL37_BAM_20GBASE_X4,  
    173     TEMOD_CL37_BAM_20GBASE_X2,  
    174     TEMOD_CL37_BAM_20GBASE_X2_CX4,  
    175     TEMOD_CL37_BAM_21GBASE_X4,  
    176     TEMOD_CL37_BAM_25p455GBASE_X4,  
    177     TEMOD_CL37_BAM_31p5GBASE_X4,  
    178     TEMOD_CL37_BAM_32p7GBASE_X4,  
    179     TEMOD_CL37_BAM_40GBASE_X4,  
    180     TEMOD_CL37_BAM_SPEED1_COUNT
    181 }temod_cl37_bam_speed1_t;
    182 
    183 typedef enum {
    184     TEMOD_CL37_BAM_2p5GBASE_X = 0,  
    185     TEMOD_CL37_BAM_5GBASE_X4,  
    186     TEMOD_CL37_BAM_6GBASE_X4,  
    187     TEMOD_CL37_BAM_10GBASE_X4,  
    188     TEMOD_CL37_BAM_10GBASE_X4_CX4,  
    189     TEMOD_CL37_BAM_10GBASE_X2,  
    190     TEMOD_CL37_BAM_10GBASE_X2_CX4,  
    191     TEMOD_CL37_BAM_BAM_10p5GBASE_X2,  
    192     TEMOD_CL37_BAM_12GBASE_X4,  
    193     TEMOD_CL37_BAM_12p5GBASE_X4,
    194     TEMOD_CL37_BAM_12p7GBASE_X2,
    195     TEMOD_CL37_BAM_SPEED_COUNT
    196 }temod_cl37_bam_speed_t;
    197 
    198 
    199 typedef enum {
    200     TEMOD_NO_PAUSE = 0,  
    201     TEMOD_SYMM_PAUSE,
    202     TEMOD_ASYM_PAUSE,
    203     TEMOD_ASYM_SYMM_PAUSE,  
    204     TEMOD_AN_PAUSE_COUNT
    205 }temod_an_pause_t;
    206 
    207 typedef enum {
    208     TEMOD_HG2_CODEC_OFF = 0,
    209     TEMOD_HG2_CODEC_ON_8BYTE_IPG,
    210     TEMOD_HG2_CODEC_ON_9BYTE_IPG,
    211     TEMOD_HG2_CODEC_COUNT
    212 }temod_hg2_codec_t;
    213 
    214 #define TEMOD_FEC_NOT_SUPRTD         0
    215 #define TEMOD_FEC_SUPRTD_NOT_REQSTD  1
    216 #define TEMOD_FEC_CL74_SUPRTD_REQSTD 4
    217 
    218 #define TEMOD_SGMII_SLAVE            0x0
    219 #define TEMOD_SGMII_MASTER           0x1
    220 
    221 /**
    222 \struct temod_an_init_s
    223 
    224 This embodies all parameters required to program autonegotiation features in the
    225 PHY for both CL37 and CL73 type autonegotiation and the BAM variants.
    226 For details of individual fields, please refer to microarchitectural doc.
    227 */
    228 typedef struct temod_an_init_s{
    229   uint16_t  an_fail_cnt;
    230   uint16_t  an_oui_ctrl; 
    231   uint16_t  linkfailtimer_dis; 
    232   uint16_t  linkfailtimerqua_en; 
    233   uint16_t  an_good_check_trap; 
    234   uint16_t  an_good_trap; 
    235   uint16_t  disable_rf_report; 
    236   uint16_t  cl37_bam_ovr1g_pgcnt; 
    237   uint16_t  cl73_remote_fault; 
    238   uint16_t  cl73_nonce_match_over;
    239   uint16_t  cl73_nonce_match_val;
    240   uint16_t  cl73_transmit_nonce; 
    241   uint16_t  base_selector;
    242 } temod_an_init_t;
    243 
    244 
    245 /**
    246 \struct temod_an_timers_s
    247 TBD
    248 */
    249 typedef struct temod_an_timers_s{
    250   uint16_t  value;
    251 } temod_an_timers_t;
    252 
    253 
    254 /**
    255 \struct temod_an_adv_ability_s
    256 TBD
    257 */
    258 typedef struct temod_an_adv_ability_s{
    259   temod_cl73_speed_t an_base_speed; 
    260   temod_cl37_bam_speed_t an_bam_speed; 
    261   temod_cl37_bam_speed1_t an_bam_speed1; 
    262   temod_an_pause_t an_pause; 
    263   uint16_t an_fec; 
    264   uint16_t an_cl72;
    265   uint16_t an_hg2; 
    266   temod_cl37_sgmii_speed_t cl37_sgmii_speed;
    267 }temod_an_adv_ability_t;
    268 
    269 /**
    270 \struct temod_an_ability_s
    271 
    272 TBD
    273 
    274 */
    275 typedef struct temod_an_ability_s {
    276   temod_an_adv_ability_t cl37_adv; /*includes cl37 and cl37-bam related (fec, cl72) */
    277   temod_an_adv_ability_t cl73_adv; /*includes cl73 and cl73-bam related */
    278 } temod_an_ability_t;
    279 
    280 /**
    281 \struct temod_an_oui_s
    282   oui                : New oui
    283   override_bam73_adv : Adv new OUI for BAM73
    284   override_bam73_det : Detect new OUI for BAM73
    285   override_hpam_adv  : Adv new OUI for HPAM
    286   override_hpam_det  : Detect new OUI for HPAM
    287   override_bam37_adv : Adv new OUI for BAM37
    288   override_bam37_det : Detect new OUI for BAM37
    289  */
    290 typedef struct temod_an_oui_s {
    291   uint32_t oui;
    292   uint16_t oui_override_bam73_adv;
    293   uint16_t oui_override_bam73_det;
    294   uint16_t oui_override_hpam_adv;
    295   uint16_t oui_override_hpam_det;
    296   uint16_t oui_override_bam37_adv;
    297   uint16_t oui_override_bam37_det;
    298 } temod_an_oui_t;
    299 
    300 extern int temod_pll_reset_enable_set (PHYMOD_ST *pa , int enable);
    301 extern int temod_speed_id_get (PHYMOD_ST *pc,  int *speed_id);
    302 extern int temod_update_port_mode( PHYMOD_ST *pa, int *pll_restart);
    303 extern int temod_get_plldiv (PHYMOD_ST *pa,  uint32_t *pll_div);
    304 extern int temod_tx_rx_polarity_get (PHYMOD_ST *pc, uint32_t* txp, uint32_t* rxp);
    305 extern int temod_rx_lane_control_set(PHYMOD_ST* pc, int enable);
    306 extern int temod_rx_lane_control_get(PHYMOD_ST* pc, int *enable);
    307 extern int temod_tx_rx_polarity_set (PHYMOD_ST *pc, uint32_t txp, uint32_t rxp);
    308 extern int temod_pmd_lane_swap_tx_get (PHYMOD_ST *pc, uint32_t *tx_lane_map);
    309 extern int temod_pmd_addr_lane_swap (PHYMOD_ST *pc, uint32_t addr_lane_index);
    310 extern int temod_disable_get (PHYMOD_ST *pc, uint32_t* enable);
    311 extern int temod_pll_sequencer_control(PHYMOD_ST *pa, int enable);
    312 extern int temod_pcs_lane_swap_get (PHYMOD_ST *pc,  uint32_t *tx_rx_swap);
    313 extern int temod_master_port_num_set(PHYMOD_ST *pa,  int port_num);
    314 extern int temod_set_spd_intf(PHYMOD_ST *pc, temod_spd_intfc_type spd_intf, int no_trig);
    315 extern int temod_pll_lock_wait(PHYMOD_ST* pc, int timeOutValue);
    316 extern int temod_credit_control(PHYMOD_ST* pc, int enable);
    317 extern int temod_tx_lane_control_set(PHYMOD_ST* pc, tx_lane_disable_type_t tx_dis_type);
    318 extern int temod_tx_lane_control_get(PHYMOD_ST* pc, int *reset, int *enable);
    319 extern int temod_override_clear(PHYMOD_ST* pc, override_type_t or_type);
    320 extern int temod_override_set(PHYMOD_ST* pc, override_type_t or_type, uint16_t or_val);
    321 extern int temod_override_get(PHYMOD_ST* pc, override_type_t or_type, uint16_t *or_en,  uint16_t *or_val);
    322 extern int temod_credit_set(PHYMOD_ST* pc, credit_type_t credit_type, uint16_t userCredit);
    323 extern int temod_rx_lane_control_set(PHYMOD_ST* pc, int enable);        
    324 extern int temod_rx_lane_control_get(PHYMOD_ST* pc, int *enable);        
    325 extern int temod_init_pmd(PHYMOD_ST* pc, int pmd_touched, int uc_active);
    326 extern int temod_pmd_osmode_set(PHYMOD_ST* pc, temod_spd_intfc_type spd_intf, int os_mode);
    327 extern int temod_pmd_osmode_get(PHYMOD_ST* pc, int *os_mode);
    328 extern int temod_pll_lock_get(PHYMOD_ST* pc, int* lockStatus);
    329 extern int temod_pmd_lock_get(PHYMOD_ST* pc, uint32_t* lockStatus);
    330 extern int temod_wait_pmd_lock(PHYMOD_ST* pc, int timeOutValue, int* lockStatus);
    331 extern int temod_pcs_bypass_ctl (PHYMOD_ST* pc, int cntl);
    332 extern int temod_pmd_reset_bypass (PHYMOD_ST* pc, int cntl);
    333 extern int temod_set_pll_mode(PHYMOD_ST* pc, int pmd_tched, temod_spd_intfc_type sp, int pll_mode);
    334 extern int temod_tick_override_set(PHYMOD_ST* pc, int tick_override, int numerator, int denominator);
    335 extern int temod_tx_loopback_control(PHYMOD_ST* pc, int enable, int starting_lane, int port_type);
    336 extern int temod_tx_pmd_loopback_control(PHYMOD_ST* pc, int cntl);
    337 extern int temod_rx_loopback_control(PHYMOD_ST* pc, int enable, int starting_lane, int port_type);
    338 extern int temod_encode_set(PHYMOD_ST* pc, temod_spd_intfc_type spd_intf, uint16_t enable);
    339 extern int temod_decode_set(PHYMOD_ST* pc, temod_spd_intfc_type spd_intf, uint16_t enable);
    340 extern int temod_hg_enable_get(PHYMOD_ST* pc, int *enable);
    341 extern int temod_spd_intf_get(PHYMOD_ST* pc, int *spd_intf);
    342 extern int temod_revid_read(PHYMOD_ST* pc, uint32_t *revid);
    343 extern int temod_init_pcs(PHYMOD_ST* pc);
    344 extern int temod_pmd_reset_seq(PHYMOD_ST* pc, int pmd_touched);
    345 extern int temod_pram_abl_enable_set(PHYMOD_ST* pc, int enable);
    346 extern int temod_wait_sc_done(PHYMOD_ST* pc, uint16_t *data);
    347 extern int temod_get_pcs_link_status(PHYMOD_ST* pc, uint32_t *link);
    348 extern int temod_get_pcs_latched_link_status(PHYMOD_ST* pc, uint32_t *link);
    349 extern int temod_disable_set(PHYMOD_ST* pc);
    350 extern int temod_init_pcs_ilkn(PHYMOD_ST* pc);
    351 extern int temod_pcs_ilkn_chk(PHYMOD_ST* pc, int *ilkn_set);
    352 extern int temod_pmd_x4_reset(PHYMOD_ST* pc);
    353 extern int temod_init_pmd_sw(PHYMOD_ST* pc, int pmd_touched, int uc_active,
    354                              temod_spd_intfc_type spd_intf,  int t_pma_os_mode);
    355 extern int temod_fecmode_set(PHYMOD_ST* pc, int fec_enable);
    356 extern int temod_fecmode_get(PHYMOD_ST* pc, uint32_t *fec_enable);
    357 extern int temod_credit_override_set(PHYMOD_ST* pc, credit_type_t credit_type, uint16_t  userCredit);
    358 extern int temod_credit_override_get(PHYMOD_ST* pc, credit_type_t credit_type, uint16_t *userCredit_en, uint16_t *userCredit);
    359 
    360 extern int temod_pcs_lane_swap(PHYMOD_ST *pc, int lane_map);
    361 extern int temod_trigger_speed_change(PHYMOD_ST* pc);
    362 extern int temod_init_pmd_qsgmii(PHYMOD_ST* pc, int pmd_touched, int uc_active);
    363 extern int temod_rx_lane_control_get(PHYMOD_ST* pc, int *value);
    364 extern int temod_pmd_override_control(PHYMOD_ST* pc, int cntl, int value);
    365 extern int temod_plldiv_lkup_get(PHYMOD_ST* pc, temod_spd_intfc_type spd_intf, phymod_ref_clk_t ref_clk, uint32_t *plldiv, uint16_t *speed_vec);
    366 extern int temod_osmode_lkup_get(PHYMOD_ST* pc, temod_spd_intfc_type spd_intf, uint32_t *osmode);
    367 extern int temod_osdfe_on_lkup_get(PHYMOD_ST* pc, temod_spd_intfc_type spd_intf, uint32_t *osdfe_on);
    368 extern int temod_scrambling_dis_lkup_get(PHYMOD_ST* pc, temod_spd_intfc_type spd_intf, uint32_t *scrambling_dis);
    369 
    370 
    371 extern int temod_port_enable_set(PHYMOD_ST *pc, int enable);
    372 extern int temod_tx_squelch_set(PHYMOD_ST *pc, int enable);
    373 extern int temod_rx_squelch_set(PHYMOD_ST *pc, int enable);
    374 extern int temod_port_enable_get(PHYMOD_ST *pc, int *tx_enable, int *rx_enable);
    375 extern int temod_tx_squelch_get(PHYMOD_ST *pc, int *enable);
    376 extern int temod_rx_squelch_get(PHYMOD_ST *pc, int *enable);
    377 
    378 int temod_eee_control_set(PHYMOD_ST* pc, uint32_t enable);
    379 int temod_eee_control_get(PHYMOD_ST* pc, uint32_t *enable);
    380 
    381 extern int temod_pll_config_get(const phymod_access_t *pa, temod_pll_mode_type  *pll_mode);
    382 extern int temod_pll_config_set(const phymod_access_t *pa, temod_pll_mode_type  pll_mode, phymod_ref_clk_t ref_clk);
    383 
    384 #ifdef _DV_TB_
    385 extern int temod_mld_am_timers_set(PHYMOD_ST* pc, int rx_am_timer_init,int tx_am_timer_init_val);
    386 #endif /* _DV_TB_ */
    387 
    388 #ifdef _SDK_TEMOD_
    389 extern int temod_autoneg_set_init(PHYMOD_ST* pc, temod_an_init_t *an_init_st); 
    390 extern int temod_autoneg_control(PHYMOD_ST* pc, temod_an_control_t *an_control);
    391 extern int temod_autoneg_restart(PHYMOD_ST* pc, temod_an_control_t *an_control);
    392 extern int temod_autoneg_timer_init(PHYMOD_ST* pc);
    393 extern int temod_cl48_lfrfli_init(PHYMOD_ST* pc);
    394 extern int temod_autoneg_set(PHYMOD_ST* pc, temod_an_ability_t *an_ability_st);
    395 extern int temod_set_an_port_mode(PHYMOD_ST* pc, int enable, int nl_encoded, int starting_lane, int single_port);
    396 extern int temod_refclk_set(PHYMOD_ST* pc, phymod_ref_clk_t ref_clock); 
    397 extern int temod_pmd_lane_swap_tx(PHYMOD_ST *pc, uint32_t tx_lane_map);
    398 extern int temod_pmd_addr_lane_swap (PHYMOD_ST *pc, uint32_t addr_lane_index);
    399 extern int temod_tsc12_control(PHYMOD_ST* pc, int cl82_multi_pipe_mode, int cl82_mld_phys_map);
    400 int temod_tx_loopback_get(PHYMOD_ST* pc, uint32_t *enable);      
    401 extern int temod_autoneg_local_ability_get(PHYMOD_ST* pc, temod_an_ability_t *an_ability_st);
    402 extern int temod_autoneg_remote_ability_get(PHYMOD_ST* pc, temod_an_ability_t *an_ability_st);
    403 extern int temod_autoneg_control_get(PHYMOD_ST* pc, temod_an_control_t *an_control, int *an_complete);
    404 extern  int temod_diag(PHYMOD_ST *pc, temod_diag_type diag_type);
    405 extern  int temod_diag_disp(PHYMOD_ST *pc, const char* mystr);
    406 extern int temod_clause72_control(PHYMOD_ST* pc, uint32_t cl_72_en);                /* CLAUSE_72_CONTROL */
    407 
    408 extern int temod_st_control_field_set (PHYMOD_ST* pc,uint16_t st_entry_no,override_type_t  st_control_field,uint16_t st_field_value);
    409 extern int temod_st_control_field_get (PHYMOD_ST* pc,uint16_t st_entry_no, override_type_t  st_control_field, uint16_t *st_field_value);
    410 extern int temod_st_credit_field_set (PHYMOD_ST* pc,uint16_t st_entry_no,credit_type_t  credit_type,uint16_t st_field_value);
    411 extern int temod_st_credit_field_get (PHYMOD_ST* pc,uint16_t st_entry_no,credit_type_t  credit_type,uint16_t* st_field_value);
    412 extern int temod_mld_am_timers_set(PHYMOD_ST* pc);
    413 extern int temod_an_ncl72_inhibit_timer_get(PHYMOD_ST* pc, uint16_t *value);
    414 extern int temod_an_ncl72_inhibit_timer_set(PHYMOD_ST* pc, uint16_t value);
    415 extern int temod_cl74_chng_default (PHYMOD_ST* pc);
    416 
    417 extern int temod_an_oui_set(PHYMOD_ST* pc, temod_an_oui_t oui);
    418 extern int temod_an_oui_get(PHYMOD_ST* pc, temod_an_oui_t *oui);
    419 extern int temod_cl37_high_vco_set(PHYMOD_ST* pc, int value);
    420 extern int temod_pcs_ilkn_mode_set(PHYMOD_ST* pc);              /* INIT_PCS_ILKN */
    421 extern int temod_pmd_x4_reset_get(PHYMOD_ST* pc, int *value);
    422 
    423 extern int temod_sgmii_master_set(PHYMOD_ST* pc, int master);
    424 extern int temod_sgmii_master_get(PHYMOD_ST* pc, int* master);
    425 extern int temod_synce_mode_set(PHYMOD_ST *pc, int mode);
    426 extern int temod_synce_mode_get(PHYMOD_ST *pc, int *mode);
    427 #endif
    428 
    429 extern int temod_fec_correctable_counter_get(PHYMOD_ST* pc, uint32_t* count);
    430 extern int temod_fec_uncorrectable_counter_get(PHYMOD_ST* pc, uint32_t* count);
    431 
    432 extern int temod_encode_mode_get(PHYMOD_ST* pc, temod_encoder_type_t *mode);
    433 extern int temod_bip_error_counter_get(PHYMOD_ST* pc, uint32_t* count);
    434 extern int temod_cl49_ber_counter_get(PHYMOD_ST* pc, uint32_t* count);
    435 extern int temod_cl82_ber_counter_get(PHYMOD_ST* pc, uint32_t* count);
    436 
    437 int get_mapped_speed(temod_spd_intfc_type spd_intf, int *speed);
    438 int get_actual_speed(int speed_id, int *speed);
    439 
    440 extern int temod_hg2_codec_set(PHYMOD_ST* pc, temod_hg2_codec_t hg2_codec);
    441 extern int temod_hg2_codec_get(PHYMOD_ST* pc, temod_hg2_codec_t* hg2_codec);
    442 #endif  /*  _temod_H_ */
    443