Skip to content

Commit 29ea338

Browse files
author
Ulf Hansson
committed
firmware: xilinx: Use of_genpd_sync_state()
To make sure genpd tries to power off unused PM domains, let's call of_genpd_sync_state() from our own ->sync_state() callback. Cc: Michal Simek <michal.simek@amd.com> Tested-by: Hiago De Franco <hiago.franco@toradex.com> # Colibri iMX8X Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> # TI AM62A,Xilinx ZynqMP ZCU106 Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/20250701114733.636510-17-ulf.hansson@linaro.org
1 parent 10086a4 commit 29ea338

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/firmware/xilinx/zynqmp.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <linux/of.h>
2121
#include <linux/of_platform.h>
2222
#include <linux/platform_device.h>
23+
#include <linux/pm_domain.h>
2324
#include <linux/slab.h>
2425
#include <linux/uaccess.h>
2526
#include <linux/hashtable.h>
@@ -2101,9 +2102,13 @@ static void zynqmp_firmware_remove(struct platform_device *pdev)
21012102

21022103
static void zynqmp_firmware_sync_state(struct device *dev)
21032104
{
2104-
if (!of_device_is_compatible(dev->of_node, "xlnx,zynqmp-firmware"))
2105+
struct device_node *np = dev->of_node;
2106+
2107+
if (!of_device_is_compatible(np, "xlnx,zynqmp-firmware"))
21052108
return;
21062109

2110+
of_genpd_sync_state(np);
2111+
21072112
if (zynqmp_pm_init_finalize())
21082113
dev_warn(dev, "failed to release power management to firmware\n");
21092114
}

0 commit comments

Comments
 (0)