From: Ulf Hansson Date: Tue, 1 Jul 2025 11:47:18 +0000 (+0200) Subject: firmware: xilinx: Use of_genpd_sync_state() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29ea33866d6d905acc45208fdf75da89e2b00000;p=thirdparty%2Flinux.git 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 Tested-by: Hiago De Franco # Colibri iMX8X Tested-by: Tomi Valkeinen # TI AM62A,Xilinx ZynqMP ZCU106 Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20250701114733.636510-17-ulf.hansson@linaro.org --- diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index 87ddbb7d11c27..02da3e48bc8f3 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -2101,9 +2102,13 @@ static void zynqmp_firmware_remove(struct platform_device *pdev) static void zynqmp_firmware_sync_state(struct device *dev) { - if (!of_device_is_compatible(dev->of_node, "xlnx,zynqmp-firmware")) + struct device_node *np = dev->of_node; + + if (!of_device_is_compatible(np, "xlnx,zynqmp-firmware")) return; + of_genpd_sync_state(np); + if (zynqmp_pm_init_finalize()) dev_warn(dev, "failed to release power management to firmware\n"); }