From: Ye Li Date: Tue, 31 Jan 2023 08:42:12 +0000 (+0800) Subject: imx: imx8ulp: Fix MU device probe failure X-Git-Tag: baikal/mips/sdk6.2~4^2~3^2~175^2~16^2~93 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=1fcfef43ab67ad40d85831a94304aa88b3fc6024;p=uboot.git imx: imx8ulp: Fix MU device probe failure Since latest DTS has added multiple MU nodes, using compatible string to find the device node is not proper. It finds the first node with the compatible string matched even the node is disabled. Signed-off-by: Ye Li --- diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c index 5d95fb89a6..3498cf9c88 100644 --- a/arch/arm/mach-imx/imx8ulp/soc.c +++ b/arch/arm/mach-imx/imx8ulp/soc.c @@ -673,11 +673,9 @@ int arch_cpu_init(void) static int imx8ulp_check_mu(void *ctx, struct event *event) { struct udevice *devp; - int node, ret; - - node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "fsl,imx8ulp-mu"); + int ret; - ret = uclass_get_device_by_of_offset(UCLASS_MISC, node, &devp); + ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(imx8ulp_mu), &devp); if (ret) { printf("could not get S400 mu %d\n", ret); return ret;