* [PATCH] firmware: ti_sci: Always request response from firmware
@ 2019-04-29 13:15 Andrew F. Davis
2019-04-29 14:40 ` Nishanth Menon
0 siblings, 1 reply; 2+ messages in thread
From: Andrew F. Davis @ 2019-04-29 13:15 UTC (permalink / raw)
To: Nishanth Menon, Tero Kristo, Santosh Shilimkar
Cc: linux-arm-kernel, linux-kernel, Andrew F . Davis
TI-SCI firmware will only respond to messages when the
TI_SCI_FLAG_REQ_ACK_ON_PROCESSED flag is set. Most messages already do
this, set this for the ones that do not.
This will be enforced in future firmware that better match the TI-SCI
specifications, this patch will not break users of existing firmware.
Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol")
Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Tested-by: Alejandro Hernandez <ajhernandez@ti.com>
---
drivers/firmware/ti_sci.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 3fbbb61012c4..3f202c63b9a6 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -448,9 +448,9 @@ static int ti_sci_cmd_get_revision(struct ti_sci_info *info)
struct ti_sci_xfer *xfer;
int ret;
- /* No need to setup flags since it is expected to respond */
xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_VERSION,
- 0x0, sizeof(struct ti_sci_msg_hdr),
+ TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+ sizeof(struct ti_sci_msg_hdr),
sizeof(*rev_info));
if (IS_ERR(xfer)) {
ret = PTR_ERR(xfer);
@@ -578,9 +578,9 @@ static int ti_sci_get_device_state(const struct ti_sci_handle *handle,
info = handle_to_ti_sci_info(handle);
dev = info->dev;
- /* Response is expected, so need of any flags */
xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_DEVICE_STATE,
- 0, sizeof(*req), sizeof(*resp));
+ TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+ sizeof(*req), sizeof(*resp));
if (IS_ERR(xfer)) {
ret = PTR_ERR(xfer);
dev_err(dev, "Message alloc failed(%d)\n", ret);
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] firmware: ti_sci: Always request response from firmware
2019-04-29 13:15 [PATCH] firmware: ti_sci: Always request response from firmware Andrew F. Davis
@ 2019-04-29 14:40 ` Nishanth Menon
0 siblings, 0 replies; 2+ messages in thread
From: Nishanth Menon @ 2019-04-29 14:40 UTC (permalink / raw)
To: Andrew F. Davis
Cc: Tero Kristo, Santosh Shilimkar, linux-arm-kernel, linux-kernel
On 09:15-20190429, Andrew F. Davis wrote:
> TI-SCI firmware will only respond to messages when the
> TI_SCI_FLAG_REQ_ACK_ON_PROCESSED flag is set. Most messages already do
> this, set this for the ones that do not.
>
> This will be enforced in future firmware that better match the TI-SCI
> specifications, this patch will not break users of existing firmware.
>
> Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol")
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> Acked-by: Nishanth Menon <nm@ti.com>
yep, the patch allows backward and forward compatibility with TISCI
compliant firmware.
Thanks for doing the patch.
> Tested-by: Alejandro Hernandez <ajhernandez@ti.com>
> ---
> drivers/firmware/ti_sci.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
> index 3fbbb61012c4..3f202c63b9a6 100644
> --- a/drivers/firmware/ti_sci.c
> +++ b/drivers/firmware/ti_sci.c
> @@ -448,9 +448,9 @@ static int ti_sci_cmd_get_revision(struct ti_sci_info *info)
> struct ti_sci_xfer *xfer;
> int ret;
>
> - /* No need to setup flags since it is expected to respond */
> xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_VERSION,
> - 0x0, sizeof(struct ti_sci_msg_hdr),
> + TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
> + sizeof(struct ti_sci_msg_hdr),
> sizeof(*rev_info));
> if (IS_ERR(xfer)) {
> ret = PTR_ERR(xfer);
> @@ -578,9 +578,9 @@ static int ti_sci_get_device_state(const struct ti_sci_handle *handle,
> info = handle_to_ti_sci_info(handle);
> dev = info->dev;
>
> - /* Response is expected, so need of any flags */
> xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_DEVICE_STATE,
> - 0, sizeof(*req), sizeof(*resp));
> + TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
> + sizeof(*req), sizeof(*resp));
> if (IS_ERR(xfer)) {
> ret = PTR_ERR(xfer);
> dev_err(dev, "Message alloc failed(%d)\n", ret);
> --
> 2.21.0
>
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-29 14:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-29 13:15 [PATCH] firmware: ti_sci: Always request response from firmware Andrew F. Davis
2019-04-29 14:40 ` Nishanth Menon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).