LCOV - code coverage report
Current view: top level - drivers/common/cnxk - roc_bphy.c (source / functions) Hit Total Coverage
Test: Code coverage Lines: 0 16 0.0 %
Date: 2025-01-02 22:41:34 Functions: 0 4 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 10 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: BSD-3-Clause
       2                 :            :  * Copyright(C) 2021 Marvell.
       3                 :            :  */
       4                 :            : 
       5                 :            : #include "roc_api.h"
       6                 :            : #include "roc_priv.h"
       7                 :            : 
       8                 :            : int
       9                 :          0 : roc_bphy_dev_init(struct roc_bphy *roc_bphy)
      10                 :            : {
      11                 :            :         struct idev_cfg *idev;
      12                 :            : 
      13                 :          0 :         idev = idev_get_cfg();
      14         [ #  # ]:          0 :         if (!idev)
      15                 :            :                 return -ENODEV;
      16                 :            : 
      17   [ #  #  #  # ]:          0 :         if (!roc_bphy || !roc_bphy->pci_dev)
      18                 :            :                 return -EINVAL;
      19                 :            : 
      20                 :          0 :         idev->bphy = roc_bphy;
      21                 :            : 
      22                 :          0 :         return 0;
      23                 :            : }
      24                 :            : 
      25                 :            : int
      26                 :          0 : roc_bphy_dev_fini(struct roc_bphy *roc_bphy)
      27                 :            : {
      28                 :            :         struct idev_cfg *idev;
      29                 :            : 
      30                 :          0 :         idev = idev_get_cfg();
      31         [ #  # ]:          0 :         if (!idev)
      32                 :            :                 return -ENODEV;
      33                 :            : 
      34         [ #  # ]:          0 :         if (!roc_bphy)
      35                 :            :                 return -EINVAL;
      36                 :            : 
      37                 :          0 :         idev->bphy = NULL;
      38                 :            : 
      39                 :          0 :         return 0;
      40                 :            : }
      41                 :            : 
      42                 :            : uint16_t
      43                 :          0 : roc_bphy_npa_pf_func_get(void)
      44                 :            : {
      45                 :          0 :         return idev_npa_pffunc_get();
      46                 :            : }
      47                 :            : 
      48                 :            : uint16_t
      49                 :          0 : roc_bphy_sso_pf_func_get(void)
      50                 :            : {
      51                 :          0 :         return idev_sso_pffunc_get();
      52                 :            : }

Generated by: LCOV version 1.14