mmc: fsl_esdhc: Convert to use livetree API for fdt access
Convert to using livetree API functions. Without this if livetree is enabled (OF_LIVE) the fsl_esdhc_imx driver will fail to read vendor-specific properties from the dt. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:

committed by
Fabio Estevam

parent
ad2aad701a
commit
d7f27a4fb3
@@ -1398,8 +1398,7 @@ static int fsl_esdhc_of_to_plat(struct udevice *dev)
|
|||||||
struct udevice *vqmmc_dev;
|
struct udevice *vqmmc_dev;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
const void *fdt = gd->fdt_blob;
|
ofnode node = dev_ofnode(dev);
|
||||||
int node = dev_of_offset(dev);
|
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
unsigned int val;
|
unsigned int val;
|
||||||
|
|
||||||
@@ -1413,15 +1412,15 @@ static int fsl_esdhc_of_to_plat(struct udevice *dev)
|
|||||||
priv->dev = dev;
|
priv->dev = dev;
|
||||||
priv->mode = -1;
|
priv->mode = -1;
|
||||||
|
|
||||||
val = fdtdec_get_int(fdt, node, "fsl,tuning-step", 1);
|
val = ofnode_read_u32_default(node, "fsl,tuning-step", 1);
|
||||||
priv->tuning_step = val;
|
priv->tuning_step = val;
|
||||||
val = fdtdec_get_int(fdt, node, "fsl,tuning-start-tap",
|
val = ofnode_read_u32_default(node, "fsl,tuning-start-tap",
|
||||||
ESDHC_TUNING_START_TAP_DEFAULT);
|
ESDHC_TUNING_START_TAP_DEFAULT);
|
||||||
priv->tuning_start_tap = val;
|
priv->tuning_start_tap = val;
|
||||||
val = fdtdec_get_int(fdt, node, "fsl,strobe-dll-delay-target",
|
val = ofnode_read_u32_default(node, "fsl,strobe-dll-delay-target",
|
||||||
ESDHC_STROBE_DLL_CTRL_SLV_DLY_TARGET_DEFAULT);
|
ESDHC_STROBE_DLL_CTRL_SLV_DLY_TARGET_DEFAULT);
|
||||||
priv->strobe_dll_delay_target = val;
|
priv->strobe_dll_delay_target = val;
|
||||||
val = fdtdec_get_int(fdt, node, "fsl,signal-voltage-switch-extra-delay-ms", 0);
|
val = ofnode_read_u32_default(node, "fsl,signal-voltage-switch-extra-delay-ms", 0);
|
||||||
priv->signal_voltage_switch_extra_delay_ms = val;
|
priv->signal_voltage_switch_extra_delay_ms = val;
|
||||||
|
|
||||||
if (dev_read_bool(dev, "broken-cd"))
|
if (dev_read_bool(dev, "broken-cd"))
|
||||||
|
Reference in New Issue
Block a user