diff mbox series

[3/5] misc: fastrpc: Set channel as secure

Message ID 1637849744-24844-4-git-send-email-jeyr@codeaurora.org (mailing list archive)
State Not Applicable
Headers show
Series Add secure domains support | expand

Commit Message

Jeya R Nov. 25, 2021, 2:15 p.m. UTC
Set all DSP channel as secure for which non-secure DT property is not added.

Signed-off-by: Jeya R <jeyr@codeaurora.org>
---
 drivers/misc/fastrpc.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 0775554e..a4e2e86 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -216,6 +216,7 @@  struct fastrpc_channel_ctx {
 	struct miscdevice miscdev;
 	struct miscdevice securedev;
 	struct kref refcount;
+	bool secure;
 };
 
 struct fastrpc_user {
@@ -1650,6 +1651,7 @@  static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
 	if (!data)
 		return -ENOMEM;
 
+	data->secure = !(of_property_read_bool(rdev->of_node, "qcom,non-secure-domain"));
 	data->miscdev.minor = MISC_DYNAMIC_MINOR;
 	data->miscdev.name = devm_kasprintf(rdev, GFP_KERNEL, "fastrpc-%s",
 					    domains[domain_id]);