File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -99,13 +99,14 @@ ingenic_pll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
99
99
od_enc = ctl >> pll_info -> od_shift ;
100
100
od_enc &= GENMASK (pll_info -> od_bits - 1 , 0 );
101
101
102
- ctl = readl (cgu -> base + pll_info -> bypass_reg );
102
+ if (!pll_info -> no_bypass_bit ) {
103
+ ctl = readl (cgu -> base + pll_info -> bypass_reg );
103
104
104
- bypass = !pll_info -> no_bypass_bit &&
105
- !!(ctl & BIT (pll_info -> bypass_bit ));
105
+ bypass = !!(ctl & BIT (pll_info -> bypass_bit ));
106
106
107
- if (bypass )
108
- return parent_rate ;
107
+ if (bypass )
108
+ return parent_rate ;
109
+ }
109
110
110
111
for (od = 0 ; od < pll_info -> od_max ; od ++ ) {
111
112
if (pll_info -> od_encoding [od ] == od_enc )
@@ -225,11 +226,13 @@ static int ingenic_pll_enable(struct clk_hw *hw)
225
226
u32 ctl ;
226
227
227
228
spin_lock_irqsave (& cgu -> lock , flags );
228
- ctl = readl (cgu -> base + pll_info -> bypass_reg );
229
+ if (!pll_info -> no_bypass_bit ) {
230
+ ctl = readl (cgu -> base + pll_info -> bypass_reg );
229
231
230
- ctl &= ~BIT (pll_info -> bypass_bit );
232
+ ctl &= ~BIT (pll_info -> bypass_bit );
231
233
232
- writel (ctl , cgu -> base + pll_info -> bypass_reg );
234
+ writel (ctl , cgu -> base + pll_info -> bypass_reg );
235
+ }
233
236
234
237
ctl = readl (cgu -> base + pll_info -> reg );
235
238
You can’t perform that action at this time.
0 commit comments