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>
This commit is contained in:
Simon Glass 2017-05-18 20:09:42 -06:00
parent aa9bb0944a
commit 8b92e1cd59

View File

@ -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;