soc: qcom: rpmh-rsc: Write CONTROL_TCS with next timer wakeup
authorMaulik Shah <quic_mkshah@quicinc.com>
Tue, 18 Oct 2022 15:28:37 +0000 (17:28 +0200)
committerBjorn Andersson <andersson@kernel.org>
Thu, 10 Nov 2022 03:15:27 +0000 (21:15 -0600)
commitcccbe3e528bebcba9e9c33cde7fb4f4344524c93
tree45ac664f2ab7faccf6a5ba177f872fbe2daf5a91
parentab33c8f3a8325eb2343534968c38e35d8129be87
soc: qcom: rpmh-rsc: Write CONTROL_TCS with next timer wakeup

The next wakeup timer value needs to be set in always on domain timer
as the arch timer interrupt can not wakeup the SoC if after the deepest
CPUidle states the SoC also enters deepest low power state.

To wakeup the SoC in such scenarios the earliest wakeup time is set in
CONTROL_TCS and the firmware takes care of setting up its own timer in
always on domain with next wakeup time. The timer wakes up the RSC and
sets resources back to wake state.

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-7-ulf.hansson@linaro.org
drivers/soc/qcom/rpmh-internal.h
drivers/soc/qcom/rpmh-rsc.c
drivers/soc/qcom/rpmh.c