All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Heiko Stuebner <heiko@sntech.de>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Elaine Zhang <zhangqing@rock-chips.com>,
	kernel@collabora.com,
	Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: [PATCH 5/6] soc: rockchip: power-domain: do not enable PD
Date: Wed, 31 Aug 2022 20:26:28 +0200	[thread overview]
Message-ID: <20220831182629.79255-6-sebastian.reichel@collabora.com> (raw)
In-Reply-To: <20220831182629.79255-1-sebastian.reichel@collabora.com>

From: Elaine Zhang <zhangqing@rock-chips.com>

It's not need to power on all pd when add pm domain. Instead
use PD's real status in pm_genpd_init().

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 drivers/soc/rockchip/pm_domains.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 89795abac951..a59aa3b89a72 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -595,14 +595,6 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
 		}
 	}
 
-	error = rockchip_pd_power(pd, true);
-	if (error) {
-		dev_err(pmu->dev,
-			"failed to power on domain '%pOFn': %d\n",
-			node, error);
-		goto err_unprepare_clocks;
-	}
-
 	if (pd->info->name)
 		pd->genpd.name = pd->info->name;
 	else
@@ -614,7 +606,7 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
 	pd->genpd.flags = GENPD_FLAG_PM_CLK;
 	if (pd_info->active_wakeup)
 		pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
-	pm_genpd_init(&pd->genpd, NULL, false);
+	pm_genpd_init(&pd->genpd, NULL, !rockchip_pmu_domain_is_on(pd));
 
 	pmu->genpd_data.domains[id] = &pd->genpd;
 	return 0;
-- 
2.35.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Heiko Stuebner <heiko@sntech.de>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Elaine Zhang <zhangqing@rock-chips.com>,
	kernel@collabora.com,
	Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: [PATCH 5/6] soc: rockchip: power-domain: do not enable PD
Date: Wed, 31 Aug 2022 20:26:28 +0200	[thread overview]
Message-ID: <20220831182629.79255-6-sebastian.reichel@collabora.com> (raw)
In-Reply-To: <20220831182629.79255-1-sebastian.reichel@collabora.com>

From: Elaine Zhang <zhangqing@rock-chips.com>

It's not need to power on all pd when add pm domain. Instead
use PD's real status in pm_genpd_init().

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 drivers/soc/rockchip/pm_domains.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 89795abac951..a59aa3b89a72 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -595,14 +595,6 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
 		}
 	}
 
-	error = rockchip_pd_power(pd, true);
-	if (error) {
-		dev_err(pmu->dev,
-			"failed to power on domain '%pOFn': %d\n",
-			node, error);
-		goto err_unprepare_clocks;
-	}
-
 	if (pd->info->name)
 		pd->genpd.name = pd->info->name;
 	else
@@ -614,7 +606,7 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
 	pd->genpd.flags = GENPD_FLAG_PM_CLK;
 	if (pd_info->active_wakeup)
 		pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
-	pm_genpd_init(&pd->genpd, NULL, false);
+	pm_genpd_init(&pd->genpd, NULL, !rockchip_pmu_domain_is_on(pd));
 
 	pmu->genpd_data.domains[id] = &pd->genpd;
 	return 0;
-- 
2.35.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Heiko Stuebner <heiko@sntech.de>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Elaine Zhang <zhangqing@rock-chips.com>,
	kernel@collabora.com,
	Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: [PATCH 5/6] soc: rockchip: power-domain: do not enable PD
Date: Wed, 31 Aug 2022 20:26:28 +0200	[thread overview]
Message-ID: <20220831182629.79255-6-sebastian.reichel@collabora.com> (raw)
In-Reply-To: <20220831182629.79255-1-sebastian.reichel@collabora.com>

From: Elaine Zhang <zhangqing@rock-chips.com>

It's not need to power on all pd when add pm domain. Instead
use PD's real status in pm_genpd_init().

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 drivers/soc/rockchip/pm_domains.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 89795abac951..a59aa3b89a72 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -595,14 +595,6 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
 		}
 	}
 
-	error = rockchip_pd_power(pd, true);
-	if (error) {
-		dev_err(pmu->dev,
-			"failed to power on domain '%pOFn': %d\n",
-			node, error);
-		goto err_unprepare_clocks;
-	}
-
 	if (pd->info->name)
 		pd->genpd.name = pd->info->name;
 	else
@@ -614,7 +606,7 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
 	pd->genpd.flags = GENPD_FLAG_PM_CLK;
 	if (pd_info->active_wakeup)
 		pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
-	pm_genpd_init(&pd->genpd, NULL, false);
+	pm_genpd_init(&pd->genpd, NULL, !rockchip_pmu_domain_is_on(pd));
 
 	pmu->genpd_data.domains[id] = &pd->genpd;
 	return 0;
-- 
2.35.1


  parent reply	other threads:[~2022-08-31 18:28 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 18:26 [PATCH 0/6] RK3588 Power Domain Support Sebastian Reichel
2022-08-31 18:26 ` Sebastian Reichel
2022-08-31 18:26 ` Sebastian Reichel
2022-08-31 18:26 ` [PATCH 1/6] dt-bindings: arm: rockchip: add rk5388 compatible string to pmu.yaml Sebastian Reichel
2022-08-31 18:26   ` Sebastian Reichel
2022-08-31 18:26   ` Sebastian Reichel
2022-09-02 20:57   ` Rob Herring
2022-09-02 20:57     ` Rob Herring
2022-09-02 20:57     ` Rob Herring
2022-08-31 18:26 ` [PATCH 2/6] dt-bindings: add power-domain header for rk3588 Sebastian Reichel
2022-08-31 18:26   ` Sebastian Reichel
2022-08-31 18:26   ` Sebastian Reichel
2022-09-02 21:01   ` Rob Herring
2022-09-02 21:01     ` Rob Herring
2022-09-02 21:01     ` Rob Herring
2022-09-05 11:56   ` Finley Xiao
2022-09-05 11:56     ` Finley Xiao
2022-09-05 11:56     ` Finley Xiao
2022-08-31 18:26 ` [PATCH 3/6] dt-bindings: power: rockchip: Add bindings " Sebastian Reichel
2022-08-31 18:26   ` Sebastian Reichel
2022-08-31 18:26   ` Sebastian Reichel
2022-08-31 18:26 ` [PATCH 4/6] dt-bindings: mfd: syscon: Add rk3588 QoS register compatible Sebastian Reichel
2022-08-31 18:26   ` Sebastian Reichel
2022-08-31 18:26   ` Sebastian Reichel
2022-09-05 16:35   ` Krzysztof Kozlowski
2022-09-05 16:35     ` Krzysztof Kozlowski
2022-09-05 16:35     ` Krzysztof Kozlowski
2022-09-05 19:03   ` Heiko Stübner
2022-09-05 19:03     ` Heiko Stübner
2022-09-05 19:03     ` Heiko Stübner
2022-09-06 15:41     ` Lee Jones
2022-09-06 15:41       ` Lee Jones
2022-09-06 15:41       ` Lee Jones
2022-09-06 15:50       ` Sebastian Reichel
2022-09-06 15:50         ` Sebastian Reichel
2022-09-06 15:50         ` Sebastian Reichel
2022-09-08  7:33         ` Lee Jones
2022-09-08  7:33           ` Lee Jones
2022-09-08  7:33           ` Lee Jones
2022-08-31 18:26 ` Sebastian Reichel [this message]
2022-08-31 18:26   ` [PATCH 5/6] soc: rockchip: power-domain: do not enable PD Sebastian Reichel
2022-08-31 18:26   ` Sebastian Reichel
2022-08-31 18:26 ` [PATCH 6/6] soc: rockchip: power-domain: add power domain support for rk3588 Sebastian Reichel
2022-08-31 18:26   ` Sebastian Reichel
2022-08-31 18:26   ` Sebastian Reichel
  -- strict thread matches above, loose matches on Subject: below --
2022-06-23 16:23 [PATCH 0/6] RK3588 Power Domain Support Sebastian Reichel
2022-06-23 16:23 ` [PATCH 5/6] soc: rockchip: power-domain: do not enable PD Sebastian Reichel
2022-06-23 16:23   ` Sebastian Reichel
2022-06-23 16:23   ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220831182629.79255-6-sebastian.reichel@collabora.com \
    --to=sebastian.reichel@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=kernel@collabora.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=zhangqing@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.