[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1580993966-17757-1-git-send-email-peng.fan@nxp.com>
Date: Thu, 6 Feb 2020 20:59:25 +0800
From: peng.fan@....com
To: sudeep.holla@....com
Cc: viresh.kumar@...aro.org, f.fainelli@...il.com, linux-imx@....com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Peng Fan <peng.fan@....com>
Subject: [PATCH 1/2] firmware: arm_scmi: mailbox: share shmem for protocols
From: Peng Fan <peng.fan@....com>
When shmem property of protocol is not specificed, let it use
its parent's shmem property.
Signed-off-by: Peng Fan <peng.fan@....com>
---
Based on Viresh's V6 patchset.
drivers/firmware/arm_scmi/mailbox.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/firmware/arm_scmi/mailbox.c b/drivers/firmware/arm_scmi/mailbox.c
index 73077bbc4ad9..68ed58e2a47a 100644
--- a/drivers/firmware/arm_scmi/mailbox.c
+++ b/drivers/firmware/arm_scmi/mailbox.c
@@ -69,6 +69,8 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev,
return -ENOMEM;
shmem = of_parse_phandle(cdev->of_node, "shmem", idx);
+ if (!shmem)
+ shmem = of_parse_phandle(dev->of_node, "shmem", idx);
ret = of_address_to_resource(shmem, 0, &res);
of_node_put(shmem);
if (ret) {
--
2.16.4
Powered by blists - more mailing lists