Skip to content

Commit 8368138

Browse files
jamikePatrice Chotard
authored andcommitted
firmware: scmi: mailbox: use smt polling method
Since u-boot does not support interrupt, use smt polling method to wait for req completion Change-Id: Ic132a1918659bef8e182d3e20ba9027a3d3a49ad Signed-off-by: Michel JAOUEN <michel.jaouen@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/446889 Domain-Review: Patrick DELAUNAY <patrick.delaunay@foss.st.com> ACI: CIBUILD <MDG-smet-aci-builds@list.st.com> Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com> ACI: CITOOLS <MDG-smet-aci-reviews@list.st.com>
1 parent ff1c1a7 commit 8368138

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/firmware/scmi/mailbox_agent.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,13 @@ static int scmi_mbox_process_msg(struct udevice *dev,
5757
goto out;
5858
}
5959

60+
ret = scmi_wait_resp_from_smt(dev, &chan->smt, msg, chan->timeout_us);
6061
/* Receive the response */
61-
ret = mbox_recv(&chan->mbox, chan->smt.buf, chan->timeout_us);
62-
if (ret) {
62+
if (ret == -ETIMEDOUT) {
6363
dev_err(dev, "Response failed: %d, abort\n", ret);
6464
goto out;
6565
}
6666

67-
ret = scmi_read_resp_from_smt(dev, &chan->smt, msg);
68-
6967
out:
7068
scmi_clear_smt_channel(&chan->smt);
7169

0 commit comments

Comments
 (0)