提交 cf719012 编写于 作者: C Chen-Yu Tsai 提交者: Maxime Ripard

clk: sunxi-ng: mult: Support PLL lock detection

Some PLL clocks are N (multiplier) type clocks, or can be simplified
as such. An example of the former is the DDR1 PLL clock on the A33.
An example of the latter is the CPU PLL clock on the A80, in which
the P divider is only used for low frequencies that are of little
use. Both clocks support PLL lock detection.

The mult clock macro implies support for this, but that is not true.
The field is simply discarded. This patch adds proper support for it.
Signed-off-by: NChen-Yu Tsai <wens@csie.org>
Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
上级 cdb8b80b
...@@ -137,6 +137,8 @@ static int ccu_mult_set_rate(struct clk_hw *hw, unsigned long rate, ...@@ -137,6 +137,8 @@ static int ccu_mult_set_rate(struct clk_hw *hw, unsigned long rate,
spin_unlock_irqrestore(cm->common.lock, flags); spin_unlock_irqrestore(cm->common.lock, flags);
ccu_helper_wait_for_lock(&cm->common, cm->lock);
return 0; return 0;
} }
......
...@@ -33,6 +33,7 @@ struct ccu_mult_internal { ...@@ -33,6 +33,7 @@ struct ccu_mult_internal {
struct ccu_mult { struct ccu_mult {
u32 enable; u32 enable;
u32 lock;
struct ccu_frac_internal frac; struct ccu_frac_internal frac;
struct ccu_mult_internal mult; struct ccu_mult_internal mult;
...@@ -45,6 +46,7 @@ struct ccu_mult { ...@@ -45,6 +46,7 @@ struct ccu_mult {
_flags) \ _flags) \
struct ccu_mult _struct = { \ struct ccu_mult _struct = { \
.enable = _gate, \ .enable = _gate, \
.lock = _lock, \
.mult = _SUNXI_CCU_MULT(_mshift, _mwidth), \ .mult = _SUNXI_CCU_MULT(_mshift, _mwidth), \
.common = { \ .common = { \
.reg = _reg, \ .reg = _reg, \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册