mmc: fsl_esdhc_imx: convert ofnode API to dev_read API

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>
This commit is contained in:
Peng Fan
2026-06-04 20:20:24 +08:00
parent 185e4f27c8
commit cf3f7e03ff

View 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"))