Commit 117542b8 authored by Cristian Marussi's avatar Cristian Marussi Committed by Sudeep Holla

firmware: arm_scmi: Make smc support sync_cmds_completed_on_ret

Enable sync_cmds_completed_on_ret in the SMC transport descriptor and
remove SMC specific .poll_done callback support since polling is bypassed
when sync_cmds_completed_on_ret is set.

Link: https://lore.kernel.org/r/20211220195646.44498-5-cristian.marussi@arm.comSigned-off-by: default avatarCristian Marussi <cristian.marussi@arm.com>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent 31d2f803
...@@ -173,14 +173,6 @@ static void smc_mark_txdone(struct scmi_chan_info *cinfo, int ret) ...@@ -173,14 +173,6 @@ static void smc_mark_txdone(struct scmi_chan_info *cinfo, int ret)
mutex_unlock(&scmi_info->shmem_lock); mutex_unlock(&scmi_info->shmem_lock);
} }
static bool
smc_poll_done(struct scmi_chan_info *cinfo, struct scmi_xfer *xfer)
{
struct scmi_smc *scmi_info = cinfo->transport_info;
return shmem_poll_done(scmi_info->shmem, xfer);
}
static const struct scmi_transport_ops scmi_smc_ops = { static const struct scmi_transport_ops scmi_smc_ops = {
.chan_available = smc_chan_available, .chan_available = smc_chan_available,
.chan_setup = smc_chan_setup, .chan_setup = smc_chan_setup,
...@@ -188,7 +180,6 @@ static const struct scmi_transport_ops scmi_smc_ops = { ...@@ -188,7 +180,6 @@ static const struct scmi_transport_ops scmi_smc_ops = {
.send_message = smc_send_message, .send_message = smc_send_message,
.mark_txdone = smc_mark_txdone, .mark_txdone = smc_mark_txdone,
.fetch_response = smc_fetch_response, .fetch_response = smc_fetch_response,
.poll_done = smc_poll_done,
}; };
const struct scmi_desc scmi_smc_desc = { const struct scmi_desc scmi_smc_desc = {
...@@ -196,4 +187,13 @@ const struct scmi_desc scmi_smc_desc = { ...@@ -196,4 +187,13 @@ const struct scmi_desc scmi_smc_desc = {
.max_rx_timeout_ms = 30, .max_rx_timeout_ms = 30,
.max_msg = 20, .max_msg = 20,
.max_msg_size = 128, .max_msg_size = 128,
/*
* Setting .sync_cmds_atomic_replies to true for SMC assumes that,
* once the SMC instruction has completed successfully, the issued
* SCMI command would have been already fully processed by the SCMI
* platform firmware and so any possible response value expected
* for the issued command will be immmediately ready to be fetched
* from the shared memory area.
*/
.sync_cmds_completed_on_ret = true,
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment