[2/2] interconnect: qcom: rpm: drop bogus pm domain attach

Message ID 20230313084953.24088-3-johan+linaro@kernel.org
State New
Headers
Series interconnect: qcom: rpm: fix msm8996 interconnect registration |

Commit Message

Johan Hovold March 13, 2023, 8:49 a.m. UTC
  Any power domain would already have been attached by the platform bus
code so drop the bogus power domain attach which always succeeds from
probe.

This effectively reverts commit 7de109c0abe9 ("interconnect: icc-rpm:
Add support for bus power domain").

Fixes: 7de109c0abe9 ("interconnect: icc-rpm: Add support for bus power domain")
Cc: Yassine Oudjana <y.oudjana@protonmail.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/interconnect/qcom/icc-rpm.c | 6 ------
 drivers/interconnect/qcom/icc-rpm.h | 1 -
 drivers/interconnect/qcom/msm8996.c | 1 -
 3 files changed, 8 deletions(-)
  

Comments

Konrad Dybcio March 13, 2023, 9:10 a.m. UTC | #1
On 13.03.2023 09:49, Johan Hovold wrote:
> Any power domain would already have been attached by the platform bus
> code so drop the bogus power domain attach which always succeeds from
> probe.
> 
> This effectively reverts commit 7de109c0abe9 ("interconnect: icc-rpm:
> Add support for bus power domain").
> 
> Fixes: 7de109c0abe9 ("interconnect: icc-rpm: Add support for bus power domain")
> Cc: Yassine Oudjana <y.oudjana@protonmail.com>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
Running Friday's -next (so, without your cleanups):

cat /sys/kernel/debug/pm_genpd/aggre0_noc/current_state
> on

Removing the pd attach:

cat /sys/kernel/debug/pm_genpd/aggre0_noc/current_state
> on

Also removing the other consumer of this genpd, the simple-pm-bus
hosting PCIe:

cat /sys/kernel/debug/pm_genpd/aggre0_noc/current_state
> on

So it looks like that's the case!

Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org> # MSM8996 Sony Kagura
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/interconnect/qcom/icc-rpm.c | 6 ------
>  drivers/interconnect/qcom/icc-rpm.h | 1 -
>  drivers/interconnect/qcom/msm8996.c | 1 -
>  3 files changed, 8 deletions(-)
> 
> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
> index 3b055cd893ea..c303ce22a7cd 100644
> --- a/drivers/interconnect/qcom/icc-rpm.c
> +++ b/drivers/interconnect/qcom/icc-rpm.c
> @@ -496,12 +496,6 @@ int qnoc_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	if (desc->has_bus_pd) {
> -		ret = dev_pm_domain_attach(dev, true);
> -		if (ret)
> -			goto err_disable_clks;
> -	}
> -
>  	provider = &qp->provider;
>  	provider->dev = dev;
>  	provider->set = qcom_icc_set;
> diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h
> index a49af844ab13..02257b0d3d5c 100644
> --- a/drivers/interconnect/qcom/icc-rpm.h
> +++ b/drivers/interconnect/qcom/icc-rpm.h
> @@ -91,7 +91,6 @@ struct qcom_icc_desc {
>  	size_t num_nodes;
>  	const char * const *clocks;
>  	size_t num_clocks;
> -	bool has_bus_pd;
>  	enum qcom_icc_type type;
>  	const struct regmap_config *regmap_cfg;
>  	unsigned int qos_offset;
> diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qcom/msm8996.c
> index 25a1a32bc611..14efd2761b7a 100644
> --- a/drivers/interconnect/qcom/msm8996.c
> +++ b/drivers/interconnect/qcom/msm8996.c
> @@ -1823,7 +1823,6 @@ static const struct qcom_icc_desc msm8996_a0noc = {
>  	.num_nodes = ARRAY_SIZE(a0noc_nodes),
>  	.clocks = bus_a0noc_clocks,
>  	.num_clocks = ARRAY_SIZE(bus_a0noc_clocks),
> -	.has_bus_pd = true,
>  	.regmap_cfg = &msm8996_a0noc_regmap_config
>  };
>
  
Georgi Djakov March 13, 2023, 7:58 p.m. UTC | #2
Hi Johan,

On 13.03.23 10:49, Johan Hovold wrote:
> Any power domain would already have been attached by the platform bus
> code so drop the bogus power domain attach which always succeeds from
> probe.
> 
> This effectively reverts commit 7de109c0abe9 ("interconnect: icc-rpm:
> Add support for bus power domain").
> 
> Fixes: 7de109c0abe9 ("interconnect: icc-rpm: Add support for bus power domain")
> Cc: Yassine Oudjana <y.oudjana@protonmail.com>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/interconnect/qcom/icc-rpm.c | 6 ------
>   drivers/interconnect/qcom/icc-rpm.h | 1 -
>   drivers/interconnect/qcom/msm8996.c | 1 -
>   3 files changed, 8 deletions(-)
>  > diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
> index 3b055cd893ea..c303ce22a7cd 100644
> --- a/drivers/interconnect/qcom/icc-rpm.c
> +++ b/drivers/interconnect/qcom/icc-rpm.c
> @@ -496,12 +496,6 @@ int qnoc_probe(struct platform_device *pdev)
>   	if (ret)
>   		return ret;
>   
> -	if (desc->has_bus_pd) {
> -		ret = dev_pm_domain_attach(dev, true);
> -		if (ret)
> -			goto err_disable_clks;
> -	}
> -
>   	provider = &qp->provider;
>   	provider->dev = dev;
>   	provider->set = qcom_icc_set;
> diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h
> index a49af844ab13..02257b0d3d5c 100644
> --- a/drivers/interconnect/qcom/icc-rpm.h
> +++ b/drivers/interconnect/qcom/icc-rpm.h
> @@ -91,7 +91,6 @@ struct qcom_icc_desc {
>   	size_t num_nodes;
>   	const char * const *clocks;
>   	size_t num_clocks;
> -	bool has_bus_pd;
>   	enum qcom_icc_type type;
>   	const struct regmap_config *regmap_cfg;
>   	unsigned int qos_offset;
> diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qcom/msm8996.c
> index 25a1a32bc611..14efd2761b7a 100644
> --- a/drivers/interconnect/qcom/msm8996.c
> +++ b/drivers/interconnect/qcom/msm8996.c
> @@ -1823,7 +1823,6 @@ static const struct qcom_icc_desc msm8996_a0noc = {
>   	.num_nodes = ARRAY_SIZE(a0noc_nodes),
>   	.clocks = bus_a0noc_clocks,
>   	.num_clocks = ARRAY_SIZE(bus_a0noc_clocks),
> -	.has_bus_pd = true,
>   	.regmap_cfg = &msm8996_a0noc_regmap_config
>   };
> 
To make it a complete revert, I'll fold this in:

diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
index 0badd2c75161..c80819557923 100644
--- a/drivers/interconnect/qcom/icc-rpm.c
+++ b/drivers/interconnect/qcom/icc-rpm.c
@@ -11,7 +11,6 @@
  #include <linux/of_device.h>
  #include <linux/of_platform.h>
  #include <linux/platform_device.h>
-#include <linux/pm_domain.h>
  #include <linux/regmap.h>
  #include <linux/slab.h>

Thanks,
Georgi
  
Johan Hovold March 14, 2023, 7:46 a.m. UTC | #3
On Mon, Mar 13, 2023 at 09:58:24PM +0200, Georgi Djakov wrote:
> Hi Johan,
> 
> On 13.03.23 10:49, Johan Hovold wrote:
> > Any power domain would already have been attached by the platform bus
> > code so drop the bogus power domain attach which always succeeds from
> > probe.
> > 
> > This effectively reverts commit 7de109c0abe9 ("interconnect: icc-rpm:
> > Add support for bus power domain").
> > 
> > Fixes: 7de109c0abe9 ("interconnect: icc-rpm: Add support for bus power domain")
> > Cc: Yassine Oudjana <y.oudjana@protonmail.com>
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

> To make it a complete revert, I'll fold this in:
> 
> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
> index 0badd2c75161..c80819557923 100644
> --- a/drivers/interconnect/qcom/icc-rpm.c
> +++ b/drivers/interconnect/qcom/icc-rpm.c
> @@ -11,7 +11,6 @@
>   #include <linux/of_device.h>
>   #include <linux/of_platform.h>
>   #include <linux/platform_device.h>
> -#include <linux/pm_domain.h>
>   #include <linux/regmap.h>
>   #include <linux/slab.h>

Thanks for catching that!

Johan
  

Patch

diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
index 3b055cd893ea..c303ce22a7cd 100644
--- a/drivers/interconnect/qcom/icc-rpm.c
+++ b/drivers/interconnect/qcom/icc-rpm.c
@@ -496,12 +496,6 @@  int qnoc_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	if (desc->has_bus_pd) {
-		ret = dev_pm_domain_attach(dev, true);
-		if (ret)
-			goto err_disable_clks;
-	}
-
 	provider = &qp->provider;
 	provider->dev = dev;
 	provider->set = qcom_icc_set;
diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h
index a49af844ab13..02257b0d3d5c 100644
--- a/drivers/interconnect/qcom/icc-rpm.h
+++ b/drivers/interconnect/qcom/icc-rpm.h
@@ -91,7 +91,6 @@  struct qcom_icc_desc {
 	size_t num_nodes;
 	const char * const *clocks;
 	size_t num_clocks;
-	bool has_bus_pd;
 	enum qcom_icc_type type;
 	const struct regmap_config *regmap_cfg;
 	unsigned int qos_offset;
diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qcom/msm8996.c
index 25a1a32bc611..14efd2761b7a 100644
--- a/drivers/interconnect/qcom/msm8996.c
+++ b/drivers/interconnect/qcom/msm8996.c
@@ -1823,7 +1823,6 @@  static const struct qcom_icc_desc msm8996_a0noc = {
 	.num_nodes = ARRAY_SIZE(a0noc_nodes),
 	.clocks = bus_a0noc_clocks,
 	.num_clocks = ARRAY_SIZE(bus_a0noc_clocks),
-	.has_bus_pd = true,
 	.regmap_cfg = &msm8996_a0noc_regmap_config
 };