diff options
author | Paul Cercueil <paul@crapouillou.net> | 2018-05-20 18:31:13 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2018-06-02 08:21:31 +0200 |
commit | 261a831f042c906412099e8a4f73d954cb5370b4 (patch) | |
tree | 4329e2479b1ce640f04f9d7355a2d84ee5fcbf3a /drivers/clk/ingenic/cgu.c | |
parent | clk: ingenic: Add support for clocks whose gate bit is inverted (diff) | |
download | linux-261a831f042c906412099e8a4f73d954cb5370b4.tar.xz linux-261a831f042c906412099e8a4f73d954cb5370b4.zip |
clk: ingenic: Support specifying "wait for clock stable" delay
Some clocks need a small delay after being ungated to run stable, as
using them too soon might result in hardware lockups.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/ingenic/cgu.c')
-rw-r--r-- | drivers/clk/ingenic/cgu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clk/ingenic/cgu.c b/drivers/clk/ingenic/cgu.c index 4b31145eb8aa..5ef7d9ba2195 100644 --- a/drivers/clk/ingenic/cgu.c +++ b/drivers/clk/ingenic/cgu.c @@ -512,6 +512,9 @@ static int ingenic_clk_enable(struct clk_hw *hw) spin_lock_irqsave(&cgu->lock, flags); ingenic_cgu_gate_set(cgu, &clk_info->gate, false); spin_unlock_irqrestore(&cgu->lock, flags); + + if (clk_info->gate.delay_us) + udelay(clk_info->gate.delay_us); } return 0; |