From b315581c66dc6ba8a29a42492a5fa1a0edc5d23f Mon Sep 17 00:00:00 2001 From: Rakesh Kudurumalla Date: Sun, 8 May 2022 13:18:17 +0530 Subject: [PATCH] common/cnxk: skip probing SoC environment for CN9K SoC run platform file is not present in CN9k so probing is done for CN10k devices Signed-off-by: Rakesh Kudurumalla Acked-by: Jerin Jacob --- drivers/common/cnxk/roc_model.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/common/cnxk/roc_model.c b/drivers/common/cnxk/roc_model.c index 4120029541..41cf5584cd 100644 --- a/drivers/common/cnxk/roc_model.c +++ b/drivers/common/cnxk/roc_model.c @@ -2,6 +2,9 @@ * Copyright(C) 2021 Marvell. */ +#include +#include + #include "roc_api.h" #include "roc_priv.h" @@ -207,6 +210,12 @@ of_env_get(struct roc_model *model) uint64_t flag; FILE *fp; + if (access(path, F_OK) != 0) { + strncpy(model->env, "HW_PLATFORM", ROC_MODEL_STR_LEN_MAX - 1); + model->flag |= ROC_ENV_HW; + return; + } + fp = fopen(path, "r"); if (!fp) { plt_err("Failed to open %s", path); -- 2.39.5