All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE
@ 2021-08-25 15:03 Michael Tretter
  2021-08-25 15:03 ` [PATCH v2 1/4] soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver Michael Tretter
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Michael Tretter @ 2021-08-25 15:03 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: michal.simek, rajan.vaja, jolly.shah, m.tretter

Hi,

This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0].

Patch 1 of this series fixes the ZynqMP PMU FW power management
initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be
called from the zynqmp_pm_domains driver, which handles power domains, instead
of the zynmp_power driver, which is responsible for suspend and shutdown. As a
side effect, PM_INIT_FINALIZE powers down all devices that have not been
requested, which might lead to misbehaving devices. Calling it from the
sync_state callback ensures that all consumers have probed and are able to
handle power management themselves.

Patches 2 to 4 are various cleanup patches to improve the readability and
debugging experience of the zynqmp_pm_domains driver.

Michael

[0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-m.tretter@pengutronix.de/

Changelog:

v2:

- move PM_INIT_FINALIZE to sync_state callback

Michael Tretter (4):
  soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
  soc: xilinx: cleanup debug and error messages
  soc: xilinx: use a properly named field instead of flags
  soc: xilinx: add a to_zynqmp_pm_domain macro

 drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++-----------
 drivers/soc/xilinx/zynqmp_power.c      |  1 -
 2 files changed, 51 insertions(+), 41 deletions(-)

-- 
2.30.2


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

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

* [PATCH v2 1/4] soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
  2021-08-25 15:03 [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Michael Tretter
@ 2021-08-25 15:03 ` Michael Tretter
  2021-08-25 15:03 ` [PATCH v2 2/4] soc: xilinx: cleanup debug and error messages Michael Tretter
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Tretter @ 2021-08-25 15:03 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: michal.simek, rajan.vaja, jolly.shah, m.tretter

PM_INIT_FINALIZE tells the PMU FW that Linux is able to handle the power
management nodes that are provided by the PMU FW. Nodes that are not
requested are shut down after this call.

Calling PM_INIT_FINALIZE from the zynqmp_power driver is wrong. The PM
node request mechanism is implemented in the zynqmp_pm_domains driver,
which must also call PM_INIT_FINALIZE.

Due to the behavior of the PMU FW, all devices must be powered up before
PM_INIT_FINALIZE is called, because otherwise the devices might
misbehave. Calling PM_INIT_FINALIZE from the sync_state device callback
ensures that all users probed successfully before the PMU FW is allowed
to power off unused domains.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
Changelog:

v2:

- move zynqmp_pm_init_finalize to sync_state callback
---
 drivers/soc/xilinx/zynqmp_pm_domains.c | 16 ++++++++++++++++
 drivers/soc/xilinx/zynqmp_power.c      |  1 -
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/xilinx/zynqmp_pm_domains.c b/drivers/soc/xilinx/zynqmp_pm_domains.c
index 226d343f0a6a..81e8e10f1092 100644
--- a/drivers/soc/xilinx/zynqmp_pm_domains.c
+++ b/drivers/soc/xilinx/zynqmp_pm_domains.c
@@ -152,11 +152,17 @@ static int zynqmp_gpd_power_off(struct generic_pm_domain *domain)
 static int zynqmp_gpd_attach_dev(struct generic_pm_domain *domain,
 				 struct device *dev)
 {
+	struct device_link *link;
 	int ret;
 	struct zynqmp_pm_domain *pd;
 
 	pd = container_of(domain, struct zynqmp_pm_domain, gpd);
 
+	link = device_link_add(dev, &domain->dev, DL_FLAG_SYNC_STATE_ONLY);
+	if (!link)
+		dev_dbg(&domain->dev, "failed to create device link for %s\n",
+			dev_name(dev));
+
 	/* If this is not the first device to attach there is nothing to do */
 	if (domain->device_count)
 		return 0;
@@ -299,9 +305,19 @@ static int zynqmp_gpd_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static void zynqmp_gpd_sync_state(struct device *dev)
+{
+	int ret;
+
+	ret = zynqmp_pm_init_finalize();
+	if (ret)
+		dev_warn(dev, "failed to release power management to firmware\n");
+}
+
 static struct platform_driver zynqmp_power_domain_driver = {
 	.driver	= {
 		.name = "zynqmp_power_controller",
+		.sync_state = zynqmp_gpd_sync_state,
 	},
 	.probe = zynqmp_gpd_probe,
 	.remove = zynqmp_gpd_remove,
diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
index c556623dae02..f8c301984d4f 100644
--- a/drivers/soc/xilinx/zynqmp_power.c
+++ b/drivers/soc/xilinx/zynqmp_power.c
@@ -178,7 +178,6 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
 	u32 pm_api_version;
 	struct mbox_client *client;
 
-	zynqmp_pm_init_finalize();
 	zynqmp_pm_get_api_version(&pm_api_version);
 
 	/* Check PM API version number */
-- 
2.30.2


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

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

* [PATCH v2 2/4] soc: xilinx: cleanup debug and error messages
  2021-08-25 15:03 [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Michael Tretter
  2021-08-25 15:03 ` [PATCH v2 1/4] soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver Michael Tretter
@ 2021-08-25 15:03 ` Michael Tretter
  2021-08-25 15:03 ` [PATCH v2 3/4] soc: xilinx: use a properly named field instead of flags Michael Tretter
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Tretter @ 2021-08-25 15:03 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: michal.simek, rajan.vaja, jolly.shah, m.tretter

Use dev_err/dev_dbg instead of pr_err/pr_debug.

Add the PM node ids to supplement the (arbitrary) power domain names to
include information which PM nodes are requested by the driver.

Drop function names from the messages, because they can easily be added
with dynamic debug.

Remove comments explaining that error messages are printed on errors.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
Changelog:

v2:

- fix another debug string that included the function name
---
 drivers/soc/xilinx/zynqmp_pm_domains.c | 45 +++++++++++++-------------
 1 file changed, 23 insertions(+), 22 deletions(-)

diff --git a/drivers/soc/xilinx/zynqmp_pm_domains.c b/drivers/soc/xilinx/zynqmp_pm_domains.c
index 81e8e10f1092..27c46c68e5cc 100644
--- a/drivers/soc/xilinx/zynqmp_pm_domains.c
+++ b/drivers/soc/xilinx/zynqmp_pm_domains.c
@@ -80,12 +80,15 @@ static int zynqmp_gpd_power_on(struct generic_pm_domain *domain)
 					ZYNQMP_PM_MAX_QOS,
 					ZYNQMP_PM_REQUEST_ACK_BLOCKING);
 	if (ret) {
-		pr_err("%s() %s set requirement for node %d failed: %d\n",
-		       __func__, domain->name, pd->node_id, ret);
+		dev_err(&domain->dev,
+			"failed to set requirement to 0x%x for PM node id %d: %d\n",
+			ZYNQMP_PM_CAPABILITY_ACCESS, pd->node_id, ret);
 		return ret;
 	}
 
-	pr_debug("%s() Powered on %s domain\n", __func__, domain->name);
+	dev_dbg(&domain->dev, "set requirement to 0x%x for PM node id %d\n",
+		ZYNQMP_PM_CAPABILITY_ACCESS, pd->node_id);
+
 	return 0;
 }
 
@@ -110,8 +113,8 @@ static int zynqmp_gpd_power_off(struct generic_pm_domain *domain)
 
 	/* If domain is already released there is nothing to be done */
 	if (!(pd->flags & ZYNQMP_PM_DOMAIN_REQUESTED)) {
-		pr_debug("%s() %s domain is already released\n",
-			 __func__, domain->name);
+		dev_dbg(&domain->dev, "PM node id %d is already released\n",
+			pd->node_id);
 		return 0;
 	}
 
@@ -128,17 +131,16 @@ static int zynqmp_gpd_power_off(struct generic_pm_domain *domain)
 
 	ret = zynqmp_pm_set_requirement(pd->node_id, capabilities, 0,
 					ZYNQMP_PM_REQUEST_ACK_NO);
-	/**
-	 * If powering down of any node inside this domain fails,
-	 * report and return the error
-	 */
 	if (ret) {
-		pr_err("%s() %s set requirement for node %d failed: %d\n",
-		       __func__, domain->name, pd->node_id, ret);
+		dev_err(&domain->dev,
+			"failed to set requirement to 0x%x for PM node id %d: %d\n",
+			capabilities, pd->node_id, ret);
 		return ret;
 	}
 
-	pr_debug("%s() Powered off %s domain\n", __func__, domain->name);
+	dev_dbg(&domain->dev, "set requirement to 0x%x for PM node id %d\n",
+		capabilities, pd->node_id);
+
 	return 0;
 }
 
@@ -169,17 +171,17 @@ static int zynqmp_gpd_attach_dev(struct generic_pm_domain *domain,
 
 	ret = zynqmp_pm_request_node(pd->node_id, 0, 0,
 				     ZYNQMP_PM_REQUEST_ACK_BLOCKING);
-	/* If requesting a node fails print and return the error */
 	if (ret) {
-		pr_err("%s() %s request failed for node %d: %d\n",
-		       __func__, domain->name, pd->node_id, ret);
+		dev_err(&domain->dev, "%s request failed for node %d: %d\n",
+			domain->name, pd->node_id, ret);
 		return ret;
 	}
 
 	pd->flags |= ZYNQMP_PM_DOMAIN_REQUESTED;
 
-	pr_debug("%s() %s attached to %s domain\n", __func__,
-		 dev_name(dev), domain->name);
+	dev_dbg(&domain->dev, "%s requested PM node id %d\n",
+		dev_name(dev), pd->node_id);
+
 	return 0;
 }
 
@@ -201,17 +203,16 @@ static void zynqmp_gpd_detach_dev(struct generic_pm_domain *domain,
 		return;
 
 	ret = zynqmp_pm_release_node(pd->node_id);
-	/* If releasing a node fails print the error and return */
 	if (ret) {
-		pr_err("%s() %s release failed for node %d: %d\n",
-		       __func__, domain->name, pd->node_id, ret);
+		dev_err(&domain->dev, "failed to release PM node id %d: %d\n",
+			pd->node_id, ret);
 		return;
 	}
 
 	pd->flags &= ~ZYNQMP_PM_DOMAIN_REQUESTED;
 
-	pr_debug("%s() %s detached from %s domain\n", __func__,
-		 dev_name(dev), domain->name);
+	dev_dbg(&domain->dev, "%s released PM node id %d\n",
+		dev_name(dev), pd->node_id);
 }
 
 static struct generic_pm_domain *zynqmp_gpd_xlate
-- 
2.30.2


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

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

* [PATCH v2 3/4] soc: xilinx: use a properly named field instead of flags
  2021-08-25 15:03 [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Michael Tretter
  2021-08-25 15:03 ` [PATCH v2 1/4] soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver Michael Tretter
  2021-08-25 15:03 ` [PATCH v2 2/4] soc: xilinx: cleanup debug and error messages Michael Tretter
@ 2021-08-25 15:03 ` Michael Tretter
  2021-08-25 15:03 ` [PATCH v2 4/4] soc: xilinx: add a to_zynqmp_pm_domain macro Michael Tretter
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Tretter @ 2021-08-25 15:03 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: michal.simek, rajan.vaja, jolly.shah, m.tretter

Instead of defining a flags field and a single bit in this field to
signal that a PM node has been requested, use a boolean field with a
descriptive name.

No functional change, but using a proper name instead of flags makes the
code easier to read.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 drivers/soc/xilinx/zynqmp_pm_domains.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/soc/xilinx/zynqmp_pm_domains.c b/drivers/soc/xilinx/zynqmp_pm_domains.c
index 27c46c68e5cc..53b0041f9fe0 100644
--- a/drivers/soc/xilinx/zynqmp_pm_domains.c
+++ b/drivers/soc/xilinx/zynqmp_pm_domains.c
@@ -20,8 +20,6 @@
 #include <linux/firmware/xlnx-zynqmp.h>
 
 #define ZYNQMP_NUM_DOMAINS		(100)
-/* Flag stating if PM nodes mapped to the PM domain has been requested */
-#define ZYNQMP_PM_DOMAIN_REQUESTED	BIT(0)
 
 static int min_capability;
 
@@ -29,12 +27,12 @@ static int min_capability;
  * struct zynqmp_pm_domain - Wrapper around struct generic_pm_domain
  * @gpd:		Generic power domain
  * @node_id:		PM node ID corresponding to device inside PM domain
- * @flags:		ZynqMP PM domain flags
+ * @requested:		The PM node mapped to the PM domain has been requested
  */
 struct zynqmp_pm_domain {
 	struct generic_pm_domain gpd;
 	u32 node_id;
-	u8 flags;
+	bool requested;
 };
 
 /**
@@ -112,7 +110,7 @@ static int zynqmp_gpd_power_off(struct generic_pm_domain *domain)
 	pd = container_of(domain, struct zynqmp_pm_domain, gpd);
 
 	/* If domain is already released there is nothing to be done */
-	if (!(pd->flags & ZYNQMP_PM_DOMAIN_REQUESTED)) {
+	if (!pd->requested) {
 		dev_dbg(&domain->dev, "PM node id %d is already released\n",
 			pd->node_id);
 		return 0;
@@ -177,7 +175,7 @@ static int zynqmp_gpd_attach_dev(struct generic_pm_domain *domain,
 		return ret;
 	}
 
-	pd->flags |= ZYNQMP_PM_DOMAIN_REQUESTED;
+	pd->requested = true;
 
 	dev_dbg(&domain->dev, "%s requested PM node id %d\n",
 		dev_name(dev), pd->node_id);
@@ -209,7 +207,7 @@ static void zynqmp_gpd_detach_dev(struct generic_pm_domain *domain,
 		return;
 	}
 
-	pd->flags &= ~ZYNQMP_PM_DOMAIN_REQUESTED;
+	pd->requested = false;
 
 	dev_dbg(&domain->dev, "%s released PM node id %d\n",
 		dev_name(dev), pd->node_id);
-- 
2.30.2


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

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

* [PATCH v2 4/4] soc: xilinx: add a to_zynqmp_pm_domain macro
  2021-08-25 15:03 [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Michael Tretter
                   ` (2 preceding siblings ...)
  2021-08-25 15:03 ` [PATCH v2 3/4] soc: xilinx: use a properly named field instead of flags Michael Tretter
@ 2021-08-25 15:03 ` Michael Tretter
  2021-08-27  8:00 ` [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Michal Simek
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Tretter @ 2021-08-25 15:03 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: michal.simek, rajan.vaja, jolly.shah, m.tretter

Replace container_of for converting a generic_pm_domain to a
zynqmp_pm_domain with a macro definition to simplify the code.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 drivers/soc/xilinx/zynqmp_pm_domains.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/soc/xilinx/zynqmp_pm_domains.c b/drivers/soc/xilinx/zynqmp_pm_domains.c
index 53b0041f9fe0..fcce2433bd6d 100644
--- a/drivers/soc/xilinx/zynqmp_pm_domains.c
+++ b/drivers/soc/xilinx/zynqmp_pm_domains.c
@@ -35,6 +35,9 @@ struct zynqmp_pm_domain {
 	bool requested;
 };
 
+#define to_zynqmp_pm_domain(pm_domain) \
+	container_of(pm_domain, struct zynqmp_pm_domain, gpd)
+
 /**
  * zynqmp_gpd_is_active_wakeup_path() - Check if device is in wakeup source
  *					path
@@ -69,10 +72,9 @@ static int zynqmp_gpd_is_active_wakeup_path(struct device *dev, void *not_used)
  */
 static int zynqmp_gpd_power_on(struct generic_pm_domain *domain)
 {
+	struct zynqmp_pm_domain *pd = to_zynqmp_pm_domain(domain);
 	int ret;
-	struct zynqmp_pm_domain *pd;
 
-	pd = container_of(domain, struct zynqmp_pm_domain, gpd);
 	ret = zynqmp_pm_set_requirement(pd->node_id,
 					ZYNQMP_PM_CAPABILITY_ACCESS,
 					ZYNQMP_PM_MAX_QOS,
@@ -101,14 +103,12 @@ static int zynqmp_gpd_power_on(struct generic_pm_domain *domain)
  */
 static int zynqmp_gpd_power_off(struct generic_pm_domain *domain)
 {
+	struct zynqmp_pm_domain *pd = to_zynqmp_pm_domain(domain);
 	int ret;
 	struct pm_domain_data *pdd, *tmp;
-	struct zynqmp_pm_domain *pd;
 	u32 capabilities = min_capability;
 	bool may_wakeup;
 
-	pd = container_of(domain, struct zynqmp_pm_domain, gpd);
-
 	/* If domain is already released there is nothing to be done */
 	if (!pd->requested) {
 		dev_dbg(&domain->dev, "PM node id %d is already released\n",
@@ -152,11 +152,9 @@ static int zynqmp_gpd_power_off(struct generic_pm_domain *domain)
 static int zynqmp_gpd_attach_dev(struct generic_pm_domain *domain,
 				 struct device *dev)
 {
+	struct zynqmp_pm_domain *pd = to_zynqmp_pm_domain(domain);
 	struct device_link *link;
 	int ret;
-	struct zynqmp_pm_domain *pd;
-
-	pd = container_of(domain, struct zynqmp_pm_domain, gpd);
 
 	link = device_link_add(dev, &domain->dev, DL_FLAG_SYNC_STATE_ONLY);
 	if (!link)
@@ -191,10 +189,8 @@ static int zynqmp_gpd_attach_dev(struct generic_pm_domain *domain,
 static void zynqmp_gpd_detach_dev(struct generic_pm_domain *domain,
 				  struct device *dev)
 {
+	struct zynqmp_pm_domain *pd = to_zynqmp_pm_domain(domain);
 	int ret;
-	struct zynqmp_pm_domain *pd;
-
-	pd = container_of(domain, struct zynqmp_pm_domain, gpd);
 
 	/* If this is not the last device to detach there is nothing to do */
 	if (domain->device_count)
@@ -220,7 +216,7 @@ static struct generic_pm_domain *zynqmp_gpd_xlate
 	unsigned int i, idx = genpdspec->args[0];
 	struct zynqmp_pm_domain *pd;
 
-	pd = container_of(genpd_data->domains[0], struct zynqmp_pm_domain, gpd);
+	pd = to_zynqmp_pm_domain(genpd_data->domains[0]);
 
 	if (genpdspec->args_count != 1)
 		return ERR_PTR(-EINVAL);
-- 
2.30.2


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

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

* Re: [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE
  2021-08-25 15:03 [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Michael Tretter
                   ` (3 preceding siblings ...)
  2021-08-25 15:03 ` [PATCH v2 4/4] soc: xilinx: add a to_zynqmp_pm_domain macro Michael Tretter
@ 2021-08-27  8:00 ` Michal Simek
  2021-10-01  9:07   ` Michael Tretter
  2021-09-02  6:55 ` Rajan Vaja
  2021-10-18 13:09 ` Michal Simek
  6 siblings, 1 reply; 10+ messages in thread
From: Michal Simek @ 2021-08-27  8:00 UTC (permalink / raw)
  To: Michael Tretter, linux-arm-kernel; +Cc: michal.simek, rajan.vaja, jolly.shah

Hi,

On 8/25/21 5:03 PM, Michael Tretter wrote:
> Hi,
> 
> This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0].
> 
> Patch 1 of this series fixes the ZynqMP PMU FW power management
> initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be
> called from the zynqmp_pm_domains driver, which handles power domains, instead
> of the zynmp_power driver, which is responsible for suspend and shutdown. As a
> side effect, PM_INIT_FINALIZE powers down all devices that have not been
> requested, which might lead to misbehaving devices. Calling it from the
> sync_state callback ensures that all consumers have probed and are able to
> handle power management themselves.
> 
> Patches 2 to 4 are various cleanup patches to improve the readability and
> debugging experience of the zynqmp_pm_domains driver.
> 
> Michael
> 
> [0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-m.tretter@pengutronix.de/
> 
> Changelog:
> 
> v2:
> 
> - move PM_INIT_FINALIZE to sync_state callback
> 
> Michael Tretter (4):
>   soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
>   soc: xilinx: cleanup debug and error messages
>   soc: xilinx: use a properly named field instead of flags
>   soc: xilinx: add a to_zynqmp_pm_domain macro
> 
>  drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++-----------
>  drivers/soc/xilinx/zynqmp_power.c      |  1 -
>  2 files changed, 51 insertions(+), 41 deletions(-)
> 

Rajan: Please test and ack.

It looks good to me.
Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

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

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

* RE: [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE
  2021-08-25 15:03 [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Michael Tretter
                   ` (4 preceding siblings ...)
  2021-08-27  8:00 ` [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Michal Simek
@ 2021-09-02  6:55 ` Rajan Vaja
  2021-10-18 13:09 ` Michal Simek
  6 siblings, 0 replies; 10+ messages in thread
From: Rajan Vaja @ 2021-09-02  6:55 UTC (permalink / raw)
  To: Michael Tretter, linux-arm-kernel
  Cc: Michal Simek, Jolly Shah, Jyotheeswar Reddy Mutthareddyvari

Hi,

> -----Original Message-----
> From: Michael Tretter <m.tretter@pengutronix.de>
> Sent: 25 August 2021 08:33 PM
> To: linux-arm-kernel@lists.infradead.org
> Cc: Michal Simek <michals@xilinx.com>; Rajan Vaja <RAJANV@xilinx.com>; Jolly
> Shah <JOLLYS@xilinx.com>; m.tretter@pengutronix.de
> Subject: [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE
> 
> Hi,
> 
> This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0].
> 
> Patch 1 of this series fixes the ZynqMP PMU FW power management
> initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be
> called from the zynqmp_pm_domains driver, which handles power domains, instead
> of the zynmp_power driver, which is responsible for suspend and shutdown. As a
> side effect, PM_INIT_FINALIZE powers down all devices that have not been
> requested, which might lead to misbehaving devices. Calling it from the
> sync_state callback ensures that all consumers have probed and are able to
> handle power management themselves.
> 
> Patches 2 to 4 are various cleanup patches to improve the readability and
> debugging experience of the zynqmp_pm_domains driver.
> 
> Michael
> 
> [0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-
> m.tretter@pengutronix.de/
> 
> Changelog:
> 
> v2:
> 
> - move PM_INIT_FINALIZE to sync_state callback
> 
> Michael Tretter (4):
>   soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
>   soc: xilinx: cleanup debug and error messages
>   soc: xilinx: use a properly named field instead of flags
>   soc: xilinx: add a to_zynqmp_pm_domain macro
> 
>  drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++-----------
>  drivers/soc/xilinx/zynqmp_power.c      |  1 -
>  2 files changed, 51 insertions(+), 41 deletions(-)
> 
> --
> 2.30.2

Acked-by: Rajan Vaja <rajan.vaja@xilinx.com>

Thanks,
Rajan


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

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

* Re: [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE
  2021-08-27  8:00 ` [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Michal Simek
@ 2021-10-01  9:07   ` Michael Tretter
  2021-10-01  9:22     ` Rajan Vaja
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Tretter @ 2021-10-01  9:07 UTC (permalink / raw)
  To: Michal Simek; +Cc: linux-arm-kernel, rajan.vaja, jolly.shah

Hi,

On Fri, 27 Aug 2021 10:00:59 +0200, Michal Simek wrote:
> On 8/25/21 5:03 PM, Michael Tretter wrote:
> > This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0].
> > 
> > Patch 1 of this series fixes the ZynqMP PMU FW power management
> > initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be
> > called from the zynqmp_pm_domains driver, which handles power domains, instead
> > of the zynmp_power driver, which is responsible for suspend and shutdown. As a
> > side effect, PM_INIT_FINALIZE powers down all devices that have not been
> > requested, which might lead to misbehaving devices. Calling it from the
> > sync_state callback ensures that all consumers have probed and are able to
> > handle power management themselves.
> > 
> > Patches 2 to 4 are various cleanup patches to improve the readability and
> > debugging experience of the zynqmp_pm_domains driver.
> > 
> > Michael
> > 
> > [0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-m.tretter@pengutronix.de/
> > 
> > Changelog:
> > 
> > v2:
> > 
> > - move PM_INIT_FINALIZE to sync_state callback
> > 
> > Michael Tretter (4):
> >   soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
> >   soc: xilinx: cleanup debug and error messages
> >   soc: xilinx: use a properly named field instead of flags
> >   soc: xilinx: add a to_zynqmp_pm_domain macro
> > 
> >  drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++-----------
> >  drivers/soc/xilinx/zynqmp_power.c      |  1 -
> >  2 files changed, 51 insertions(+), 41 deletions(-)
> > 
> 
> Rajan: Please test and ack.
> 
> It looks good to me.
> Acked-by: Michal Simek <michal.simek@xilinx.com>

Gentle ping.

Michael

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

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

* RE: [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE
  2021-10-01  9:07   ` Michael Tretter
@ 2021-10-01  9:22     ` Rajan Vaja
  0 siblings, 0 replies; 10+ messages in thread
From: Rajan Vaja @ 2021-10-01  9:22 UTC (permalink / raw)
  To: Michael Tretter, Michal Simek; +Cc: linux-arm-kernel, Jolly Shah

Hi Michael,

> -----Original Message-----
> From: Michael Tretter <m.tretter@pengutronix.de>
> Sent: 01 October 2021 02:38 PM
> To: Michal Simek <michals@xilinx.com>
> Cc: linux-arm-kernel@lists.infradead.org; Rajan Vaja <RAJANV@xilinx.com>; Jolly
> Shah <JOLLYS@xilinx.com>
> Subject: Re: [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix
> PM_INIT_FINALIZE
> 
> Hi,
> 
> On Fri, 27 Aug 2021 10:00:59 +0200, Michal Simek wrote:
> > On 8/25/21 5:03 PM, Michael Tretter wrote:
> > > This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0].
> > >
> > > Patch 1 of this series fixes the ZynqMP PMU FW power management
> > > initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be
> > > called from the zynqmp_pm_domains driver, which handles power domains,
> instead
> > > of the zynmp_power driver, which is responsible for suspend and shutdown.
> As a
> > > side effect, PM_INIT_FINALIZE powers down all devices that have not been
> > > requested, which might lead to misbehaving devices. Calling it from the
> > > sync_state callback ensures that all consumers have probed and are able to
> > > handle power management themselves.
> > >
> > > Patches 2 to 4 are various cleanup patches to improve the readability and
> > > debugging experience of the zynqmp_pm_domains driver.
> > >
> > > Michael
> > >
> > > [0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-
> m.tretter@pengutronix.de/
> > >
> > > Changelog:
> > >
> > > v2:
> > >
> > > - move PM_INIT_FINALIZE to sync_state callback
> > >
> > > Michael Tretter (4):
> > >   soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
> > >   soc: xilinx: cleanup debug and error messages
> > >   soc: xilinx: use a properly named field instead of flags
> > >   soc: xilinx: add a to_zynqmp_pm_domain macro
> > >
> > >  drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++-----------
> > >  drivers/soc/xilinx/zynqmp_power.c      |  1 -
> > >  2 files changed, 51 insertions(+), 41 deletions(-)
> > >
> >
> > Rajan: Please test and ack.
> >
> > It looks good to me.
> > Acked-by: Michal Simek <michal.simek@xilinx.com>
> 
> Gentle ping.
[Rajan] I have already acked this one (https://www.spinics.net/lists/arm-kernel/msg918496.html). 

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

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

* Re: [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE
  2021-08-25 15:03 [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Michael Tretter
                   ` (5 preceding siblings ...)
  2021-09-02  6:55 ` Rajan Vaja
@ 2021-10-18 13:09 ` Michal Simek
  6 siblings, 0 replies; 10+ messages in thread
From: Michal Simek @ 2021-10-18 13:09 UTC (permalink / raw)
  To: Michael Tretter, linux-arm-kernel; +Cc: michal.simek, rajan.vaja, jolly.shah



On 8/25/21 17:03, Michael Tretter wrote:
> Hi,
> 
> This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0].
> 
> Patch 1 of this series fixes the ZynqMP PMU FW power management
> initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be
> called from the zynqmp_pm_domains driver, which handles power domains, instead
> of the zynmp_power driver, which is responsible for suspend and shutdown. As a
> side effect, PM_INIT_FINALIZE powers down all devices that have not been
> requested, which might lead to misbehaving devices. Calling it from the
> sync_state callback ensures that all consumers have probed and are able to
> handle power management themselves.
> 
> Patches 2 to 4 are various cleanup patches to improve the readability and
> debugging experience of the zynqmp_pm_domains driver.
> 
> Michael
> 
> [0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-m.tretter@pengutronix.de/
> 
> Changelog:
> 
> v2:
> 
> - move PM_INIT_FINALIZE to sync_state callback
> 
> Michael Tretter (4):
>    soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
>    soc: xilinx: cleanup debug and error messages
>    soc: xilinx: use a properly named field instead of flags
>    soc: xilinx: add a to_zynqmp_pm_domain macro
> 
>   drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++-----------
>   drivers/soc/xilinx/zynqmp_power.c      |  1 -
>   2 files changed, 51 insertions(+), 41 deletions(-)
> 

Applied.
M

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

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

end of thread, other threads:[~2021-10-18 13:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25 15:03 [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Michael Tretter
2021-08-25 15:03 ` [PATCH v2 1/4] soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver Michael Tretter
2021-08-25 15:03 ` [PATCH v2 2/4] soc: xilinx: cleanup debug and error messages Michael Tretter
2021-08-25 15:03 ` [PATCH v2 3/4] soc: xilinx: use a properly named field instead of flags Michael Tretter
2021-08-25 15:03 ` [PATCH v2 4/4] soc: xilinx: add a to_zynqmp_pm_domain macro Michael Tretter
2021-08-27  8:00 ` [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Michal Simek
2021-10-01  9:07   ` Michael Tretter
2021-10-01  9:22     ` Rajan Vaja
2021-09-02  6:55 ` Rajan Vaja
2021-10-18 13:09 ` Michal Simek

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.