mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-03-14 18:29:45 +01:00
airoha: npu: Init BA memory region if provided via DTS
Initialize NPU Block Ack memory region if reserved via DTS. Block Ack memory region is used by NPU MT7996 (Eagle) offloading. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://github.com/openwrt/openwrt/pull/22289 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
eb4fd65c92
commit
305f685f83
2 changed files with 42 additions and 2 deletions
|
|
@ -54,6 +54,11 @@
|
|||
no-map;
|
||||
reg = <0x0 0x90c00000 0x0 0x6800>;
|
||||
};
|
||||
|
||||
npu_ba: npu-ba@90c06800 {
|
||||
no-map;
|
||||
reg = <0x0 0x90c06800 0x0 0x200000>;
|
||||
};
|
||||
};
|
||||
|
||||
psci {
|
||||
|
|
@ -855,9 +860,10 @@
|
|||
<GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
|
||||
memory-region = <&npu_binary>, <&npu_pkt>, <&npu_txpkt>,
|
||||
<&npu_txbufid>;
|
||||
<&npu_txbufid>, <&npu_ba>;
|
||||
memory-region-names = "binary", "pkt", "tx-pkt",
|
||||
"tx-bufid";
|
||||
"tx-bufid", "ba";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
eth: ethernet@1fb50000 {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
From 875a59c9a9e584d99d8e9e5aa8435ec9300bfe91 Mon Sep 17 00:00:00 2001
|
||||
From: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||
Date: Thu, 8 Jan 2026 16:05:08 +0100
|
||||
Subject: [PATCH] net: airoha: npu: Init BA memory region if provided via DTS
|
||||
|
||||
Initialize NPU Block Ack memory region if reserved via DTS.
|
||||
Block Ack memory region is used by NPU MT7996 (Eagle) offloading.
|
||||
|
||||
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||
Link: https://patch.msgid.link/20260108-airoha-ba-memory-region-v3-2-bf1814e5dcc4@kernel.org
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/ethernet/airoha/airoha_npu.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/ethernet/airoha/airoha_npu.c b/drivers/net/ethernet/airoha/airoha_npu.c
|
||||
index 22f72c14606599..a56b3780bb627c 100644
|
||||
--- a/drivers/net/ethernet/airoha/airoha_npu.c
|
||||
+++ b/drivers/net/ethernet/airoha/airoha_npu.c
|
||||
@@ -519,6 +519,14 @@ static int airoha_npu_wlan_init_memory(struct airoha_npu *npu)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
+ if (of_property_match_string(npu->dev->of_node, "memory-region-names",
|
||||
+ "ba") >= 0) {
|
||||
+ cmd = WLAN_FUNC_SET_WAIT_DRAM_BA_NODE_ADDR;
|
||||
+ err = airoha_npu_wlan_set_reserved_memory(npu, 0, "ba", cmd);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
cmd = WLAN_FUNC_SET_WAIT_IS_FORCE_TO_CPU;
|
||||
return airoha_npu_wlan_msg_send(npu, 0, cmd, &val, sizeof(val),
|
||||
GFP_KERNEL);
|
||||
Loading…
Add table
Reference in a new issue