diff options
author | Abel Vesa <abel.vesa@linaro.org> | 2022-11-25 10:13:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-25 20:45:33 +0300 |
commit | 1ce91d45ba77a4f6bf9209d142d5c89c42cf877a (patch) | |
tree | 459ad1d8847548c2132b53c11c20fb469b61a7ce /drivers | |
parent | 1959ab9edccd3de4bc8a876f97ce269bb9beeb31 (diff) | |
download | linux-1ce91d45ba77a4f6bf9209d142d5c89c42cf877a.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/fastrpc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index f2bda08adca7..3d5809622a6b 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -19,6 +19,7 @@ #include <linux/slab.h> #include <linux/qcom_scm.h> #include <uapi/misc/fastrpc.h> +#include <linux/of_reserved_mem.h> #define ADSP_DOMAIN_ID (0) #define MDSP_DOMAIN_ID (1) @@ -2065,6 +2066,9 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev) return -EINVAL; } + if (of_reserved_mem_device_init_by_idx(rdev, rdev->of_node, 0)) + dev_info(rdev, "no reserved DMA memory for FASTRPC\n"); + vmcount = of_property_read_variable_u32_array(rdev->of_node, "qcom,vmids", &vmids[0], 0, FASTRPC_MAX_VMIDS); if (vmcount < 0) |