Use the driver name to get ti_sci handle rather than relying
on just the FIRMWARE uclass.

Signed-off-by: Lokesh Vutla <[email protected]>
---
 arch/arm/mach-k3/common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 7339d7398d..32712e5883 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -36,7 +36,8 @@ struct ti_sci_handle *get_ti_sci_handle(void)
        struct udevice *dev;
        int ret;
 
-       ret = uclass_get_device(UCLASS_FIRMWARE, 0, &dev);
+       ret = uclass_get_device_by_driver(UCLASS_FIRMWARE,
+                                         DM_GET_DRIVER(ti_sci), &dev);
        if (ret)
                panic("Failed to get SYSFW (%d)\n", ret);
 
-- 
2.23.0

_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to