linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>
Cc: linux-arm-kernel@lists.infradead.org,
	 linux-mediatek@lists.infradead.org, netdev@vger.kernel.org,
	 Lorenzo Bianconi <lorenzo@kernel.org>
Subject: [PATCH net-next 4/6] net: airoha: npu: Read NPU interrupt lines from the DTS
Date: Wed, 02 Jul 2025 00:23:33 +0200	[thread overview]
Message-ID: <20250702-airoha-en7581-wlan-offlaod-v1-4-803009700b38@kernel.org> (raw)
In-Reply-To: <20250702-airoha-en7581-wlan-offlaod-v1-0-803009700b38@kernel.org>

Read all NPU supported IRQ lines from NPU device-tree node.
This is a preliminary patch to enable wlan flowtable offload for EN7581
SoC.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/ethernet/airoha/airoha_npu.c | 8 ++++++++
 drivers/net/ethernet/airoha/airoha_npu.h | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/drivers/net/ethernet/airoha/airoha_npu.c b/drivers/net/ethernet/airoha/airoha_npu.c
index 7d552ab7f692ba0f720e4fef89082e6ab233d809..1cf431469ca034bbaeb922fed3ebdab41aafef05 100644
--- a/drivers/net/ethernet/airoha/airoha_npu.c
+++ b/drivers/net/ethernet/airoha/airoha_npu.c
@@ -848,6 +848,14 @@ static int airoha_npu_probe(struct platform_device *pdev)
 		INIT_WORK(&core->wdt_work, airoha_npu_wdt_work);
 	}
 
+	for (i = 0; i < ARRAY_SIZE(npu->irqs); i++) {
+		irq = platform_get_irq(pdev, i + ARRAY_SIZE(npu->cores) + 1);
+		if (irq < 0)
+			return irq;
+
+		npu->irqs[i] = irq;
+	}
+
 	err = dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
 	if (err)
 		return err;
diff --git a/drivers/net/ethernet/airoha/airoha_npu.h b/drivers/net/ethernet/airoha/airoha_npu.h
index 23318b708f81eacc11753f54350ae33ea83a11ee..19cfc6b7fb52f4a176d91c7b39383b4c3e13d777 100644
--- a/drivers/net/ethernet/airoha/airoha_npu.h
+++ b/drivers/net/ethernet/airoha/airoha_npu.h
@@ -5,6 +5,7 @@
  */
 
 #define NPU_NUM_CORES		8
+#define NPU_NUM_IRQ		6
 
 struct airoha_npu {
 	struct device *dev;
@@ -17,6 +18,8 @@ struct airoha_npu {
 		struct work_struct wdt_work;
 	} cores[NPU_NUM_CORES];
 
+	int irqs[NPU_NUM_IRQ];
+
 	struct airoha_foe_stats __iomem *stats;
 
 	struct {

-- 
2.50.0



  parent reply	other threads:[~2025-07-01 23:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01 22:23 [PATCH net-next 0/6] net: airoha: Introduce NPU callbacks for wlan offloading Lorenzo Bianconi
2025-07-01 22:23 ` [PATCH net-next 1/6] net: airoha: npu: Add NPU wlan memory initialization commands Lorenzo Bianconi
2025-07-04 14:47   ` Simon Horman
2025-07-01 22:23 ` [PATCH net-next 2/6] net: airoha: npu: Add more wlan NPU callbacks Lorenzo Bianconi
2025-07-04 14:51   ` Simon Horman
2025-07-01 22:23 ` [PATCH net-next 3/6] net: airoha: npu: Add wlan irq management callbacks Lorenzo Bianconi
2025-07-04 14:52   ` Simon Horman
2025-07-01 22:23 ` Lorenzo Bianconi [this message]
2025-07-04 14:56   ` [PATCH net-next 4/6] net: airoha: npu: Read NPU interrupt lines from the DTS Simon Horman
2025-07-05  7:39     ` Lorenzo Bianconi
2025-07-01 22:23 ` [PATCH net-next 5/6] net: airoha: npu: Enable core 3 for WiFi offloading Lorenzo Bianconi
2025-07-04 14:52   ` Simon Horman
2025-07-01 22:23 ` [PATCH net-next 6/6] net: airoha: Add airoha_offload.h header Lorenzo Bianconi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250702-airoha-en7581-wlan-offlaod-v1-4-803009700b38@kernel.org \
    --to=lorenzo@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).