Commit 03aea91b authored by Rajan Vaja's avatar Rajan Vaja Committed by Stephen Boyd

clk: zynqmp: Handle divider specific read only flag

Add support for divider specific read only CCF flag
(CLK_DIVIDER_READ_ONLY).
Signed-off-by: default avatarRajan Vaja <rajan.vaja@xilinx.com>
Link: https://lore.kernel.org/r/20210628070122.26217-5-rajan.vaja@xilinx.comSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 54530ed1
......@@ -256,6 +256,11 @@ static const struct clk_ops zynqmp_clk_divider_ops = {
.set_rate = zynqmp_clk_divider_set_rate,
};
static const struct clk_ops zynqmp_clk_divider_ro_ops = {
.recalc_rate = zynqmp_clk_divider_recalc_rate,
.round_rate = zynqmp_clk_divider_round_rate,
};
/**
* zynqmp_clk_get_max_divisor() - Get maximum supported divisor from firmware.
* @clk_id: Id of clock
......@@ -334,7 +339,10 @@ struct clk_hw *zynqmp_clk_register_divider(const char *name,
return ERR_PTR(-ENOMEM);
init.name = name;
init.ops = &zynqmp_clk_divider_ops;
if (nodes->type_flag & CLK_DIVIDER_READ_ONLY)
init.ops = &zynqmp_clk_divider_ro_ops;
else
init.ops = &zynqmp_clk_divider_ops;
init.flags = zynqmp_clk_map_common_ccf_flags(nodes->flag);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment