[2/2] common/cnxk: add cn10ka B0 platform

Message ID 20230222053326.17601-2-syalavarthi@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [1/2] common/cnxk: add cnf10ka A1 platform |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional fail Functional Testing issues
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/intel-Testing success Testing PASS
ci/intel-Performance success Performance Testing PASS

Commit Message

Srikanth Yalavarthi Feb. 22, 2023, 5:33 a.m. UTC
  Adding support for cn10ka B0 pass

Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
 drivers/common/cnxk/roc_model.c | 1 +
 drivers/common/cnxk/roc_model.h | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
  

Comments

Jerin Jacob Feb. 26, 2023, 10:30 p.m. UTC | #1
On Wed, Feb 22, 2023 at 11:03 AM Srikanth Yalavarthi
<syalavarthi@marvell.com> wrote:
>
> Adding support for cn10ka B0 pass
>
> Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>

Since a cnxk eventdev driver patch[1] is depended on this series,
taking the series through  dpdk-next-net-eventdev/for-main. Thanks

[1]
https://patches.dpdk.org/project/dpdk/patch/20230221092402.1446-1-pbhagavatula@marvell.com/

> ---
>  drivers/common/cnxk/roc_model.c | 1 +
>  drivers/common/cnxk/roc_model.h | 9 ++++++++-
>  2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/common/cnxk/roc_model.c b/drivers/common/cnxk/roc_model.c
> index 9d3ce24231..e4767ed91f 100644
> --- a/drivers/common/cnxk/roc_model.c
> +++ b/drivers/common/cnxk/roc_model.c
> @@ -61,6 +61,7 @@ static const struct model_db {
>  } model_db[] = {
>         {VENDOR_ARM, PART_106xx, 0, 0, ROC_MODEL_CN106xx_A0, "cn10ka_a0"},
>         {VENDOR_ARM, PART_106xx, 0, 1, ROC_MODEL_CN106xx_A1, "cn10ka_a1"},
> +       {VENDOR_ARM, PART_106xx, 1, 0, ROC_MODEL_CN106xx_B0, "cn10ka_b0"},
>         {VENDOR_ARM, PART_105xx, 0, 0, ROC_MODEL_CNF105xx_A0, "cnf10ka_a0"},
>         {VENDOR_ARM, PART_105xx, 0, 1, ROC_MODEL_CNF105xx_A1, "cnf10ka_a1"},
>         {VENDOR_ARM, PART_103xx, 0, 0, ROC_MODEL_CN103xx_A0, "cn10kb_a0"},
> diff --git a/drivers/common/cnxk/roc_model.h b/drivers/common/cnxk/roc_model.h
> index 3f97e548ce..58046af193 100644
> --- a/drivers/common/cnxk/roc_model.h
> +++ b/drivers/common/cnxk/roc_model.h
> @@ -30,6 +30,7 @@ struct roc_model {
>  #define ROC_MODEL_CN103xx_A0   BIT_ULL(23)
>  #define ROC_MODEL_CN106xx_A1   BIT_ULL(24)
>  #define ROC_MODEL_CNF105xx_A1  BIT_ULL(25)
> +#define ROC_MODEL_CN106xx_B0   BIT_ULL(26)
>  /* Following flags describe platform code is running on */
>  #define ROC_ENV_HW   BIT_ULL(61)
>  #define ROC_ENV_EMUL BIT_ULL(62)
> @@ -54,7 +55,7 @@ struct roc_model {
>          ROC_MODEL_CNF95xxN_A0 | ROC_MODEL_CNF95xxN_A1 |                       \
>          ROC_MODEL_CNF95xxN_B0)
>
> -#define ROC_MODEL_CN106xx   (ROC_MODEL_CN106xx_A0 | ROC_MODEL_CN106xx_A1)
> +#define ROC_MODEL_CN106xx   (ROC_MODEL_CN106xx_A0 | ROC_MODEL_CN106xx_A1 | ROC_MODEL_CN106xx_B0)
>  #define ROC_MODEL_CNF105xx  (ROC_MODEL_CNF105xx_A0 | ROC_MODEL_CNF105xx_A1)
>  #define ROC_MODEL_CNF105xxN (ROC_MODEL_CNF105xxN_A0)
>  #define ROC_MODEL_CN103xx   (ROC_MODEL_CN103xx_A0)
> @@ -227,6 +228,12 @@ roc_model_is_cn10ka_a1(void)
>         return roc_model->flag & ROC_MODEL_CN106xx_A1;
>  }
>
> +static inline uint64_t
> +roc_model_is_cn10ka_b0(void)
> +{
> +       return roc_model->flag & ROC_MODEL_CN106xx_B0;
> +}
> +
>  static inline uint64_t
>  roc_model_is_cnf10ka_a0(void)
>  {
> --
> 2.17.1
>
  

Patch

diff --git a/drivers/common/cnxk/roc_model.c b/drivers/common/cnxk/roc_model.c
index 9d3ce24231..e4767ed91f 100644
--- a/drivers/common/cnxk/roc_model.c
+++ b/drivers/common/cnxk/roc_model.c
@@ -61,6 +61,7 @@  static const struct model_db {
 } model_db[] = {
 	{VENDOR_ARM, PART_106xx, 0, 0, ROC_MODEL_CN106xx_A0, "cn10ka_a0"},
 	{VENDOR_ARM, PART_106xx, 0, 1, ROC_MODEL_CN106xx_A1, "cn10ka_a1"},
+	{VENDOR_ARM, PART_106xx, 1, 0, ROC_MODEL_CN106xx_B0, "cn10ka_b0"},
 	{VENDOR_ARM, PART_105xx, 0, 0, ROC_MODEL_CNF105xx_A0, "cnf10ka_a0"},
 	{VENDOR_ARM, PART_105xx, 0, 1, ROC_MODEL_CNF105xx_A1, "cnf10ka_a1"},
 	{VENDOR_ARM, PART_103xx, 0, 0, ROC_MODEL_CN103xx_A0, "cn10kb_a0"},
diff --git a/drivers/common/cnxk/roc_model.h b/drivers/common/cnxk/roc_model.h
index 3f97e548ce..58046af193 100644
--- a/drivers/common/cnxk/roc_model.h
+++ b/drivers/common/cnxk/roc_model.h
@@ -30,6 +30,7 @@  struct roc_model {
 #define ROC_MODEL_CN103xx_A0   BIT_ULL(23)
 #define ROC_MODEL_CN106xx_A1   BIT_ULL(24)
 #define ROC_MODEL_CNF105xx_A1  BIT_ULL(25)
+#define ROC_MODEL_CN106xx_B0   BIT_ULL(26)
 /* Following flags describe platform code is running on */
 #define ROC_ENV_HW   BIT_ULL(61)
 #define ROC_ENV_EMUL BIT_ULL(62)
@@ -54,7 +55,7 @@  struct roc_model {
 	 ROC_MODEL_CNF95xxN_A0 | ROC_MODEL_CNF95xxN_A1 |                       \
 	 ROC_MODEL_CNF95xxN_B0)
 
-#define ROC_MODEL_CN106xx   (ROC_MODEL_CN106xx_A0 | ROC_MODEL_CN106xx_A1)
+#define ROC_MODEL_CN106xx   (ROC_MODEL_CN106xx_A0 | ROC_MODEL_CN106xx_A1 | ROC_MODEL_CN106xx_B0)
 #define ROC_MODEL_CNF105xx  (ROC_MODEL_CNF105xx_A0 | ROC_MODEL_CNF105xx_A1)
 #define ROC_MODEL_CNF105xxN (ROC_MODEL_CNF105xxN_A0)
 #define ROC_MODEL_CN103xx   (ROC_MODEL_CN103xx_A0)
@@ -227,6 +228,12 @@  roc_model_is_cn10ka_a1(void)
 	return roc_model->flag & ROC_MODEL_CN106xx_A1;
 }
 
+static inline uint64_t
+roc_model_is_cn10ka_b0(void)
+{
+	return roc_model->flag & ROC_MODEL_CN106xx_B0;
+}
+
 static inline uint64_t
 roc_model_is_cnf10ka_a0(void)
 {