summaryrefslogtreecommitdiff
path: root/drivers/clk/clk-uclass.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-19 02:09:40 (GMT)
committerSimon Glass <sjg@chromium.org>2017-06-01 13:03:14 (GMT)
commita4e0ef50dae404939f14e46493a3d5c2111a9d4c (patch)
tree3753b70708d7dd21206534f99e3356574b5f6f10 /drivers/clk/clk-uclass.c
parenta1e4adee99355a348806fda1a3cc48af15ee79bc (diff)
downloadu-boot-fsl-qoriq-a4e0ef50dae404939f14e46493a3d5c2111a9d4c.tar.xz
clk: Modify xlate() method for livetree
Update the xlate() method to use ofnode_phandle_args instead of the fdtdec variant. This will allow drivers to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/clk/clk-uclass.c')
-rw-r--r--drivers/clk/clk-uclass.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 6fcfd69..f6194b6 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -38,7 +38,7 @@ int clk_get_by_index_platdata(struct udevice *dev, int index,
}
# else
static int clk_of_xlate_default(struct clk *clk,
- struct fdtdec_phandle_args *args)
+ struct ofnode_phandle_args *args)
{
debug("%s(clk=%p)\n", __func__, clk);
@@ -86,9 +86,10 @@ int clk_get_by_index(struct udevice *dev, int index, struct clk *clk)
ops = clk_dev_ops(dev_clk);
if (ops->of_xlate)
- ret = ops->of_xlate(clk, &args);
+ ret = ops->of_xlate(clk, (struct ofnode_phandle_args *)&args);
else
- ret = clk_of_xlate_default(clk, &args);
+ ret = clk_of_xlate_default(clk,
+ (struct ofnode_phandle_args *)&args);
if (ret) {
debug("of_xlate() failed: %d\n", ret);
return ret;