From patchwork Tue Jun 15 11:03:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Duszynski X-Patchwork-Id: 94244 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 58F72A0C47; Tue, 15 Jun 2021 13:07:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D9BB5411F7; Tue, 15 Jun 2021 13:04:55 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id F25F5411ED for ; Tue, 15 Jun 2021 13:04:53 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15FB04Wi012255 for ; Tue, 15 Jun 2021 04:04:53 -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-transfer-encoding : content-type; s=pfpt0220; bh=gpsBGs+EBzHfouq9S/rEDNyP/046RLaMZxtVFm7m//g=; b=d30+OJFeE3XjNxeecwGs8adlmSARzvlqUhtllQcn+bU59HPNvw6qmcwuZZI2DfZSS5a7 eLUKx8MtPsnaST1OZ7UiJLy59RcLiLEZOhGmlJyJJPp6rUpPPUDPTxjCl3dkHRlzkSsf KFFcx3FEIIMFNM+31d9MCm2ofjs/cYLLdtzDk7Gd7Nxa9ScZJu7cRbqlSgbwSFLTakum fqRPPYEL4Ql/E0LQ9z8XQxfN6GPqvh3ZMra5a8LO9O6mJNyT5cE8L0eHNABQhCRPxGtA rh2fORcZQL8zFIbSvHviimNbRtpYsz7cIzOrM4n4z8/MCx2naVHh0SmLRKsxz1gHL+vp 8g== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 396tagr54q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 15 Jun 2021 04:04:53 -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.2; Tue, 15 Jun 2021 04:04:51 -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.2 via Frontend Transport; Tue, 15 Jun 2021 04:04:51 -0700 Received: from EH-LT0048.marvell.com (unknown [10.193.32.52]) by maili.marvell.com (Postfix) with ESMTP id 76C483F7094; Tue, 15 Jun 2021 04:04:50 -0700 (PDT) From: Tomasz Duszynski To: Jakub Palider , Tomasz Duszynski CC: Date: Tue, 15 Jun 2021 13:03:42 +0200 Message-ID: <20210615110345.11057-30-tduszynski@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210615110345.11057-1-tduszynski@marvell.com> References: <20210531214142.30167-1-tduszynski@marvell.com> <20210615110345.11057-1-tduszynski@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: mzqeTAvDuAoWTpahqWkKspQwE8LOdoKg X-Proofpoint-GUID: mzqeTAvDuAoWTpahqWkKspQwE8LOdoKg X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-06-15_04:2021-06-14, 2021-06-15 signatures=0 Subject: [dpdk-dev] [PATCH v2 29/32] raw/cnxk_bphy: support for reading number of bphy irqs 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 Sender: "dev" Add support for retrieving maximum number of interrupts. Signed-off-by: Jakub Palider Signed-off-by: Tomasz Duszynski --- drivers/raw/cnxk_bphy/cnxk_bphy_irq.c | 12 ++++++++++++ drivers/raw/cnxk_bphy/cnxk_bphy_irq.h | 1 + 2 files changed, 13 insertions(+) diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c index c4df539cd..991c2d7ab 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c +++ b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c @@ -24,6 +24,18 @@ cnxk_bphy_get_bphy_dev_by_dev_id(uint16_t dev_id) return (struct bphy_device *)rawdev->dev_private; } +uint64_t +cnxk_bphy_irq_max_get(uint16_t dev_id) +{ + struct roc_bphy_irq_chip *irq_chip; + struct bphy_device *bphy_dev; + + bphy_dev = cnxk_bphy_get_bphy_dev_by_dev_id(dev_id); + irq_chip = bphy_dev->irq_chip; + + return irq_chip->max_irq; +} + int cnxk_bphy_intr_init(uint16_t dev_id) { diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h index 3acc47fe8..6b59218af 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h +++ b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h @@ -31,5 +31,6 @@ struct bphy_device { int cnxk_bphy_intr_init(uint16_t dev_id); void cnxk_bphy_intr_fini(uint16_t dev_id); +uint64_t cnxk_bphy_irq_max_get(uint16_t dev_id); #endif /* _CNXK_BPHY_IRQ_ */