diff mbox series

[2/6] clk: qcom: gcc-ipq9574: Mark nssnoc clocks as critical

Message ID 20230711093529.18355-3-quic_devipriy@quicinc.com (mailing list archive)
State New, archived
Headers show
Series Add NSS clock controller support for IPQ9574 | expand

Commit Message

Devi Priya July 11, 2023, 9:35 a.m. UTC
Mark nssnoc clocks as critical as they are to be turned on to access
nss port tx/rx clocks.

Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
---
 drivers/clk/qcom/gcc-ipq9574.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Dmitry Baryshkov July 11, 2023, 10:25 a.m. UTC | #1
On 11/07/2023 12:35, Devi Priya wrote:
> Mark nssnoc clocks as critical as they are to be turned on to access
> nss port tx/rx clocks.

Can you please clarify, if these are turned off, one can not access 
nsscc clocks? Then the nsscc should be the consumer of these clocks 
(instead of declaring them as critical). May be using pm_clk for nsscc 
will work. If not, you'll have to do that manually from 
runtime_suspend/runtime_resume callbacks.

> 
> Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
> ---
>   drivers/clk/qcom/gcc-ipq9574.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/clk/qcom/gcc-ipq9574.c b/drivers/clk/qcom/gcc-ipq9574.c
> index 6914f962c893..b68addc6f687 100644
> --- a/drivers/clk/qcom/gcc-ipq9574.c
> +++ b/drivers/clk/qcom/gcc-ipq9574.c
> @@ -2166,7 +2166,7 @@ static struct clk_branch gcc_nssnoc_nsscc_clk = {
>   				&pcnoc_bfdcd_clk_src.clkr.hw
>   			},
>   			.num_parents = 1,
> -			.flags = CLK_SET_RATE_PARENT,
> +			.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
>   			.ops = &clk_branch2_ops,
>   		},
>   	},
> @@ -2565,7 +2565,7 @@ static struct clk_branch gcc_nssnoc_snoc_clk = {
>   				&system_noc_bfdcd_clk_src.clkr.hw
>   			},
>   			.num_parents = 1,
> -			.flags = CLK_SET_RATE_PARENT,
> +			.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
>   			.ops = &clk_branch2_ops,
>   		},
>   	},
> @@ -2582,7 +2582,7 @@ static struct clk_branch gcc_nssnoc_snoc_1_clk = {
>   				&system_noc_bfdcd_clk_src.clkr.hw
>   			},
>   			.num_parents = 1,
> -			.flags = CLK_SET_RATE_PARENT,
> +			.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
>   			.ops = &clk_branch2_ops,
>   		},
>   	},
Devi Priya Aug. 24, 2023, 5:24 a.m. UTC | #2
On 7/11/2023 3:55 PM, Dmitry Baryshkov wrote:
> On 11/07/2023 12:35, Devi Priya wrote:
>> Mark nssnoc clocks as critical as they are to be turned on to access
>> nss port tx/rx clocks.
> 
> Can you please clarify, if these are turned off, one can not access 
> nsscc clocks? Then the nsscc should be the consumer of these clocks 
> (instead of declaring them as critical). May be using pm_clk for nsscc 
> will work. If not, you'll have to do that manually from 
> runtime_suspend/runtime_resume callbacks.

Sure, will use pm_clk for nsscc in V2

Thanks,
Devi Priya
> 
>>
>> Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
>> ---
>>   drivers/clk/qcom/gcc-ipq9574.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/clk/qcom/gcc-ipq9574.c 
>> b/drivers/clk/qcom/gcc-ipq9574.c
>> index 6914f962c893..b68addc6f687 100644
>> --- a/drivers/clk/qcom/gcc-ipq9574.c
>> +++ b/drivers/clk/qcom/gcc-ipq9574.c
>> @@ -2166,7 +2166,7 @@ static struct clk_branch gcc_nssnoc_nsscc_clk = {
>>                   &pcnoc_bfdcd_clk_src.clkr.hw
>>               },
>>               .num_parents = 1,
>> -            .flags = CLK_SET_RATE_PARENT,
>> +            .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
>>               .ops = &clk_branch2_ops,
>>           },
>>       },
>> @@ -2565,7 +2565,7 @@ static struct clk_branch gcc_nssnoc_snoc_clk = {
>>                   &system_noc_bfdcd_clk_src.clkr.hw
>>               },
>>               .num_parents = 1,
>> -            .flags = CLK_SET_RATE_PARENT,
>> +            .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
>>               .ops = &clk_branch2_ops,
>>           },
>>       },
>> @@ -2582,7 +2582,7 @@ static struct clk_branch gcc_nssnoc_snoc_1_clk = {
>>                   &system_noc_bfdcd_clk_src.clkr.hw
>>               },
>>               .num_parents = 1,
>> -            .flags = CLK_SET_RATE_PARENT,
>> +            .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
>>               .ops = &clk_branch2_ops,
>>           },
>>       },
>
diff mbox series

Patch

diff --git a/drivers/clk/qcom/gcc-ipq9574.c b/drivers/clk/qcom/gcc-ipq9574.c
index 6914f962c893..b68addc6f687 100644
--- a/drivers/clk/qcom/gcc-ipq9574.c
+++ b/drivers/clk/qcom/gcc-ipq9574.c
@@ -2166,7 +2166,7 @@  static struct clk_branch gcc_nssnoc_nsscc_clk = {
 				&pcnoc_bfdcd_clk_src.clkr.hw
 			},
 			.num_parents = 1,
-			.flags = CLK_SET_RATE_PARENT,
+			.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
 			.ops = &clk_branch2_ops,
 		},
 	},
@@ -2565,7 +2565,7 @@  static struct clk_branch gcc_nssnoc_snoc_clk = {
 				&system_noc_bfdcd_clk_src.clkr.hw
 			},
 			.num_parents = 1,
-			.flags = CLK_SET_RATE_PARENT,
+			.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
 			.ops = &clk_branch2_ops,
 		},
 	},
@@ -2582,7 +2582,7 @@  static struct clk_branch gcc_nssnoc_snoc_1_clk = {
 				&system_noc_bfdcd_clk_src.clkr.hw
 			},
 			.num_parents = 1,
-			.flags = CLK_SET_RATE_PARENT,
+			.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
 			.ops = &clk_branch2_ops,
 		},
 	},