arm: k3: Use driver_name to get ti_sci handle
authorLokesh Vutla <lokeshvutla@ti.com>
Fri, 27 Sep 2019 08:02:15 +0000 (13:32 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 11 Oct 2019 17:32:20 +0000 (13:32 -0400)
Use the driver name to get ti_sci handle rather than relying
on just the FIRMWARE uclass.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
arch/arm/mach-k3/common.c

index 97aa15d6a68e5955b7696b43bc445739cfc0cad0..f8274b39d6bc6cafcd5d244ef73d4f1760fec6a3 100644 (file)
@@ -22,7 +22,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);