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

tomahawk3_idb_init.h (6472B)


      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:       tomahawk3_idb_init.h
      8  */
      9 
     10 
     11 
     12 #ifndef _SOC_TOMAHAWK3_IDB_INIT_H_
     13 #define _SOC_TOMAHAWK3_IDB_INIT_H_
     14 
     15 #include <soc/init/tomahawk3_flexport_defines.h>
     16 #include <soc/init/tomahawk3_tdm.h>
     17 
     18 
     19 /*** START SDK API COMMON CODE ***/
     20 
     21 #define _TH3_OBM_PARAMS_LOSSY_INDEX                     0
     22 #define _TH3_OBM_PARAMS_LOSSLESS_INDEX                  1
     23 #define _TH3_OBM_PARAMS_LOSSY_PLUS_LOSSLESS_INDEX       2
     24 #define _TH3_OBM_PARAMS_DROP_COUNT_SELECT_LOSSLESS0     2
     25 #define _TH3_OBM_PARAMS_DROP_COUNT_SELECT_LOSSY_LO      0
     26 #define _TH3_IDB_CA_PEEK_DEPTH_FRONT_PANEL_PORT         6
     27 #define _TH3_IDB_CA_PEEK_DEPTH_CPU_LPBK_PORT            2
     28 
     29 extern int soc_tomahawk3_get_pipe_from_phy_port(int pnum);
     30 
     31 extern int soc_tomahawk3_get_pipe_pm_from_phy_port(int pnum);
     32 
     33 extern int soc_tomahawk3_get_subp_from_phy_port(int pnum);
     34 
     35 extern int soc_tomahawk3_phy_is_lpbk_port(int pnum);
     36 
     37 extern int soc_tomahawk3_phy_is_cpu_mgmt_port(int pnum);
     38 
     39 extern int soc_tomahawk3_idb_pa_reset(int unit,
     40     soc_port_map_type_t *port_map, int lport, int reset);
     41 
     42 extern int soc_tomahawk3_idb_obm_reset(int unit,
     43     soc_port_map_type_t *port_map, int lport, int reset);
     44 
     45 extern int soc_tomahawk3_idb_obm_rst_rel_all(int unit,
     46     soc_port_schedule_state_t *port_schedule_state);
     47 
     48 extern int soc_tomahawk3_idb_ca_buffer_config(
     49     int unit, soc_port_map_type_t *port_map, int lport);
     50 
     51 extern int soc_tomahawk3_idb_ca_wr_domain_reset(
     52     int unit, soc_port_map_type_t *port_map, int lport, int reset);
     53 
     54 extern int soc_tomahawk3_idb_ca_rd_domain_reset(
     55     int unit, soc_port_map_type_t *port_map, int lport, int reset);
     56 
     57 extern int soc_tomahawk3_idb_ca_wr_dom_rst_rel_all(
     58     int unit, soc_port_schedule_state_t *port_schedule_state);
     59 
     60 extern int soc_tomahawk3_idb_ca_rd_dom_rst_rel_all(
     61     int unit, soc_port_schedule_state_t *port_schedule_state);
     62 
     63 extern int soc_tomahawk3_idb_init_pnum_mapping_tbl(
     64     int unit, soc_port_map_type_t *port_map, int lport);
     65 
     66 extern int soc_tomahawk3_idb_init_idb_to_dev_pmap_tbl(
     67     int unit, soc_port_map_type_t *port_map, int lport);
     68 
     69 extern int soc_tomahawk3_idb_wr_obm_shared_config(int unit,
     70     soc_port_schedule_state_t *port_schedule_state, int lport);
     71 
     72 extern int soc_tomahawk3_idb_wr_obm_thresh(int unit,
     73     soc_port_schedule_state_t *port_schedule_state, int lport);
     74 
     75 extern int soc_tomahawk3_idb_wr_obm_flow_ctrl_cfg(int unit,
     76     soc_port_schedule_state_t *port_schedule_state, int lport);
     77 
     78 extern int soc_tomahawk3_idb_wr_obm_fc_threshold(int unit,
     79     soc_port_schedule_state_t *port_schedule_state, int lport);
     80 
     81 extern int soc_tomahawk3_idb_obm_pri_map_set(
     82     int unit, soc_port_schedule_state_t *port_schedule_state, int lport);
     83 
     84 extern int soc_tomahawk3_idb_obm_buffer_config(
     85     int unit, soc_port_map_type_t *port_map, int lport);
     86 
     87 extern int soc_tomahawk3_idb_obm_tdm_cfg(
     88     int unit, soc_port_map_type_t *port_map, int lport);
     89 
     90 extern int soc_tomahawk3_idb_outer_tpid_config(int unit,
     91     soc_port_map_type_t *port_map, int lport, int enable,
     92     int tag_num, int tag_value);
     93 
     94 extern int soc_tomahawk3_en_epc_link_bmap(
     95     int unit, soc_port_schedule_state_t *port_schedule_state);
     96 
     97 extern int soc_tomahawk3_en_dest_port_bmap(
     98     int unit, soc_port_schedule_state_t *port_schedule_state);
     99 
    100 extern int soc_tomahawk3_enable_dpp_ctrl(int unit, int pipe);
    101 
    102 extern int soc_tomahawk3_ip_slot_pipeline_config(
    103     int unit, soc_port_schedule_state_t *port_schedule_state);
    104 
    105 extern int soc_tomahawk3_idb_wr_obm_ct_thresh(int unit,
    106     soc_port_schedule_state_t *port_schedule_state, int lport);
    107 
    108 extern int soc_tomahawk3_idb_wr_ca_ct_thresh(int unit,
    109     soc_port_schedule_state_t *port_schedule_state, int lport);
    110 
    111 int soc_tomahawk3_idb_ca_ct_enable(int unit,
    112     soc_port_schedule_state_t *port_schedule_state, int lport, int ct_enable);
    113 
    114 int soc_tomahawk3_idb_ca_peek_depth_cfg(int unit,
    115     soc_port_map_type_t *port_map, int lport);
    116 
    117 int soc_tomahawk3_idb_lpbk_ca_peek_depth_cfg(int unit, int pipe_num);
    118 
    119 int soc_tomahawk3_idb_cpu_ca_peek_depth_cfg(int unit, int pipe_num);
    120 
    121 int soc_tomahawk3_idb_wr_obm_port_config(int unit,
    122     soc_port_schedule_state_t *port_schedule_state, int lport);
    123 
    124 int soc_tomahawk3_idb_wr_obm_monitor_stats_config(int unit,
    125     soc_port_schedule_state_t *port_schedule_state, int lport);
    126 
    127 extern int soc_tomahawk3_idb_ca_bmop_set(int unit,
    128     soc_port_schedule_state_t *port_schedule_state, int lport);
    129 
    130 extern int soc_tomahawk3_idb_obm_poll_buffer_empty(int unit,
    131     int pipe_num, int pm_num, int subp);
    132 
    133 extern int soc_tomahawk3_idb_ca_poll_buffer_empty(int unit,
    134     int pipe_num, int pm_num, int subp);
    135 
    136 extern int soc_tomahawk3_idb_lpbk_ca_in_reset(int unit, int pipe_num);
    137 
    138 extern int soc_tomahawk3_idb_ca_lpbk_poll_buffer_empty(int unit, int pipe_num);
    139 
    140 extern int soc_tomahawk3_idb_cpu_ca_in_reset(int unit, int pipe_num);
    141 
    142 extern int soc_tomahawk3_idb_ca_cpu_poll_buffer_empty(int unit, int pipe_num);
    143 
    144 extern int soc_tomahawk3_idb_lpbk_ca_reset_buffer(int unit,
    145        int pipe_num, int reset_buffer);
    146 
    147 extern int soc_tomahawk3_idb_cpu_ca_reset_buffer(int unit,
    148        int pipe_num, int reset_buffer);
    149 
    150 extern int soc_tomahawk3_idb_force_saf_duration_timer_cfg(int unit,
    151        soc_port_schedule_state_t *port_schedule_state, int pipe_num);
    152 
    153 extern int soc_tomahawk3_speed_to_e2e_settings_class_map(int speed);
    154 
    155 extern int soc_tomahawk3_idb_wr_obm_force_saf_config(int unit,
    156     soc_port_schedule_state_t *port_schedule_state, int lport);
    157 
    158 extern int soc_tomahawk3_idb_wr_obm_lag_detection_config(int unit,
    159     soc_port_schedule_state_t *port_schedule_state, int lport);
    160 
    161 extern int soc_tomahawk3_idb_wr_ca_force_saf_config(int unit,
    162     soc_port_schedule_state_t *port_schedule_state, int lport);
    163 
    164 extern int soc_tomahawk3_idb_wr_ca_lag_detection_config(int unit,
    165     soc_port_schedule_state_t *port_schedule_state, int lport);
    166 
    167 extern int soc_tomahawk3_idb_init(int unit,
    168     soc_port_schedule_state_t *port_schedule_state);
    169 
    170 extern int soc_tomahawk3_ipipe_init(int unit,
    171     soc_port_schedule_state_t *port_schedule_state);
    172 
    173 extern int soc_tomahawk3_idb_port_down(int unit,
    174     soc_port_schedule_state_t *port_schedule_state);
    175 
    176 extern int soc_tomahawk3_idb_port_up(int unit,
    177     soc_port_schedule_state_t *port_schedule_state);
    178 
    179 /*** END SDK API COMMON CODE ***/
    180 
    181 #endif
    182 
    183