soc: qcom: rpmh: Fix sending incorrect data during rpmh flush

During flush of current cached data, Sleep and Wake TCSes have
previously programmed data present. Due to this incorrect data
is sent.

Fix this by cleaning TCSes and freshly program current cached
sleep and wake data.

Change-Id: I8f1cb9925a7800aad65d665192d3b129c76dd9de
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
This commit is contained in:
Lina Iyer 2019-09-05 15:40:38 -06:00 • committed by Maulik Shah
commit d1c7802611

View file

@ -562,6 +562,11 @@ int rpmh_flush(const struct device *dev)
return 0;
}
/* Invalidate the TCSes first to avoid stale data */
do {
ret = rpmh_rsc_invalidate(ctrlr_to_drv(ctrlr));
} while (ret == -EAGAIN);
/* First flush the cached batch requests */
ret = flush_batch(ctrlr);
if (ret)