diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2020-01-09 11:35:08 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-01-16 09:39:45 -0500 |
commit | 6bf6d81c1112af50492215416e656efd43d5436f (patch) | |
tree | 7a77f22668a869ec9979c3044a4dcbad5c23701d /drivers/clk/clk_fixed_rate.c | |
parent | d646420e29da43ad2e23105ec72fb18ee911d0fd (diff) | |
download | u-boot-6bf6d81c1112af50492215416e656efd43d5436f.zip u-boot-6bf6d81c1112af50492215416e656efd43d5436f.tar.gz u-boot-6bf6d81c1112af50492215416e656efd43d5436f.tar.bz2 |
clk: fixed_rate: add dummy enable() function
This is used to avoid clk_enable() return -ENOSYS.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Diffstat (limited to 'drivers/clk/clk_fixed_rate.c')
-rw-r--r-- | drivers/clk/clk_fixed_rate.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c index f511267..2c20edd 100644 --- a/drivers/clk/clk_fixed_rate.c +++ b/drivers/clk/clk_fixed_rate.c @@ -13,8 +13,15 @@ static ulong clk_fixed_rate_get_rate(struct clk *clk) return to_clk_fixed_rate(clk->dev)->fixed_rate; } +/* avoid clk_enable() return -ENOSYS */ +static int dummy_enable(struct clk *clk) +{ + return 0; +} + const struct clk_ops clk_fixed_rate_ops = { .get_rate = clk_fixed_rate_get_rate, + .enable = dummy_enable, }; static int clk_fixed_rate_ofdata_to_platdata(struct udevice *dev) |