aboutsummaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorEugeniy Paltsev2020-05-07 20:18:41 +0300
committerAlexey Brodkin2020-05-13 18:09:26 +0300
commitc6988688eefe985e4aca78488c424b9e09263da1 (patch)
tree215872b8d389a1d8382b30d428a444860cf0c005 /drivers/clk
parentdebfe3844502d3a2d7a10c6bb21b5f43a3f1d249 (diff)
CLK: ARC: HSDK: make set_clock optional
We don't want to allow change some clocks, i.e. DDR clock. So allow to have set_clock to be unset in clock map. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/clk-hsdk-cgu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/clk/clk-hsdk-cgu.c b/drivers/clk/clk-hsdk-cgu.c
index 6aba4587a44..dd665b13587 100644
--- a/drivers/clk/clk-hsdk-cgu.c
+++ b/drivers/clk/clk-hsdk-cgu.c
@@ -662,7 +662,10 @@ static ulong hsdk_cgu_set_rate(struct clk *sclk, ulong rate)
if (hsdk_prepare_clock_tree_branch(sclk))
return -EINVAL;
- return clk->map[sclk->id].set_rate(sclk, rate);
+ if (clk->map[sclk->id].set_rate)
+ return clk->map[sclk->id].set_rate(sclk, rate);
+
+ return -ENOTSUPP;
}
static int hsdk_cgu_disable(struct clk *sclk)