summaryrefslogtreecommitdiff
path: root/drivers/firmware
diff options
context:
space:
mode:
authorEtienne Carriere <etienne.carriere@linaro.org>2022-05-31 18:09:29 +0200
committerTom Rini <trini@konsulko.com>2022-06-23 13:12:56 -0400
commitc08decd29ec44b38262eaa93e0e66d3965d26232 (patch)
tree91b3c618b94c55906eea3fc8acbdf34d1dc70a89 /drivers/firmware
parentdb59fef0f84859504cd0b81063d7540517167d7b (diff)
firmware: scmi: use multi channel in mailbox, optee and smccc agents
Updates .process_msg operators of the SCMI transport drivers that supports multi-channel to use it now that drivers do provide the reference through channel argument. These are the mailbox agent, the optee agent and the smccc agent. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/scmi/mailbox_agent.c6
-rw-r--r--drivers/firmware/scmi/optee_agent.c5
-rw-r--r--drivers/firmware/scmi/smccc_agent.c6
3 files changed, 3 insertions, 14 deletions
diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c
index e63b67c5ee..3efdab9e72 100644
--- a/drivers/firmware/scmi/mailbox_agent.c
+++ b/drivers/firmware/scmi/mailbox_agent.c
@@ -43,13 +43,9 @@ static int scmi_mbox_process_msg(struct udevice *dev,
struct scmi_channel *channel,
struct scmi_msg *msg)
{
- struct scmi_mbox_channel *chan = dev_get_plat(dev);
+ struct scmi_mbox_channel *chan = &channel->ref;
int ret;
- /* Support SCMI drivers upgraded to of_get_channel operator */
- if (channel)
- chan = &channel->ref;
-
ret = scmi_write_msg_to_smt(dev, &chan->smt, msg);
if (ret)
return ret;
diff --git a/drivers/firmware/scmi/optee_agent.c b/drivers/firmware/scmi/optee_agent.c
index da5c2ec975..2b2b8c1670 100644
--- a/drivers/firmware/scmi/optee_agent.c
+++ b/drivers/firmware/scmi/optee_agent.c
@@ -278,13 +278,10 @@ static int scmi_optee_process_msg(struct udevice *dev,
struct scmi_channel *channel,
struct scmi_msg *msg)
{
+ struct scmi_optee_channel *chan = &channel->ref;
struct channel_session sess = { };
int ret;
- /* Support SCMI drivers upgraded to of_get_channel operator */
- if (channel)
- chan = &channel->ref;
-
ret = open_channel(dev, chan, &sess);
if (ret)
return ret;
diff --git a/drivers/firmware/scmi/smccc_agent.c b/drivers/firmware/scmi/smccc_agent.c
index 73a7e0a844..bc2eb67335 100644
--- a/drivers/firmware/scmi/smccc_agent.c
+++ b/drivers/firmware/scmi/smccc_agent.c
@@ -42,14 +42,10 @@ static int scmi_smccc_process_msg(struct udevice *dev,
struct scmi_channel *channel,
struct scmi_msg *msg)
{
- struct scmi_smccc_channel *chan = dev_get_plat(dev);
+ struct scmi_smccc_channel *chan = &channel->ref;
struct arm_smccc_res res;
int ret;
- /* Support SCMI drivers upgraded to of_get_channel operator */
- if (channel)
- chan = &channel->ref;
-
ret = scmi_write_msg_to_smt(dev, &chan->smt, msg);
if (ret)
return ret;