diff options
author | Tom Rini <trini@konsulko.com> | 2017-02-08 16:24:44 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-02-08 16:24:44 -0500 |
commit | 21342d4aed6c77a4aa7a5b2579b3c23e21aea31a (patch) | |
tree | 279c781bdcbe697257ff86714fa0355bcd92fd19 /drivers/clk | |
parent | 7582ddce132390fba10822c5977cd1ab532bb1eb (diff) | |
parent | f11a0af713a714ee2efcd810dd81c6dfd59381aa (diff) |
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/at91/clk-generated.c | 5 | ||||
-rw-r--r-- | drivers/clk/at91/pmc.c | 5 | ||||
-rw-r--r-- | drivers/clk/clk-uclass.c | 4 | ||||
-rw-r--r-- | drivers/clk/clk_fixed_rate.c | 2 | ||||
-rw-r--r-- | drivers/clk/clk_pic32.c | 5 |
5 files changed, 11 insertions, 10 deletions
diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c index d36f64ffdf..ac27d3e675 100644 --- a/drivers/clk/at91/clk-generated.c +++ b/drivers/clk/at91/clk-generated.c @@ -154,9 +154,8 @@ static int generic_clk_ofdata_to_platdata(struct udevice *dev) u32 num_parents; num_parents = fdtdec_get_int_array_count(gd->fdt_blob, - dev_get_parent(dev)->of_offset, - "clocks", cells, - GENERATED_SOURCE_MAX); + dev_of_offset(dev_get_parent(dev)), "clocks", cells, + GENERATED_SOURCE_MAX); if (!num_parents) return -1; diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c index 76ba91af81..c73156a0df 100644 --- a/drivers/clk/at91/pmc.c +++ b/drivers/clk/at91/pmc.c @@ -47,7 +47,7 @@ int at91_pmc_core_probe(struct udevice *dev) int at91_clk_sub_device_bind(struct udevice *dev, const char *drv_name) { const void *fdt = gd->fdt_blob; - int offset = dev->of_offset; + int offset = dev_of_offset(dev); bool pre_reloc_only = !(gd->flags & GD_FLG_RELOC); const char *name; int ret; @@ -90,7 +90,8 @@ int at91_clk_of_xlate(struct clk *clk, struct fdtdec_phandle_args *args) return -EINVAL; } - periph = fdtdec_get_uint(gd->fdt_blob, clk->dev->of_offset, "reg", -1); + periph = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(clk->dev), "reg", + -1); if (periph < 0) return -EINVAL; diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 153ceba702..6fcfd6997c 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @@ -65,7 +65,7 @@ int clk_get_by_index(struct udevice *dev, int index, struct clk *clk) debug("%s(dev=%p, index=%d, clk=%p)\n", __func__, dev, index, clk); assert(clk); - ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, dev->of_offset, + ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, dev_of_offset(dev), "clocks", "#clock-cells", 0, index, &args); if (ret) { @@ -104,7 +104,7 @@ int clk_get_by_name(struct udevice *dev, const char *name, struct clk *clk) debug("%s(dev=%p, name=%s, clk=%p)\n", __func__, dev, name, clk); - index = fdt_stringlist_search(gd->fdt_blob, dev->of_offset, + index = fdt_stringlist_search(gd->fdt_blob, dev_of_offset(dev), "clock-names", name); if (index < 0) { debug("fdt_stringlist_search() failed: %d\n", index); diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c index 9c4d2b322f..3911bf61a0 100644 --- a/drivers/clk/clk_fixed_rate.c +++ b/drivers/clk/clk_fixed_rate.c @@ -32,7 +32,7 @@ static int clk_fixed_rate_ofdata_to_platdata(struct udevice *dev) { #if !CONFIG_IS_ENABLED(OF_PLATDATA) to_clk_fixed_rate(dev)->fixed_rate = - fdtdec_get_int(gd->fdt_blob, dev->of_offset, + fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "clock-frequency", 0); #endif diff --git a/drivers/clk/clk_pic32.c b/drivers/clk/clk_pic32.c index 70ec3543cf..f6eef314ec 100644 --- a/drivers/clk/clk_pic32.c +++ b/drivers/clk/clk_pic32.c @@ -330,7 +330,7 @@ static void pic32_clk_init(struct udevice *dev) for (i = REF1CLK; i <= REF5CLK; i++) { snprintf(propname, sizeof(propname), "microchip,refo%d-frequency", i - REF1CLK + 1); - rate = fdtdec_get_int(blob, dev->of_offset, propname, 0); + rate = fdtdec_get_int(blob, dev_of_offset(dev), propname, 0); if (rate) pic32_set_refclk(priv, i, pll_hz, rate, ROCLK_SRC_SPLL); } @@ -393,7 +393,8 @@ static int pic32_clk_probe(struct udevice *dev) fdt_addr_t addr; fdt_size_t size; - addr = fdtdec_get_addr_size(gd->fdt_blob, dev->of_offset, "reg", &size); + addr = fdtdec_get_addr_size(gd->fdt_blob, dev_of_offset(dev), "reg", + &size); if (addr == FDT_ADDR_T_NONE) return -EINVAL; |