diff options
Diffstat (limited to 'drivers/mmc/msm_sdhci.c')
-rw-r--r-- | drivers/mmc/msm_sdhci.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index 1db683d01e..7a7e67f6f3 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -50,16 +50,16 @@ DECLARE_GLOBAL_DATA_PTR; static int msm_sdc_clk_init(struct udevice *dev) { - uint clk_rate = fdtdec_get_uint(gd->fdt_blob, dev->of_offset, - "clock-frequency", 400000); + int node = dev_of_offset(dev); + uint clk_rate = fdtdec_get_uint(gd->fdt_blob, node, "clock-frequency", + 400000); uint clkd[2]; /* clk_id and clk_no */ int clk_offset; struct udevice *clk_dev; struct clk clk; int ret; - ret = fdtdec_get_int_array(gd->fdt_blob, dev->of_offset, "clock", clkd, - 2); + ret = fdtdec_get_int_array(gd->fdt_blob, node, "clock", clkd, 2); if (ret) return ret; @@ -168,17 +168,14 @@ static int msm_ofdata_to_platdata(struct udevice *dev) struct udevice *parent = dev->parent; struct msm_sdhc *priv = dev_get_priv(dev); struct sdhci_host *host = &priv->host; + int node = dev_of_offset(dev); host->name = strdup(dev->name); host->ioaddr = (void *)dev_get_addr(dev); - host->bus_width = fdtdec_get_int(gd->fdt_blob, dev->of_offset, - "bus-width", 4); - host->index = fdtdec_get_uint(gd->fdt_blob, dev->of_offset, "index", 0); + host->bus_width = fdtdec_get_int(gd->fdt_blob, node, "bus-width", 4); + host->index = fdtdec_get_uint(gd->fdt_blob, node, "index", 0); priv->base = (void *)fdtdec_get_addr_size_auto_parent(gd->fdt_blob, - parent->of_offset, - dev->of_offset, - "reg", 1, NULL, - false); + dev_of_offset(parent), node, "reg", 1, NULL, false); if (priv->base == (void *)FDT_ADDR_T_NONE || host->ioaddr == (void *)FDT_ADDR_T_NONE) return -EINVAL; |