summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Schneider-Pargmann (TI.com) <msp@baylibre.com>2025-11-03 13:42:19 +0100
committerNishanth Menon <nm@ti.com>2025-11-13 13:03:55 -0600
commit170a3ef6052cfa2462b3bb572a6bb985bf83d21e (patch)
tree92e5598c3af15f497e8e69d5f348ad1ea2d9f737
parent999e9bc953e321651d69556fdd5dfd178f96f128 (diff)
firmware: ti_sci: Support transfers without response
Check the header flags if an response is expected or not. If it is not expected skip the receive part of ti_sci_do_xfer(). This prepares the driver for one-way messages as prepare_sleep for Partial-IO. Reviewed-by: Kendall Willis <k-willis@ti.com> Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Sebin Francis <sebin.francis@ti.com> Link: https://patch.msgid.link/20251103-topic-am62-partialio-v6-12-b4-v10-1-0557e858d747@baylibre.com Signed-off-by: Nishanth Menon <nm@ti.com>
-rw-r--r--drivers/firmware/ti_sci.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 34df75cf42fd..c49294ca3c94 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -398,6 +398,9 @@ static void ti_sci_put_one_xfer(struct ti_sci_xfers_info *minfo,
static inline int ti_sci_do_xfer(struct ti_sci_info *info,
struct ti_sci_xfer *xfer)
{
+ struct ti_sci_msg_hdr *hdr = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
+ bool response_expected = !!(hdr->flags & (TI_SCI_FLAG_REQ_ACK_ON_PROCESSED |
+ TI_SCI_FLAG_REQ_ACK_ON_RECEIVED));
int ret;
int timeout;
struct device *dev = info->dev;
@@ -409,12 +412,12 @@ static inline int ti_sci_do_xfer(struct ti_sci_info *info,
ret = 0;
- if (system_state <= SYSTEM_RUNNING) {
+ if (response_expected && system_state <= SYSTEM_RUNNING) {
/* And we wait for the response. */
timeout = msecs_to_jiffies(info->desc->max_rx_timeout_ms);
if (!wait_for_completion_timeout(&xfer->done, timeout))
ret = -ETIMEDOUT;
- } else {
+ } else if (response_expected) {
/*
* If we are !running, we cannot use wait_for_completion_timeout
* during noirq phase, so we must manually poll the completion.