summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk_fixed_rate.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-18 20:09:42 -0600
committerSimon Glass <sjg@chromium.org>2017-06-01 07:03:14 -0600
commit8b92e1cd597608ca1e2aa2756c76a3dff786062c (patch)
tree42c9aeba0ce98266b6d0184028b4ee8c2a3a00a9 /drivers/clk/clk_fixed_rate.c
parentaa9bb0944acecf5459971c4f0f195c59f1af1fe1 (diff)
downloadu-boot-8b92e1cd597608ca1e2aa2756c76a3dff786062c.tar.gz
u-boot-8b92e1cd597608ca1e2aa2756c76a3dff786062c.tar.xz
u-boot-8b92e1cd597608ca1e2aa2756c76a3dff786062c.zip
dm: clk: fixed: Update to support livetree
Update the fixed-rate clock driver to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/clk/clk_fixed_rate.c')
-rw-r--r--drivers/clk/clk_fixed_rate.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c
index 1cac4bbb85..63565b6ed8 100644
--- a/drivers/clk/clk_fixed_rate.c
+++ b/drivers/clk/clk_fixed_rate.c
@@ -31,9 +31,8 @@ const struct clk_ops clk_fixed_rate_ops = {
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(dev),
- "clock-frequency", 0);
+ to_clk_fixed_rate(dev)->fixed_rate = dev_read_u32_default(dev,
+ "clock-frequency", 0);
#endif
return 0;