soc: qcom: rpmh-rsc: Attach RSC to cluster PM domain
authorLina Iyer <ilina@codeaurora.org>
Tue, 18 Oct 2022 15:28:33 +0000 (17:28 +0200)
committerBjorn Andersson <andersson@kernel.org>
Thu, 10 Nov 2022 03:14:21 +0000 (21:14 -0600)
commit25092e6100acd7fcc72deed2583e63db683bb872
tree3a67c095901c61a2d0513ca725fb136851dda1a9
parent144560b070121d7b368a3c8da60c3c84484fc218
soc: qcom: rpmh-rsc: Attach RSC to cluster PM domain

RSC is part the CPU subsystem and powers off the CPU domains when all
the CPUs and no RPMH transactions are pending from any of the drivers.
The RSC needs to flush the 'sleep' and 'wake' votes that are critical
for saving power when all the CPUs are in idle.

Let's make RSC part of the CPU PM domains, by attaching it to the
cluster power domain. Registering for PM domain notifications, RSC
driver can be notified that the last CPU is powering down. When the last
CPU is powering down the domain, let's flush the 'sleep' and 'wake'
votes that are stored in the data buffers into the hardware and also
write next wakeup in CONTROL_TCS.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # SM8450
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221018152837.619426-3-ulf.hansson@linaro.org
drivers/soc/qcom/rpmh-internal.h
drivers/soc/qcom/rpmh-rsc.c