diff mbox series

[1/4] soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver

Message ID 20210317160410.2097178-2-m.tretter@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE | expand

Commit Message

Michael Tretter March 17, 2021, 4:04 p.m. UTC
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.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 drivers/soc/xilinx/zynqmp_pm_domains.c | 2 ++
 drivers/soc/xilinx/zynqmp_power.c      | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/soc/xilinx/zynqmp_pm_domains.c b/drivers/soc/xilinx/zynqmp_pm_domains.c
index 226d343f0a6a..841773f2ef8d 100644
--- a/drivers/soc/xilinx/zynqmp_pm_domains.c
+++ b/drivers/soc/xilinx/zynqmp_pm_domains.c
@@ -289,6 +289,8 @@  static int zynqmp_gpd_probe(struct platform_device *pdev)
 	zynqmp_pd_data->num_domains = ZYNQMP_NUM_DOMAINS;
 	of_genpd_add_provider_onecell(dev->parent->of_node, zynqmp_pd_data);
 
+	zynqmp_pm_init_finalize();
+
 	return 0;
 }
 
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 */