LCOV - code coverage report
Current view: top level - drivers/common/cnxk - cnxk_telemetry_bphy.c (source / functions) Hit Total Coverage
Test: Code coverage Lines: 3 16 18.8 %
Date: 2024-12-01 18:57:19 Functions: 1 4 25.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 6 0.0 %

           Branch data     Line data    Source code
       1                 :            : 
       2                 :            : /* SPDX-License-Identifier: BSD-3-Clause
       3                 :            :  * Copyright(C) 2021 Marvell.
       4                 :            :  */
       5                 :            : 
       6                 :            : #include "cnxk_telemetry.h"
       7                 :            : #include "roc_api.h"
       8                 :            : #include "roc_priv.h"
       9                 :            : 
      10                 :            : static int
      11                 :          0 : cnxk_tel_bphy(struct plt_tel_data *d)
      12                 :            : {
      13                 :            :         struct idev_cfg *idev;
      14                 :            : 
      15                 :          0 :         idev = idev_get_cfg();
      16   [ #  #  #  # ]:          0 :         if (!idev || !idev->bphy)
      17                 :            :                 return -ENODEV;
      18                 :            : 
      19                 :          0 :         plt_tel_data_add_dict_int(d, "sso_pf_func", roc_bphy_sso_pf_func_get());
      20                 :          0 :         plt_tel_data_add_dict_int(d, "npa_pf_func", roc_bphy_npa_pf_func_get());
      21                 :            : 
      22                 :          0 :         return 0;
      23                 :            : }
      24                 :            : 
      25                 :            : static int
      26                 :          0 : cnxk_bphy_tel_handle_info(const char *cmd __plt_unused,
      27                 :            :                           const char *params __plt_unused,
      28                 :            :                           struct plt_tel_data *d)
      29                 :            : {
      30                 :          0 :         plt_tel_data_start_dict(d);
      31                 :            : 
      32                 :          0 :         return cnxk_tel_bphy(d);
      33                 :            : }
      34                 :            : 
      35                 :            : static int
      36                 :          0 : cnxk_bphy_telemetry_register(void)
      37                 :            : {
      38         [ #  # ]:          0 :         if (!(roc_model->flag & ROC_MODEL_CNF9K) &&
      39                 :            :             !(roc_model->flag & ROC_MODEL_CNF10K))
      40                 :            :                 return 0;
      41                 :            : 
      42                 :          0 :         plt_telemetry_register_cmd(
      43                 :            :                 "/cnxk/bphy/info", cnxk_bphy_tel_handle_info,
      44                 :            :                 "Returns bphy information. Takes no parameters");
      45                 :            : 
      46                 :          0 :         return 0;
      47                 :            : }
      48                 :            : 
      49                 :        251 : PLT_INIT(cnxk_telemetry_bphy_init)
      50                 :            : {
      51                 :        251 :         roc_plt_init_cb_register(cnxk_bphy_telemetry_register);
      52                 :        251 : }

Generated by: LCOV version 1.14