mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 23:20:26 +09:00
clk: imx: gate2 add set rate
Add set rate for imx clk-gate2 Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
b6c56d90b8
commit
4b91ec076d
@ -60,7 +60,18 @@ static int clk_gate2_disable(struct clk *clk)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ulong clk_gate2_set_rate(struct clk *clk, ulong rate)
|
||||
{
|
||||
struct clk *parent = clk_get_parent(clk);
|
||||
|
||||
if (parent)
|
||||
return clk_set_rate(parent, rate);
|
||||
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static const struct clk_ops clk_gate2_ops = {
|
||||
.set_rate = clk_gate2_set_rate,
|
||||
.enable = clk_gate2_enable,
|
||||
.disable = clk_gate2_disable,
|
||||
.get_rate = clk_generic_get_rate,
|
||||
|
Loading…
Reference in New Issue
Block a user