linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: peng.fan@nxp.com
To: sudeep.holla@arm.com
Cc: viresh.kumar@linaro.org, f.fainelli@gmail.com, linux-imx@nxp.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH 1/2] firmware: arm_scmi: mailbox: share shmem for protocols
Date: Thu,  6 Feb 2020 20:59:25 +0800	[thread overview]
Message-ID: <1580993966-17757-1-git-send-email-peng.fan@nxp.com> (raw)

From: Peng Fan <peng.fan@nxp.com>

When shmem property of protocol is not specificed, let it use
its parent's shmem property.

Signed-off-by: Peng Fan <peng.fan@nxp.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


             reply	other threads:[~2020-02-06 13:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 12:59 peng.fan [this message]
2020-02-06 12:59 ` [PATCH 2/2] firmware: arm_scmi: mark channel free when init peng.fan
2020-02-06 15:55 ` [PATCH 1/2] firmware: arm_scmi: mailbox: share shmem for protocols Sudeep Holla
     [not found] <1580993846-17712-1-git-send-email-peng.fan@nxp.com>
     [not found] ` <20200206142204.GB3383@bogus>
2020-02-07  2:08   ` Peng Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1580993966-17757-1-git-send-email-peng.fan@nxp.com \
    --to=peng.fan@nxp.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).