Skip to content

Commit b75c83d

Browse files
cris-masudeep-holla
authored andcommitted
firmware: arm_scmi: Fix the asynchronous reset requests
SCMI Reset protocol specification allows the asynchronous reset request only when an autonomous reset action is specified. Reset requests based on explicit assert/deassert of signals should not be served asynchronously. Current implementation will instead issue an asynchronous request in any case, as long as the reset domain had advertised to support asynchronous resets. Avoid requesting the asynchronous resets when the reset action is not of the autonomous type, even if the target reset domain does, in general, support the asynchronous requests. Link: https://lore.kernel.org/r/20220817172731.1185305-6-cristian.marussi@arm.com Fixes: 95a15d8 ("firmware: arm_scmi: Add RESET protocol in SCMI v2.0") Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
1 parent e9076ff commit b75c83d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/firmware/arm_scmi/reset.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static int scmi_domain_reset(const struct scmi_protocol_handle *ph, u32 domain,
172172
return -EINVAL;
173173

174174
rdom = pi->dom_info + domain;
175-
if (rdom->async_reset)
175+
if (rdom->async_reset && flags & AUTONOMOUS_RESET)
176176
flags |= ASYNCHRONOUS_RESET;
177177

178178
ret = ph->xops->xfer_get_init(ph, RESET, sizeof(*dom), 0, &t);
@@ -184,7 +184,7 @@ static int scmi_domain_reset(const struct scmi_protocol_handle *ph, u32 domain,
184184
dom->flags = cpu_to_le32(flags);
185185
dom->reset_state = cpu_to_le32(state);
186186

187-
if (rdom->async_reset)
187+
if (flags & ASYNCHRONOUS_RESET)
188188
ret = ph->xops->do_xfer_with_response(ph, t);
189189
else
190190
ret = ph->xops->do_xfer(ph, t);

0 commit comments

Comments
 (0)