File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ 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
- if (! pll_info -> no_bypass_bit ) {
102
+ if (pll_info -> bypass_bit >= 0 ) {
103
103
ctl = readl (cgu -> base + pll_info -> bypass_reg );
104
104
105
105
bypass = !!(ctl & BIT (pll_info -> bypass_bit ));
@@ -226,7 +226,7 @@ static int ingenic_pll_enable(struct clk_hw *hw)
226
226
u32 ctl ;
227
227
228
228
spin_lock_irqsave (& cgu -> lock , flags );
229
- if (! pll_info -> no_bypass_bit ) {
229
+ if (pll_info -> bypass_bit >= 0 ) {
230
230
ctl = readl (cgu -> base + pll_info -> bypass_reg );
231
231
232
232
ctl &= ~BIT (pll_info -> bypass_bit );
Original file line number Diff line number Diff line change 39
39
* their encoded values in the PLL control register, or -1 for
40
40
* unsupported values
41
41
* @bypass_reg: the offset of the bypass control register within the CGU
42
- * @bypass_bit: the index of the bypass bit in the PLL control register
42
+ * @bypass_bit: the index of the bypass bit in the PLL control register, or
43
+ * -1 if there is no bypass bit
43
44
* @enable_bit: the index of the enable bit in the PLL control register
44
45
* @stable_bit: the index of the stable bit in the PLL control register
45
- * @no_bypass_bit: if set, the PLL has no bypass functionality
46
46
*/
47
47
struct ingenic_cgu_pll_info {
48
48
unsigned reg ;
@@ -52,10 +52,9 @@ struct ingenic_cgu_pll_info {
52
52
u8 n_shift , n_bits , n_offset ;
53
53
u8 od_shift , od_bits , od_max ;
54
54
unsigned bypass_reg ;
55
- u8 bypass_bit ;
55
+ s8 bypass_bit ;
56
56
u8 enable_bit ;
57
57
u8 stable_bit ;
58
- bool no_bypass_bit ;
59
58
};
60
59
61
60
/**
Original file line number Diff line number Diff line change @@ -139,8 +139,7 @@ static const struct ingenic_cgu_clk_info jz4770_cgu_clocks[] = {
139
139
.od_bits = 2 ,
140
140
.od_max = 8 ,
141
141
.od_encoding = pll_od_encoding ,
142
- .bypass_reg = CGU_REG_CPPCR1 ,
143
- .no_bypass_bit = true,
142
+ .bypass_bit = -1 ,
144
143
.enable_bit = 7 ,
145
144
.stable_bit = 6 ,
146
145
},
You can’t perform that action at this time.
0 commit comments