From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 667F8A04FF; Thu, 5 May 2022 14:56:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E6E5E40E0F; Thu, 5 May 2022 14:56:21 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 4C8D640E0F for ; Thu, 5 May 2022 14:56:20 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.16.1.2) with ESMTP id 2457Jva5012124 for ; Thu, 5 May 2022 05:56:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=hnjy/Lex1Vnjp7vFYpYCc6gbTPEgwTJXQ5tQMdBYrfY=; b=dwpq3oY2mr02AVxOf/wD0pau8bByoyfqWpAWWTPv6drBuZYZzUantL239CbBeZS6yNuE FImjfDVQaguQg9oPF6XRlAbTk7nBCDCLQI16QuHvG+FvIP98rgFPKYci8TJtynAyZsvH d814IOHK9eQXd1JM2d16DP9dOZy5RD81LVr1iHk5ZrCZDQW3BHAven8ac/UG3QjDAn+F iQmIgmlJMxC1HUhDRIuScMJ97cBgcn6sMbhPgwYxI82cL49V5g8Fh6U5vdi4bAgVS+IC TgAbJUATVFHgivG+bl7GNOe3AizFgT2qHHMDNb1kyQC32eYwninNrEnoRNpu1rjU3v+z JQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3fuscx4y67-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 05 May 2022 05:56:19 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 5 May 2022 05:56:17 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 5 May 2022 05:56:17 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 71BA73F704C; Thu, 5 May 2022 05:56:14 -0700 (PDT) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao CC: , Rakesh Kudurumalla Subject: [PATCH v3 06/28] common/cnxk: skip probing SoC environment for CN9k Date: Thu, 5 May 2022 18:25:35 +0530 Message-ID: <20220505125557.8828-6-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20220505125557.8828-1-ndabilpuram@marvell.com> References: <20220419055921.10566-1-ndabilpuram@marvell.com> <20220505125557.8828-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: oAHzuzK1GAAezQpzr2D1tFWgyUHWEsJK X-Proofpoint-ORIG-GUID: oAHzuzK1GAAezQpzr2D1tFWgyUHWEsJK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-05_05,2022-05-05_01,2022-02-23_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Rakesh Kudurumalla SoC run platform file is not present in CN9k so probing is done for CN10k devices Signed-off-by: Rakesh Kudurumalla --- 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 1dd374e..a68baa6 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" @@ -211,6 +214,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.8.4