firmware: ti_sci: Always request response from firmware
PATCH v2 1/1 firmware: ti_sci: Always request response from firmware
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.
---
Changes from v1:
- Rebased on v5.2-rc2
drivers/firmware/ti_sci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/firmware/ti_sci.c +4 -4
@@ -466,9 +466,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);
@@ -596,9 +596,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);
Signature · 1 line
2.17.1
Quoted 7 lines · Andrew F. Davis
TI-SCI firmware will only respond to messages when the
TI_SCI_FLAG_REQ_ACK_ON_PROCESSEDflag 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.
Quoted 8 lines
Fixes aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol")Signed-off-by Andrew F. Davis <[email protected]>Acked-by Nishanth Menon <[email protected]>Tested-by Alejandro Hernandez <[email protected]>---
Changes from v1:
- Rebased on v5.2-rc2
Thanks, queuing up for 5.3.
-Tero
Quoted 23 lines
drivers/firmware/ti_sci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/firmware/ti_sci.c +2
-2@@ -466,9 +466,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);@@ -596,9 +596,9 @@ static int ti_sci_get_device_state(const struct ti_sci_handle *handle, info =handle_to_ti_sci_info (handle);
drivers/firmware/ti_sci.c static int ti_sci_get_device_state(const struct ti_sci_handle *handle, · line 604
Quoted 10 lines
drivers/firmware/ti_sci.c +2
-2dev = 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);
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki