driver.c (c3d4aed763ce4a39f8ed36c7b7cd9a6a35971329) driver.c (3c3d818a9317a5f8ff7fb4547b2d6d5bcc39137d)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * System Control and Management Interface (SCMI) Message Protocol driver
4 *
5 * SCMI Message Protocol is used between the System Control Processor(SCP)
6 * and the Application Processors(AP). The Message Handling Unit(MHU)
7 * provides a mechanism for inter-processor communication between SCP's
8 * Cortex M3 and AP.

--- 906 unchanged lines hidden (view full) ---

915 if (priv)
916 /* Ensure order between xfer->priv store and following ops */
917 smp_store_mb(xfer->priv, priv);
918 info->desc->ops->fetch_response(cinfo, xfer);
919
920 trace_scmi_msg_dump(info->id, cinfo->id, xfer->hdr.protocol_id,
921 xfer->hdr.id,
922 xfer->hdr.type == MSG_TYPE_DELAYED_RESP ?
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * System Control and Management Interface (SCMI) Message Protocol driver
4 *
5 * SCMI Message Protocol is used between the System Control Processor(SCP)
6 * and the Application Processors(AP). The Message Handling Unit(MHU)
7 * provides a mechanism for inter-processor communication between SCP's
8 * Cortex M3 and AP.

--- 906 unchanged lines hidden (view full) ---

915 if (priv)
916 /* Ensure order between xfer->priv store and following ops */
917 smp_store_mb(xfer->priv, priv);
918 info->desc->ops->fetch_response(cinfo, xfer);
919
920 trace_scmi_msg_dump(info->id, cinfo->id, xfer->hdr.protocol_id,
921 xfer->hdr.id,
922 xfer->hdr.type == MSG_TYPE_DELAYED_RESP ?
923 "DLYD" : "RESP",
923 (!SCMI_XFER_IS_RAW(xfer) ? "DLYD" : "dlyd") :
924 (!SCMI_XFER_IS_RAW(xfer) ? "RESP" : "resp"),
924 xfer->hdr.seq, xfer->hdr.status,
925 xfer->rx.buf, xfer->rx.len);
926
927 trace_scmi_rx_done(xfer->transfer_id, xfer->hdr.id,
928 xfer->hdr.protocol_id, xfer->hdr.seq,
929 xfer->hdr.type);
930
931 if (xfer->hdr.type == MSG_TYPE_DELAYED_RESP) {

--- 108 unchanged lines hidden (view full) ---

1040 desc->ops->fetch_response(cinfo, xfer);
1041 xfer->state = SCMI_XFER_RESP_OK;
1042 }
1043 spin_unlock_irqrestore(&xfer->lock, flags);
1044
1045 /* Trace polled replies. */
1046 trace_scmi_msg_dump(info->id, cinfo->id,
1047 xfer->hdr.protocol_id, xfer->hdr.id,
925 xfer->hdr.seq, xfer->hdr.status,
926 xfer->rx.buf, xfer->rx.len);
927
928 trace_scmi_rx_done(xfer->transfer_id, xfer->hdr.id,
929 xfer->hdr.protocol_id, xfer->hdr.seq,
930 xfer->hdr.type);
931
932 if (xfer->hdr.type == MSG_TYPE_DELAYED_RESP) {

--- 108 unchanged lines hidden (view full) ---

1041 desc->ops->fetch_response(cinfo, xfer);
1042 xfer->state = SCMI_XFER_RESP_OK;
1043 }
1044 spin_unlock_irqrestore(&xfer->lock, flags);
1045
1046 /* Trace polled replies. */
1047 trace_scmi_msg_dump(info->id, cinfo->id,
1048 xfer->hdr.protocol_id, xfer->hdr.id,
1048 "RESP",
1049 !SCMI_XFER_IS_RAW(xfer) ?
1050 "RESP" : "resp",
1049 xfer->hdr.seq, xfer->hdr.status,
1050 xfer->rx.buf, xfer->rx.len);
1051 }
1052 } else {
1053 /* And we wait for the response. */
1054 if (!wait_for_completion_timeout(&xfer->done,
1055 msecs_to_jiffies(timeout_ms))) {
1056 dev_err(dev, "timed out in resp(caller: %pS)\n",

--- 1898 unchanged lines hidden ---
1051 xfer->hdr.seq, xfer->hdr.status,
1052 xfer->rx.buf, xfer->rx.len);
1053 }
1054 } else {
1055 /* And we wait for the response. */
1056 if (!wait_for_completion_timeout(&xfer->done,
1057 msecs_to_jiffies(timeout_ms))) {
1058 dev_err(dev, "timed out in resp(caller: %pS)\n",

--- 1898 unchanged lines hidden ---