[PATCH 3/4] firmware: zynqmp: Do not report error if node is already configured

Michal Simek michal.simek at xilinx.com
Fri Jan 14 13:25:37 CET 2022


Power domain driver sends PM fragment to PMUFW. It is sent for every node
which is listed in DT. But some nodes could be already enabled but driver
is not capable to find it out. That's why it blinly sents request for every
listed IP. When PMUFW response by XST_PM_ALREADY_CONFIGURED error code
there is no need to show any error message because node is already enabled.
That's why cover this case with message when DEBUG is enabled.

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 drivers/firmware/firmware-zynqmp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
index d6dd5a394ee9..a80e73307982 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -21,6 +21,7 @@
 #define PMUFW_PAYLOAD_ARG_CNT	8
 
 #define XST_PM_NO_ACCESS	2002L
+#define XST_PM_ALREADY_CONFIGURED	2009L
 
 struct zynqmp_power {
 	struct mbox_chan tx_chan;
@@ -143,6 +144,11 @@ void zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size)
 		return;
 	}
 
+	if (err == XST_PM_ALREADY_CONFIGURED) {
+		debug("PMUFW Node is already configured\n");
+		return;
+	}
+
 	if (err)
 		printf("Cannot load PMUFW configuration object (%d)\n", err);
 
-- 
2.34.1



More information about the U-Boot mailing list