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 96082A0524; Mon, 31 May 2021 23:44:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A30241153; Mon, 31 May 2021 23:42:56 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 25638410F5 for ; Mon, 31 May 2021 23:42:55 +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 14VLeTnf002867; Mon, 31 May 2021 14:42: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=6slEqXIvEmWjfYE7QAuNvsrjH+4klzjxv4fKS9kX7EM=; b=JTz9XRITQBHgOylyP7BVaOoTCU+NipWZcCdPZGfBbsmjPvMpiuooChN62P0EeLJoqbpD U5a48PiD+kd4sRLywRwNJhahw8DMdLxQMRzeO6pM1EmdgJzWz8Co9VLXe+ikzMmDMzJ5 OogW+r5IxP+QA4D6uT45IWrw0rFm2fQzD8VXkdhXraSMIOI8ideVNXWnA1aE3Jv1KQnz z6IT2kAGMdvRFwLWYbcj+RIfZ6+or5Wj/OqoLpGUUOKzNVe28Bco1KArQocGnQSxHUvc Yxog3cAmEDRXqXUDRWim2pkRrrzkQuLN8EQ0eCFp6nULwc+yH6OV7vJRLdJRyD8eLAKP /A== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 38vtnja14b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 31 May 2021 14:42:52 -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; Mon, 31 May 2021 14:42:50 -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; Mon, 31 May 2021 14:42:50 -0700 Received: from EH-LT0048.marvell.com (unknown [10.193.32.52]) by maili.marvell.com (Postfix) with ESMTP id 769673F7040; Mon, 31 May 2021 14:42:49 -0700 (PDT) From: Tomasz Duszynski To: CC: , , Tomasz Duszynski , Ray Kinsella , Neil Horman Date: Mon, 31 May 2021 23:41:39 +0200 Message-ID: <20210531214142.30167-26-tduszynski@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210531214142.30167-1-tduszynski@marvell.com> References: <20210531214142.30167-1-tduszynski@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: F0fAbpI56EvzzYbp_cXTrYLMWNJDUtIO X-Proofpoint-ORIG-GUID: F0fAbpI56EvzzYbp_cXTrYLMWNJDUtIO X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-05-31_15:2021-05-31, 2021-05-31 signatures=0 Subject: [dpdk-dev] [PATCH 25/28] raw/cnxk_bphy: add support for reading number of 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 | 2 ++ drivers/raw/cnxk_bphy/version.map | 1 + 3 files changed, 15 insertions(+) diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c index 5d47840d6..6a68db8a9 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 6e3d77768..d18fbd69e 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h +++ b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h @@ -24,5 +24,7 @@ __rte_internal int cnxk_bphy_intr_init(uint16_t dev_id); __rte_internal void cnxk_bphy_intr_fini(uint16_t dev_id); +__rte_internal +uint64_t cnxk_bphy_irq_max_get(uint16_t dev_id); #endif /* _CNXK_BPHY_IRQ_ */ diff --git a/drivers/raw/cnxk_bphy/version.map b/drivers/raw/cnxk_bphy/version.map index e087cd39b..6c5e9639a 100644 --- a/drivers/raw/cnxk_bphy/version.map +++ b/drivers/raw/cnxk_bphy/version.map @@ -6,6 +6,7 @@ INTERNAL { cnxk_bphy_intr_init; cnxk_bphy_intr_fini; + cnxk_bphy_irq_max_get; }; EXPERIMENTAL { global: -- 2.25.1