Skip to content

Commit 1ce91d4

Browse files
abelvesagregkh
authored andcommitted
misc: fastrpc: Add reserved mem support
The reserved mem support is needed for CMA heap support, which will be used by AUDIOPD. Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221125071405.148786-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1959ab9 commit 1ce91d4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/misc/fastrpc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/slab.h>
2020
#include <linux/qcom_scm.h>
2121
#include <uapi/misc/fastrpc.h>
22+
#include <linux/of_reserved_mem.h>
2223

2324
#define ADSP_DOMAIN_ID (0)
2425
#define MDSP_DOMAIN_ID (1)
@@ -2065,6 +2066,9 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
20652066
return -EINVAL;
20662067
}
20672068

2069+
if (of_reserved_mem_device_init_by_idx(rdev, rdev->of_node, 0))
2070+
dev_info(rdev, "no reserved DMA memory for FASTRPC\n");
2071+
20682072
vmcount = of_property_read_variable_u32_array(rdev->of_node,
20692073
"qcom,vmids", &vmids[0], 0, FASTRPC_MAX_VMIDS);
20702074
if (vmcount < 0)

0 commit comments

Comments
 (0)