[PATCH 2/5] firmware: zynqmp: Load config overlay for core0 to pmufw
Ashok Reddy Soma
ashok.reddy.soma at xilinx.com
Fri Jul 15 11:39:21 CEST 2022
Try loading pmufw config overlay for core0, if it doesn't return any
error it means pmufw is accepting nodes for other IP's. Otherwise dont
try to load config object for any other IP, just return from
zynqmp_pmufw_node function.
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma at xilinx.com>
---
drivers/firmware/firmware-zynqmp.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
index 34d9b47003..288151533e 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -68,8 +68,13 @@ int zynqmp_pmufw_config_close(void)
return 0;
}
+static bool config_enabled;
+
int zynqmp_pmufw_node(u32 id)
{
+ if (!config_enabled)
+ return 0;
+
/* Record power domain id */
xpm_configobject[NODE_ID_LOCATION] = id;
@@ -267,6 +272,15 @@ static int zynqmp_power_probe(struct udevice *dev)
ret >> ZYNQMP_PM_VERSION_MAJOR_SHIFT,
ret & ZYNQMP_PM_VERSION_MINOR_MASK);
+ if (IS_ENABLED(CONFIG_ARCH_ZYNQMP)) {
+ xpm_configobject[NODE_ID_LOCATION] = NODE_APU_0;
+
+ ret = zynqmp_pmufw_load_config_object(xpm_configobject,
+ sizeof(xpm_configobject));
+ if (!ret)
+ config_enabled = true;
+ }
+
return 0;
};
--
2.17.1
More information about the U-Boot
mailing list