diff options
author | Ye Li <ye.li@nxp.com> | 2023-01-31 16:42:12 +0800 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2023-03-29 20:15:41 +0200 |
commit | 9d89dcfcb1e4daaac095d350f2e7a56fce87a4ab (patch) | |
tree | e20a47507f5aede8589ab3039ef7cf52a9a0fa51 | |
parent | 654483d251275d61eb5f93c18e320ad7d6bfcc5d (diff) |
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 <ye.li@nxp.com>
-rw-r--r-- | arch/arm/mach-imx/imx8ulp/soc.c | 6 |
1 files changed, 2 insertions, 4 deletions
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; |