From 94b5e618c705ac575733db0bf1d7756922db25cf Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Tue, 9 Jun 2026 16:36:28 +0800 Subject: imx9: soc: Use livetree API for fdt access Use livetree API, otherwise it will fail to read properties from the device tree when OF_LIVE is enabled. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/soc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/imx9/soc.c b/arch/arm/mach-imx/imx9/soc.c index 0c731e76329..dcf2fff1aa6 100644 --- a/arch/arm/mach-imx/imx9/soc.c +++ b/arch/arm/mach-imx/imx9/soc.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -738,13 +739,16 @@ int arch_cpu_init(void) int imx9_probe_mu(void) { struct udevice *devp; - int node, ret; + ofnode node; + int ret; u32 res; struct ele_get_info_data info; - node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "fsl,imx93-mu-s4"); + node = ofnode_by_compatible(ofnode_null(), "fsl,imx93-mu-s4"); + if (!ofnode_valid(node)) + return -ENODEV; - ret = uclass_get_device_by_of_offset(UCLASS_MISC, node, &devp); + ret = uclass_get_device_by_ofnode(UCLASS_MISC, node, &devp); if (ret) return ret; -- cgit v1.3.1