Commit a1740b16 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Jakub Kicinski
Browse files

net: airoha: npu: Read NPU wlan interrupt lines from the DTS



Read all NPU wlan IRQ lines from the NPU device-tree node.
NPU module fires wlan irq lines when the traffic to/from the WiFi NIC is
not hw accelerated (these interrupts will be consumed by the MT76 driver
in subsequent patches).
This is a preliminary patch to enable wlan flowtable offload for EN7581
SoC.

Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250811-airoha-en7581-wlan-offlaod-v7-5-58823603bb4e@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 03b7ca3e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -690,6 +690,15 @@ static int airoha_npu_probe(struct platform_device *pdev)
		INIT_WORK(&core->wdt_work, airoha_npu_wdt_work);
	}

	/* wlan IRQ lines */
	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;
+3 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
 */

#define NPU_NUM_CORES		8
#define NPU_NUM_IRQ		6

enum airoha_npu_wlan_set_cmd {
	WLAN_FUNC_SET_WAIT_PCIE_ADDR,
@@ -68,6 +69,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 {