firmware: arm_scmi: Use max-rx-timeout-ms from devicetree

Override default maximum RX timeout with the value picked from the
devicetree, when provided.

Suggested-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Peng Fan <peng.fan@nxp.com>  #i.MX95 19x19 EVK
Message-Id: <20240730144707.1647025-4-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
This commit is contained in:
Cristian Marussi 2024-07-30 15:47:04 +01:00 committed by Sudeep Holla
parent 3a5e6ab06e
commit 1780e411ef

View File

@ -3029,6 +3029,7 @@ static int scmi_debugfs_raw_mode_setup(struct scmi_info *info)
static const struct scmi_desc *scmi_transport_setup(struct device *dev)
{
struct scmi_transport *trans;
int ret;
trans = dev_get_platdata(dev);
if (!trans || !trans->desc || !trans->supplier || !trans->core_ops)
@ -3045,6 +3046,14 @@ static const struct scmi_desc *scmi_transport_setup(struct device *dev)
dev_info(dev, "Using %s\n", dev_driver_string(trans->supplier));
ret = of_property_read_u32(dev->of_node, "max-rx-timeout-ms",
&trans->desc->max_rx_timeout_ms);
if (ret && ret != -EINVAL)
dev_err(dev, "Malformed max-rx-timeout-ms DT property.\n");
dev_info(dev, "SCMI max-rx-timeout: %dms\n",
trans->desc->max_rx_timeout_ms);
return trans->desc;
}