diff options
author | Maulik Shah <quic_mkshah@quicinc.com> | 2022-10-18 17:28:37 +0200 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2022-11-10 04:15:27 +0100 |
commit | cccbe3e528bebcba9e9c33cde7fb4f4344524c93 (patch) | |
tree | 45ac664f2ab7faccf6a5ba177f872fbe2daf5a91 /drivers/soc/qcom/rpmh-internal.h | |
parent | soc: qcom: rpmh-rsc: Save base address of drv (diff) | |
download | linux-cccbe3e528bebcba9e9c33cde7fb4f4344524c93.tar.xz linux-cccbe3e528bebcba9e9c33cde7fb4f4344524c93.zip |
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
Diffstat (limited to 'drivers/soc/qcom/rpmh-internal.h')
-rw-r--r-- | drivers/soc/qcom/rpmh-internal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/soc/qcom/rpmh-internal.h b/drivers/soc/qcom/rpmh-internal.h index 7866bb1e5361..39f53586f724 100644 --- a/drivers/soc/qcom/rpmh-internal.h +++ b/drivers/soc/qcom/rpmh-internal.h @@ -112,6 +112,7 @@ struct rpmh_ctrlr { * @tcs_wait: Wait queue used to wait for @tcs_in_use to free up a * slot * @client: Handle to the DRV's client. + * @dev: RSC device. */ struct rsc_drv { const char *name; @@ -127,12 +128,14 @@ struct rsc_drv { spinlock_t lock; wait_queue_head_t tcs_wait; struct rpmh_ctrlr client; + struct device *dev; }; int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg); int rpmh_rsc_write_ctrl_data(struct rsc_drv *drv, const struct tcs_request *msg); void rpmh_rsc_invalidate(struct rsc_drv *drv); +void rpmh_rsc_write_next_wakeup(struct rsc_drv *drv); void rpmh_tx_done(const struct tcs_request *msg, int r); int rpmh_flush(struct rpmh_ctrlr *ctrlr); |