CONFIG_IS_ENABLED macro is covering CONFIG_POWER_DOMAIN or
CONFIG_SPL_POWER_DOMAIN Kconfig symbols based on build target which
simplify logic around binding power domain driver.

Signed-off-by: Michal Simek <michal.si...@amd.com>
---

 drivers/firmware/firmware-zynqmp.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/firmware/firmware-zynqmp.c 
b/drivers/firmware/firmware-zynqmp.c
index d18ae523b6bc..e07ec3929b29 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -500,11 +500,8 @@ static int zynqmp_firmware_bind(struct udevice *dev)
        if (!smc_call_handler)
                return -EINVAL;
 
-       if ((IS_ENABLED(CONFIG_XPL_BUILD) &&
-            IS_ENABLED(CONFIG_SPL_POWER_DOMAIN) &&
-            IS_ENABLED(CONFIG_ZYNQMP_POWER_DOMAIN)) ||
-            (!IS_ENABLED(CONFIG_XPL_BUILD) &&
-             IS_ENABLED(CONFIG_ZYNQMP_POWER_DOMAIN))) {
+       if (CONFIG_IS_ENABLED(POWER_DOMAIN) &&
+           IS_ENABLED(CONFIG_ZYNQMP_POWER_DOMAIN)) {
                ret = device_bind_driver_to_node(dev, "zynqmp_power_domain",
                                                 "zynqmp_power_domain",
                                                 dev_ofnode(dev), &child);
-- 
2.43.0

base-commit: 1a9414936322f0983fb4318505c6697b77e5d358

Reply via email to