arm: k3: Fix getting ti_sci handle
authorLokesh Vutla <lokeshvutla@ti.com>
Mon, 9 Sep 2019 07:17:37 +0000 (12:47 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 13 Sep 2019 15:56:30 +0000 (11:56 -0400)
API get_ti_sci_handle() is relying on the device-tree node name
to be "dmsc" for probing the ti_sci device. But with the introduction
of debug messages for dmsc, the node name changed to dmsc@44083000.
Because of this ti_sci is never probed cause a boot failure. Instead
of relying on device-tree node name, use the first available firmware
node for probing ti_sci.

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

index bab5ffd..3e36d90 100644 (file)
@@ -20,7 +20,7 @@ struct ti_sci_handle *get_ti_sci_handle(void)
        struct udevice *dev;
        int ret;
 
-       ret = uclass_get_device_by_name(UCLASS_FIRMWARE, "dmsc", &dev);
+       ret = uclass_get_device(UCLASS_FIRMWARE, 0, &dev);
        if (ret)
                panic("Failed to get SYSFW (%d)\n", ret);