From 84a972a54be9d54ee25e2b3b4551e578ffaeff91 Mon Sep 17 00:00:00 2001 From: Tomasz Duszynski Date: Mon, 16 Aug 2021 01:12:01 +0200 Subject: [PATCH] common/cnxk: support reading NPA/SSO PF function Add support for reading NPA/SSO pf_func which will be used by a PSM to access NPA/SSO. PSM is a hardware block capable of dispatching jobs to different blocks within a baseband module. Signed-off-by: Tomasz Duszynski Reviewed-by: Jerin Jacob --- drivers/common/cnxk/roc_bphy.c | 12 ++++++++++++ drivers/common/cnxk/roc_bphy.h | 2 ++ drivers/common/cnxk/version.map | 2 ++ 3 files changed, 16 insertions(+) diff --git a/drivers/common/cnxk/roc_bphy.c b/drivers/common/cnxk/roc_bphy.c index 77606d6465..12234c5dcc 100644 --- a/drivers/common/cnxk/roc_bphy.c +++ b/drivers/common/cnxk/roc_bphy.c @@ -38,3 +38,15 @@ roc_bphy_dev_fini(struct roc_bphy *roc_bphy) return 0; } + +uint16_t +roc_bphy_npa_pf_func_get(void) +{ + return idev_npa_pffunc_get(); +} + +uint16_t +roc_bphy_sso_pf_func_get(void) +{ + return idev_sso_pffunc_get(); +} diff --git a/drivers/common/cnxk/roc_bphy.h b/drivers/common/cnxk/roc_bphy.h index ea3124c6aa..f313fb6c38 100644 --- a/drivers/common/cnxk/roc_bphy.h +++ b/drivers/common/cnxk/roc_bphy.h @@ -14,5 +14,7 @@ struct roc_bphy { int __roc_api roc_bphy_dev_init(struct roc_bphy *roc_bphy); int __roc_api roc_bphy_dev_fini(struct roc_bphy *roc_bphy); +__roc_api uint16_t roc_bphy_npa_pf_func_get(void); +__roc_api uint16_t roc_bphy_sso_pf_func_get(void); #endif /* _ROC_BPHY_ */ diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map index 4acf80c089..e53cc6b9cc 100644 --- a/drivers/common/cnxk/version.map +++ b/drivers/common/cnxk/version.map @@ -43,6 +43,8 @@ INTERNAL { roc_bphy_intr_handler; roc_bphy_intr_init; roc_bphy_intr_register; + roc_bphy_npa_pf_func_get; + roc_bphy_sso_pf_func_get; roc_clk_freq_get; roc_cpt_afs_print; roc_cpt_dev_clear; -- 2.20.1