]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: airoha: npu: Init BA memory region if provided via DTS
authorLorenzo Bianconi <lorenzo@kernel.org>
Thu, 8 Jan 2026 15:05:08 +0000 (16:05 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 16 Jan 2026 03:36:24 +0000 (19:36 -0800)
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

index 22f72c146065998d5450477f664ed308b1569aa3..a56b3780bb627cc393b94210b6b5c72cc95baea3 100644 (file)
@@ -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);