All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: qcom: rpmh: Add note about sleep/wake state for BCMs
@ 2022-05-17 19:09 Stephen Boyd
  2022-05-17 19:16 ` Alex Elder
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stephen Boyd @ 2022-05-17 19:09 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Bjorn Andersson
  Cc: linux-kernel, linux-clk, patches, linux-arm-msm, Alex Elder, Taniya Das

The sleep/wake state doesn't need to be set here because of specific
RPMh behavior that carries over the active state when sleep/wake state
hasn't been modified. Add a note to the code so we aren't tempted to set
the sleep/wake states.

Cc: Alex Elder <elder@linaro.org>
Cc: Taniya Das <quic_tdas@quicinc.com>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---

This superseedes a previous patch[1] I sent that tried to fix this.

 drivers/clk/qcom/clk-rpmh.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index aed907982344..c07cab6905cb 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -274,6 +274,11 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable)
 		cmd.addr = c->res_addr;
 		cmd.data = BCM_TCS_CMD(1, enable, 0, cmd_state);
 
+		/*
+		 * Send only an active only state request. RPMh continues to
+		 * use the active state when we're in sleep/wake state as long
+		 * as the sleep/wake state has never been set.
+		 */
 		ret = clk_rpmh_send(c, RPMH_ACTIVE_ONLY_STATE, &cmd, enable);
 		if (ret) {
 			dev_err(c->dev, "set active state of %s failed: (%d)\n",

base-commit: 42226c989789d8da4af1de0c31070c96726d990c
-- 
https://chromeos.dev
[1] https://lore.kernel.org/r/20220412194505.614002-1-swboyd@chromium.org

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: qcom: rpmh: Add note about sleep/wake state for BCMs
  2022-05-17 19:09 [PATCH] clk: qcom: rpmh: Add note about sleep/wake state for BCMs Stephen Boyd
@ 2022-05-17 19:16 ` Alex Elder
  2022-05-27 14:23   ` Alex Elder
  2022-06-25 20:00 ` Bjorn Andersson
  2022-06-27 20:03 ` (subset) " Bjorn Andersson
  2 siblings, 1 reply; 5+ messages in thread
From: Alex Elder @ 2022-05-17 19:16 UTC (permalink / raw)
  To: Stephen Boyd, Michael Turquette, Stephen Boyd, Bjorn Andersson
  Cc: linux-kernel, linux-clk, patches, linux-arm-msm, Taniya Das

On 5/17/22 2:09 PM, Stephen Boyd wrote:
> The sleep/wake state doesn't need to be set here because of specific
> RPMh behavior that carries over the active state when sleep/wake state
> hasn't been modified. Add a note to the code so we aren't tempted to set
> the sleep/wake states.
> 
> Cc: Alex Elder <elder@linaro.org>
> Cc: Taniya Das <quic_tdas@quicinc.com>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>

Looks good to me.  Thanks Stephen.

Reviewed-by: Alex Elder <elder@linaro.org>

> ---
> 
> This superseedes a previous patch[1] I sent that tried to fix this.
> 
>   drivers/clk/qcom/clk-rpmh.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
> index aed907982344..c07cab6905cb 100644
> --- a/drivers/clk/qcom/clk-rpmh.c
> +++ b/drivers/clk/qcom/clk-rpmh.c
> @@ -274,6 +274,11 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable)
>   		cmd.addr = c->res_addr;
>   		cmd.data = BCM_TCS_CMD(1, enable, 0, cmd_state);
>   
> +		/*
> +		 * Send only an active only state request. RPMh continues to
> +		 * use the active state when we're in sleep/wake state as long
> +		 * as the sleep/wake state has never been set.
> +		 */
>   		ret = clk_rpmh_send(c, RPMH_ACTIVE_ONLY_STATE, &cmd, enable);
>   		if (ret) {
>   			dev_err(c->dev, "set active state of %s failed: (%d)\n",
> 
> base-commit: 42226c989789d8da4af1de0c31070c96726d990c


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: qcom: rpmh: Add note about sleep/wake state for BCMs
  2022-05-17 19:16 ` Alex Elder
@ 2022-05-27 14:23   ` Alex Elder
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Elder @ 2022-05-27 14:23 UTC (permalink / raw)
  To: Stephen Boyd, Michael Turquette, Stephen Boyd, Bjorn Andersson,
	Taniya Das
  Cc: linux-kernel, linux-clk, patches, linux-arm-msm

On 5/17/22 2:16 PM, Alex Elder wrote:
> On 5/17/22 2:09 PM, Stephen Boyd wrote:
>> The sleep/wake state doesn't need to be set here because of specific
>> RPMh behavior that carries over the active state when sleep/wake state
>> hasn't been modified. Add a note to the code so we aren't tempted to set
>> the sleep/wake states.
>>
>> Cc: Alex Elder <elder@linaro.org>
>> Cc: Taniya Das <quic_tdas@quicinc.com>
>> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> 
> Looks good to me.  Thanks Stephen.
> 
> Reviewed-by: Alex Elder <elder@linaro.org>

Taniya, do you have anything to say about this patch?  -Alex

> 
>> ---
>>
>> This superseedes a previous patch[1] I sent that tried to fix this.
>>
>>   drivers/clk/qcom/clk-rpmh.c | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
>> index aed907982344..c07cab6905cb 100644
>> --- a/drivers/clk/qcom/clk-rpmh.c
>> +++ b/drivers/clk/qcom/clk-rpmh.c
>> @@ -274,6 +274,11 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh 
>> *c, bool enable)
>>           cmd.addr = c->res_addr;
>>           cmd.data = BCM_TCS_CMD(1, enable, 0, cmd_state);
>> +        /*
>> +         * Send only an active only state request. RPMh continues to
>> +         * use the active state when we're in sleep/wake state as long
>> +         * as the sleep/wake state has never been set.
>> +         */
>>           ret = clk_rpmh_send(c, RPMH_ACTIVE_ONLY_STATE, &cmd, enable);
>>           if (ret) {
>>               dev_err(c->dev, "set active state of %s failed: (%d)\n",
>>
>> base-commit: 42226c989789d8da4af1de0c31070c96726d990c
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: qcom: rpmh: Add note about sleep/wake state for BCMs
  2022-05-17 19:09 [PATCH] clk: qcom: rpmh: Add note about sleep/wake state for BCMs Stephen Boyd
  2022-05-17 19:16 ` Alex Elder
@ 2022-06-25 20:00 ` Bjorn Andersson
  2022-06-27 20:03 ` (subset) " Bjorn Andersson
  2 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2022-06-25 20:00 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Michael Turquette, Stephen Boyd, linux-kernel, linux-clk,
	patches, linux-arm-msm, Alex Elder, Taniya Das

On Tue 17 May 14:09 CDT 2022, Stephen Boyd wrote:

> The sleep/wake state doesn't need to be set here because of specific
> RPMh behavior that carries over the active state when sleep/wake state
> hasn't been modified. Add a note to the code so we aren't tempted to set
> the sleep/wake states.
> 
> Cc: Alex Elder <elder@linaro.org>
> Cc: Taniya Das <quic_tdas@quicinc.com>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
> 
> This superseedes a previous patch[1] I sent that tried to fix this.
> 
>  drivers/clk/qcom/clk-rpmh.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
> index aed907982344..c07cab6905cb 100644
> --- a/drivers/clk/qcom/clk-rpmh.c
> +++ b/drivers/clk/qcom/clk-rpmh.c
> @@ -274,6 +274,11 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable)
>  		cmd.addr = c->res_addr;
>  		cmd.data = BCM_TCS_CMD(1, enable, 0, cmd_state);
>  
> +		/*
> +		 * Send only an active only state request. RPMh continues to
> +		 * use the active state when we're in sleep/wake state as long
> +		 * as the sleep/wake state has never been set.
> +		 */
>  		ret = clk_rpmh_send(c, RPMH_ACTIVE_ONLY_STATE, &cmd, enable);
>  		if (ret) {
>  			dev_err(c->dev, "set active state of %s failed: (%d)\n",
> 
> base-commit: 42226c989789d8da4af1de0c31070c96726d990c
> -- 
> https://chromeos.dev
> [1] https://lore.kernel.org/r/20220412194505.614002-1-swboyd@chromium.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: (subset) [PATCH] clk: qcom: rpmh: Add note about sleep/wake state for BCMs
  2022-05-17 19:09 [PATCH] clk: qcom: rpmh: Add note about sleep/wake state for BCMs Stephen Boyd
  2022-05-17 19:16 ` Alex Elder
  2022-06-25 20:00 ` Bjorn Andersson
@ 2022-06-27 20:03 ` Bjorn Andersson
  2 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2022-06-27 20:03 UTC (permalink / raw)
  To: Stephen Boyd, Michael Turquette, Stephen Boyd
  Cc: Alex Elder, linux-kernel, linux-arm-msm, Taniya Das, patches, linux-clk

On Tue, 17 May 2022 12:09:49 -0700, Stephen Boyd wrote:
> The sleep/wake state doesn't need to be set here because of specific
> RPMh behavior that carries over the active state when sleep/wake state
> hasn't been modified. Add a note to the code so we aren't tempted to set
> the sleep/wake states.
> 
> 

Applied, thanks!

[1/1] clk: qcom: rpmh: Add note about sleep/wake state for BCMs
      commit: 29f66b625281a3026653fd33b710771a4ae394d2

Best regards,
-- 
Bjorn Andersson <bjorn.andersson@linaro.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-27 20:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 19:09 [PATCH] clk: qcom: rpmh: Add note about sleep/wake state for BCMs Stephen Boyd
2022-05-17 19:16 ` Alex Elder
2022-05-27 14:23   ` Alex Elder
2022-06-25 20:00 ` Bjorn Andersson
2022-06-27 20:03 ` (subset) " Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.