]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mmc: fsl_esdhc_imx: convert ofnode API to dev_read API
authorPeng Fan <peng.fan@nxp.com>
Thu, 4 Jun 2026 12:20:24 +0000 (20:20 +0800)
committerPeng Fan <peng.fan@nxp.com>
Tue, 9 Jun 2026 15:55:56 +0000 (23:55 +0800)
Replace ofnode_read_*() calls with their dev_read_*() equivalents in
fsl_esdhc_of_to_plat(). Remove the intermediate 'ofnode node' local
variable and the now-unnecessary <dm/ofnode.h> include.

No functional change.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/fsl_esdhc_imx.c

index 87125493c0dcd6ccae113c53cfe95114e547b7b9..e718a17f94c116156d5cdc49a00bf283a18f8d3e 100644 (file)
@@ -36,7 +36,6 @@
 #include <dm/pinctrl.h>
 #include <dt-structs.h>
 #include <mapmem.h>
-#include <dm/ofnode.h>
 #include <linux/iopoll.h>
 #include <linux/dma-mapping.h>
 
@@ -1393,7 +1392,6 @@ static int fsl_esdhc_of_to_plat(struct udevice *dev)
        struct udevice *vqmmc_dev;
        int ret;
 
-       ofnode node = dev_ofnode(dev);
        fdt_addr_t addr;
        unsigned int val;
 
@@ -1407,15 +1405,15 @@ static int fsl_esdhc_of_to_plat(struct udevice *dev)
        priv->dev = dev;
        priv->mode = -1;
 
-       val = ofnode_read_u32_default(node, "fsl,tuning-step", 1);
+       val = dev_read_u32_default(dev, "fsl,tuning-step", 1);
        priv->tuning_step = val;
-       val = ofnode_read_u32_default(node, "fsl,tuning-start-tap",
-                                     ESDHC_TUNING_START_TAP_DEFAULT);
+       val = dev_read_u32_default(dev, "fsl,tuning-start-tap",
+                                  ESDHC_TUNING_START_TAP_DEFAULT);
        priv->tuning_start_tap = val;
-       val = ofnode_read_u32_default(node, "fsl,strobe-dll-delay-target",
-                                     ESDHC_STROBE_DLL_CTRL_SLV_DLY_TARGET_DEFAULT);
+       val = dev_read_u32_default(dev, "fsl,strobe-dll-delay-target",
+                                  ESDHC_STROBE_DLL_CTRL_SLV_DLY_TARGET_DEFAULT);
        priv->strobe_dll_delay_target = val;
-       val = ofnode_read_u32_default(node, "fsl,signal-voltage-switch-extra-delay-ms", 0);
+       val = dev_read_u32_default(dev, "fsl,signal-voltage-switch-extra-delay-ms", 0);
        priv->signal_voltage_switch_extra_delay_ms = val;
 
        if (dev_read_bool(dev, "broken-cd"))