[U-Boot] [PATCH v1 1/7] clk: clk-uclass: Assign clk->dev before call .of_xlate
Wenyou Yang
wenyou.yang at atmel.com
Tue Sep 13 03:54:43 CEST 2016
In order to make clk->dev available in ops->of_xlate() to get the
clock ID from the 'reg' property of the clock node, assign the
clk->dev before calling ops->of_xlate().
Signed-off-by: Wenyou Yang <wenyou.yang at atmel.com>
---
drivers/clk/clk-uclass.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 4d78e3f..4a3248b 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -80,6 +80,9 @@ int clk_get_by_index(struct udevice *dev, int index, struct clk *clk)
__func__, ret);
return ret;
}
+
+ clk->dev = dev_clk;
+
ops = clk_dev_ops(dev_clk);
if (ops->of_xlate)
--
2.7.4
More information about the U-Boot
mailing list