summaryrefslogtreecommitdiff
path: root/drivers/firmware/firmware-zynqmp.c
diff options
context:
space:
mode:
authorAshok Reddy Soma <ashok.reddy.soma@xilinx.com>2022-07-22 02:46:55 -0600
committerMichal Simek <michal.simek@amd.com>2022-07-26 08:36:10 +0200
commit2e40ab1f215641c53d2c60baa347892d159cafc9 (patch)
treeca22ae78cdfef2b6b35bdb8f02b379abf70d6a95 /drivers/firmware/firmware-zynqmp.c
parentc9f12ed9bcb973297a33f50e1fa28506118bcb91 (diff)
downloadu-boot-2e40ab1f215641c53d2c60baa347892d159cafc9.tar.gz
u-boot-2e40ab1f215641c53d2c60baa347892d159cafc9.tar.bz2
u-boot-2e40ab1f215641c53d2c60baa347892d159cafc9.zip
firmware: zynqmp: Load config overlay for core0 to pmufw
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@xilinx.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20220722084658.30995-3-ashok.reddy.soma@xilinx.com
Diffstat (limited to 'drivers/firmware/firmware-zynqmp.c')
-rw-r--r--drivers/firmware/firmware-zynqmp.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
index 325e4ddea6..76ddc6b4f4 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -70,11 +70,20 @@ int zynqmp_pmufw_config_close(void)
int zynqmp_pmufw_node(u32 id)
{
+ static bool skip_config;
+ int ret;
+
+ if (skip_config)
+ return 0;
+
/* Record power domain id */
xpm_configobject[NODE_ID_LOCATION] = id;
- zynqmp_pmufw_load_config_object(xpm_configobject,
- sizeof(xpm_configobject));
+ ret = zynqmp_pmufw_load_config_object(xpm_configobject,
+ sizeof(xpm_configobject));
+
+ if (ret && id == NODE_APU_0)
+ skip_config = true;
return 0;
}
@@ -284,6 +293,9 @@ 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))
+ zynqmp_pmufw_node(NODE_APU_0);
+
return 0;
};