Skip to content

Commit ea1ba20

Browse files
committed
Merge tag 'sunxi-clk-for-6.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner
Pull Allwinner clk driver updates from Chen-Yu Tsai: - Add sigma-delta modulation settings for audio PLL on the H616 SoC, crucial for accurate audio reproduction - Constify |struct ccu_reset_map| throughout the sunxi-ng clk drivers - Fix the audio PLL divider preset on the D1 SoC - Switch to of_property_present() for checking DT property presence * tag 'sunxi-clk-for-6.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: Use of_property_present() for non-boolean properties clk: sunxi-ng: d1: Fix PLL_AUDIO0 preset clk: sunxi-ng: Constify struct ccu_reset_map clk: sunxi-ng: h616: Add sigma-delta modulation settings for audio PLL
2 parents 9852d85 + 1054861 commit ea1ba20

26 files changed

+64
-50
lines changed

drivers/clk/sunxi-ng/ccu-sun20i-d1-r.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static struct clk_hw_onecell_data sun20i_d1_r_hw_clks = {
9191
},
9292
};
9393

94-
static struct ccu_reset_map sun20i_d1_r_ccu_resets[] = {
94+
static const struct ccu_reset_map sun20i_d1_r_ccu_resets[] = {
9595
[RST_BUS_R_TIMER] = { 0x11c, BIT(16) },
9696
[RST_BUS_R_TWD] = { 0x12c, BIT(16) },
9797
[RST_BUS_R_PPU] = { 0x1ac, BIT(16) },

drivers/clk/sunxi-ng/ccu-sun20i-d1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ static struct clk_hw_onecell_data sun20i_d1_hw_clks = {
12321232
},
12331233
};
12341234

1235-
static struct ccu_reset_map sun20i_d1_ccu_resets[] = {
1235+
static const struct ccu_reset_map sun20i_d1_ccu_resets[] = {
12361236
[RST_MBUS] = { 0x540, BIT(30) },
12371237
[RST_BUS_DE] = { 0x60c, BIT(16) },
12381238
[RST_BUS_DI] = { 0x62c, BIT(16) },
@@ -1371,7 +1371,7 @@ static int sun20i_d1_ccu_probe(struct platform_device *pdev)
13711371

13721372
/* Enforce m1 = 0, m0 = 0 for PLL_AUDIO0 */
13731373
val = readl(reg + SUN20I_D1_PLL_AUDIO0_REG);
1374-
val &= ~BIT(1) | BIT(0);
1374+
val &= ~(BIT(1) | BIT(0));
13751375
writel(val, reg + SUN20I_D1_PLL_AUDIO0_REG);
13761376

13771377
/* Force fanout-27M factor N to 0. */

drivers/clk/sunxi-ng/ccu-sun4i-a10.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,7 @@ static struct clk_hw_onecell_data sun7i_a20_hw_clks = {
13821382
.num = CLK_NUMBER_SUN7I,
13831383
};
13841384

1385-
static struct ccu_reset_map sunxi_a10_a20_ccu_resets[] = {
1385+
static const struct ccu_reset_map sunxi_a10_a20_ccu_resets[] = {
13861386
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
13871387
[RST_USB_PHY1] = { 0x0cc, BIT(1) },
13881388
[RST_USB_PHY2] = { 0x0cc, BIT(2) },

drivers/clk/sunxi-ng/ccu-sun50i-a100-r.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static struct clk_hw_onecell_data sun50i_a100_r_hw_clks = {
166166
.num = CLK_NUMBER,
167167
};
168168

169-
static struct ccu_reset_map sun50i_a100_r_ccu_resets[] = {
169+
static const struct ccu_reset_map sun50i_a100_r_ccu_resets[] = {
170170
[RST_R_APB1_TIMER] = { 0x11c, BIT(16) },
171171
[RST_R_APB1_BUS_PWM] = { 0x13c, BIT(16) },
172172
[RST_R_APB1_PPU] = { 0x17c, BIT(16) },

drivers/clk/sunxi-ng/ccu-sun50i-a100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ static struct clk_hw_onecell_data sun50i_a100_hw_clks = {
10611061
.num = CLK_NUMBER,
10621062
};
10631063

1064-
static struct ccu_reset_map sun50i_a100_ccu_resets[] = {
1064+
static const struct ccu_reset_map sun50i_a100_ccu_resets[] = {
10651065
[RST_MBUS] = { 0x540, BIT(30) },
10661066

10671067
[RST_BUS_DE] = { 0x60c, BIT(16) },

drivers/clk/sunxi-ng/ccu-sun50i-a64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ static struct clk_hw_onecell_data sun50i_a64_hw_clks = {
858858
.num = CLK_NUMBER,
859859
};
860860

861-
static struct ccu_reset_map sun50i_a64_ccu_resets[] = {
861+
static const struct ccu_reset_map sun50i_a64_ccu_resets[] = {
862862
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
863863
[RST_USB_PHY1] = { 0x0cc, BIT(1) },
864864
[RST_USB_HSIC] = { 0x0cc, BIT(2) },

drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static struct clk_hw_onecell_data sun50i_h616_r_hw_clks = {
179179
.num = CLK_NUMBER,
180180
};
181181

182-
static struct ccu_reset_map sun50i_h6_r_ccu_resets[] = {
182+
static const struct ccu_reset_map sun50i_h6_r_ccu_resets[] = {
183183
[RST_R_APB1_TIMER] = { 0x11c, BIT(16) },
184184
[RST_R_APB1_TWD] = { 0x12c, BIT(16) },
185185
[RST_R_APB1_PWM] = { 0x13c, BIT(16) },
@@ -190,7 +190,7 @@ static struct ccu_reset_map sun50i_h6_r_ccu_resets[] = {
190190
[RST_R_APB1_W1] = { 0x1ec, BIT(16) },
191191
};
192192

193-
static struct ccu_reset_map sun50i_h616_r_ccu_resets[] = {
193+
static const struct ccu_reset_map sun50i_h616_r_ccu_resets[] = {
194194
[RST_R_APB1_TWD] = { 0x12c, BIT(16) },
195195
[RST_R_APB2_I2C] = { 0x19c, BIT(16) },
196196
[RST_R_APB2_RSB] = { 0x1bc, BIT(16) },

drivers/clk/sunxi-ng/ccu-sun50i-h6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ static struct clk_hw_onecell_data sun50i_h6_hw_clks = {
10761076
.num = CLK_NUMBER,
10771077
};
10781078

1079-
static struct ccu_reset_map sun50i_h6_ccu_resets[] = {
1079+
static const struct ccu_reset_map sun50i_h6_ccu_resets[] = {
10801080
[RST_MBUS] = { 0x540, BIT(30) },
10811081

10821082
[RST_BUS_DE] = { 0x60c, BIT(16) },

drivers/clk/sunxi-ng/ccu-sun50i-h616.c

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -216,19 +216,29 @@ static struct ccu_nkmp pll_de_clk = {
216216
};
217217

218218
/*
219-
* TODO: Determine SDM settings for the audio PLL. The manual suggests
220-
* PLL_FACTOR_N=16, PLL_POST_DIV_P=2, OUTPUT_DIV=2, pattern=0xe000c49b
221-
* for 24.576 MHz, and PLL_FACTOR_N=22, PLL_POST_DIV_P=3, OUTPUT_DIV=2,
222-
* pattern=0xe001288c for 22.5792 MHz.
223-
* This clashes with our fixed PLL_POST_DIV_P.
219+
* Sigma-delta modulation settings table obtained from the vendor SDK driver.
220+
* There are additional M0 and M1 divider bits not modelled here, so forced to
221+
* fixed values in the probe routine. Sigma-delta modulation allows providing a
222+
* fractional-N divider in the PLL, to help reaching those specific
223+
* frequencies with less error.
224224
*/
225+
static struct ccu_sdm_setting pll_audio_sdm_table[] = {
226+
{ .rate = 90316800, .pattern = 0xc001288d, .m = 3, .n = 22 },
227+
{ .rate = 98304000, .pattern = 0xc001eb85, .m = 5, .n = 40 },
228+
};
229+
225230
#define SUN50I_H616_PLL_AUDIO_REG 0x078
226231
static struct ccu_nm pll_audio_hs_clk = {
227232
.enable = BIT(31),
228233
.lock = BIT(28),
229234
.n = _SUNXI_CCU_MULT_MIN(8, 8, 12),
230-
.m = _SUNXI_CCU_DIV(1, 1), /* input divider */
235+
.m = _SUNXI_CCU_DIV(16, 6),
236+
.sdm = _SUNXI_CCU_SDM(pll_audio_sdm_table,
237+
BIT(24), 0x178, BIT(31)),
238+
.fixed_post_div = 2,
231239
.common = {
240+
.features = CCU_FEATURE_FIXED_POSTDIV |
241+
CCU_FEATURE_SIGMA_DELTA_MOD,
232242
.reg = 0x078,
233243
.hw.init = CLK_HW_INIT("pll-audio-hs", "osc24M",
234244
&ccu_nm_ops,
@@ -685,18 +695,20 @@ static const struct clk_hw *clk_parent_pll_audio[] = {
685695
};
686696

687697
/*
688-
* The divider of pll-audio is fixed to 24 for now, so 24576000 and 22579200
689-
* rates can be set exactly in conjunction with sigma-delta modulation.
698+
* The PLL_AUDIO_4X clock defaults to 24.5714 MHz according to the manual, with
699+
* a final divider of 1. The 2X and 1X clocks use 2 and 4 respectively. The 1x
700+
* clock is set to either 24576000 or 22579200 for 48Khz and 44.1Khz (and
701+
* multiples).
690702
*/
691703
static CLK_FIXED_FACTOR_HWS(pll_audio_1x_clk, "pll-audio-1x",
692704
clk_parent_pll_audio,
693-
96, 1, CLK_SET_RATE_PARENT);
705+
4, 1, CLK_SET_RATE_PARENT);
694706
static CLK_FIXED_FACTOR_HWS(pll_audio_2x_clk, "pll-audio-2x",
695707
clk_parent_pll_audio,
696-
48, 1, CLK_SET_RATE_PARENT);
708+
2, 1, CLK_SET_RATE_PARENT);
697709
static CLK_FIXED_FACTOR_HWS(pll_audio_4x_clk, "pll-audio-4x",
698710
clk_parent_pll_audio,
699-
24, 1, CLK_SET_RATE_PARENT);
711+
1, 1, CLK_SET_RATE_PARENT);
700712

701713
static const struct clk_hw *pll_periph0_parents[] = {
702714
&pll_periph0_clk.common.hw
@@ -990,7 +1002,7 @@ static struct clk_hw_onecell_data sun50i_h616_hw_clks = {
9901002
.num = CLK_NUMBER,
9911003
};
9921004

993-
static struct ccu_reset_map sun50i_h616_ccu_resets[] = {
1005+
static const struct ccu_reset_map sun50i_h616_ccu_resets[] = {
9941006
[RST_MBUS] = { 0x540, BIT(30) },
9951007

9961008
[RST_BUS_DE] = { 0x60c, BIT(16) },
@@ -1136,12 +1148,14 @@ static int sun50i_h616_ccu_probe(struct platform_device *pdev)
11361148
}
11371149

11381150
/*
1139-
* Force the post-divider of pll-audio to 12 and the output divider
1140-
* of it to 2, so 24576000 and 22579200 rates can be set exactly.
1151+
* Set the output-divider for the pll-audio clocks (M0) to 2 and the
1152+
* input divider (M1) to 1 as recommended by the manual when using
1153+
* SDM.
11411154
*/
11421155
val = readl(reg + SUN50I_H616_PLL_AUDIO_REG);
1143-
val &= ~(GENMASK(21, 16) | BIT(0));
1144-
writel(val | (11 << 16) | BIT(0), reg + SUN50I_H616_PLL_AUDIO_REG);
1156+
val &= ~BIT(1);
1157+
val |= BIT(0);
1158+
writel(val, reg + SUN50I_H616_PLL_AUDIO_REG);
11451159

11461160
/*
11471161
* First clock parent (osc32K) is unusable for CEC. But since there

drivers/clk/sunxi-ng/ccu-sun5i.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ static struct clk_hw_onecell_data sun5i_a10s_hw_clks = {
731731
.num = CLK_NUMBER,
732732
};
733733

734-
static struct ccu_reset_map sun5i_a10s_ccu_resets[] = {
734+
static const struct ccu_reset_map sun5i_a10s_ccu_resets[] = {
735735
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
736736
[RST_USB_PHY1] = { 0x0cc, BIT(1) },
737737

drivers/clk/sunxi-ng/ccu-sun6i-a31.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,7 @@ static struct clk_hw_onecell_data sun6i_a31_hw_clks = {
11461146
.num = CLK_NUMBER,
11471147
};
11481148

1149-
static struct ccu_reset_map sun6i_a31_ccu_resets[] = {
1149+
static const struct ccu_reset_map sun6i_a31_ccu_resets[] = {
11501150
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
11511151
[RST_USB_PHY1] = { 0x0cc, BIT(1) },
11521152
[RST_USB_PHY2] = { 0x0cc, BIT(2) },

drivers/clk/sunxi-ng/ccu-sun6i-rtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ int sun6i_rtc_ccu_probe(struct device *dev, void __iomem *reg)
356356
const char *fw_name;
357357

358358
/* ext-osc32k was the only input clock in the old binding. */
359-
fw_name = of_property_read_bool(dev->of_node, "clock-names")
359+
fw_name = of_property_present(dev->of_node, "clock-names")
360360
? "ext-osc32k" : NULL;
361361
ext_osc32k_clk = devm_clk_get_optional(dev, fw_name);
362362
if (IS_ERR(ext_osc32k_clk))

drivers/clk/sunxi-ng/ccu-sun8i-a23.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ static struct clk_hw_onecell_data sun8i_a23_hw_clks = {
668668
.num = CLK_NUMBER,
669669
};
670670

671-
static struct ccu_reset_map sun8i_a23_ccu_resets[] = {
671+
static const struct ccu_reset_map sun8i_a23_ccu_resets[] = {
672672
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
673673
[RST_USB_PHY1] = { 0x0cc, BIT(1) },
674674
[RST_USB_HSIC] = { 0x0cc, BIT(2) },

drivers/clk/sunxi-ng/ccu-sun8i-a33.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ static struct clk_hw_onecell_data sun8i_a33_hw_clks = {
712712
.num = CLK_NUMBER,
713713
};
714714

715-
static struct ccu_reset_map sun8i_a33_ccu_resets[] = {
715+
static const struct ccu_reset_map sun8i_a33_ccu_resets[] = {
716716
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
717717
[RST_USB_PHY1] = { 0x0cc, BIT(1) },
718718
[RST_USB_HSIC] = { 0x0cc, BIT(2) },

drivers/clk/sunxi-ng/ccu-sun8i-a83t.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ static struct clk_hw_onecell_data sun8i_a83t_hw_clks = {
797797
.num = CLK_NUMBER,
798798
};
799799

800-
static struct ccu_reset_map sun8i_a83t_ccu_resets[] = {
800+
static const struct ccu_reset_map sun8i_a83t_ccu_resets[] = {
801801
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
802802
[RST_USB_PHY1] = { 0x0cc, BIT(1) },
803803
[RST_USB_HSIC] = { 0x0cc, BIT(2) },

drivers/clk/sunxi-ng/ccu-sun8i-de2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static struct clk_hw_onecell_data sun50i_a64_de2_hw_clks = {
146146
.num = CLK_NUMBER_WITH_ROT,
147147
};
148148

149-
static struct ccu_reset_map sun8i_a83t_de2_resets[] = {
149+
static const struct ccu_reset_map sun8i_a83t_de2_resets[] = {
150150
[RST_MIXER0] = { 0x08, BIT(0) },
151151
/*
152152
* Mixer1 reset line is shared with wb, so only RST_WB is
@@ -156,7 +156,7 @@ static struct ccu_reset_map sun8i_a83t_de2_resets[] = {
156156
[RST_ROT] = { 0x08, BIT(3) },
157157
};
158158

159-
static struct ccu_reset_map sun8i_h3_de2_resets[] = {
159+
static const struct ccu_reset_map sun8i_h3_de2_resets[] = {
160160
[RST_MIXER0] = { 0x08, BIT(0) },
161161
/*
162162
* Mixer1 reset line is shared with wb, so only RST_WB is
@@ -166,14 +166,14 @@ static struct ccu_reset_map sun8i_h3_de2_resets[] = {
166166
[RST_WB] = { 0x08, BIT(2) },
167167
};
168168

169-
static struct ccu_reset_map sun50i_a64_de2_resets[] = {
169+
static const struct ccu_reset_map sun50i_a64_de2_resets[] = {
170170
[RST_MIXER0] = { 0x08, BIT(0) },
171171
[RST_MIXER1] = { 0x08, BIT(1) },
172172
[RST_WB] = { 0x08, BIT(2) },
173173
[RST_ROT] = { 0x08, BIT(3) },
174174
};
175175

176-
static struct ccu_reset_map sun50i_h5_de2_resets[] = {
176+
static const struct ccu_reset_map sun50i_h5_de2_resets[] = {
177177
[RST_MIXER0] = { 0x08, BIT(0) },
178178
[RST_MIXER1] = { 0x08, BIT(1) },
179179
[RST_WB] = { 0x08, BIT(2) },

drivers/clk/sunxi-ng/ccu-sun8i-h3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ static struct clk_hw_onecell_data sun50i_h5_hw_clks = {
876876
.num = CLK_NUMBER_H5,
877877
};
878878

879-
static struct ccu_reset_map sun8i_h3_ccu_resets[] = {
879+
static const struct ccu_reset_map sun8i_h3_ccu_resets[] = {
880880
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
881881
[RST_USB_PHY1] = { 0x0cc, BIT(1) },
882882
[RST_USB_PHY2] = { 0x0cc, BIT(2) },
@@ -939,7 +939,7 @@ static struct ccu_reset_map sun8i_h3_ccu_resets[] = {
939939
[RST_BUS_SCR0] = { 0x2d8, BIT(20) },
940940
};
941941

942-
static struct ccu_reset_map sun50i_h5_ccu_resets[] = {
942+
static const struct ccu_reset_map sun50i_h5_ccu_resets[] = {
943943
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
944944
[RST_USB_PHY1] = { 0x0cc, BIT(1) },
945945
[RST_USB_PHY2] = { 0x0cc, BIT(2) },

drivers/clk/sunxi-ng/ccu-sun8i-r.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,22 +178,22 @@ static struct clk_hw_onecell_data sun50i_a64_r_hw_clks = {
178178
.num = CLK_NUMBER,
179179
};
180180

181-
static struct ccu_reset_map sun8i_a83t_r_ccu_resets[] = {
181+
static const struct ccu_reset_map sun8i_a83t_r_ccu_resets[] = {
182182
[RST_APB0_IR] = { 0xb0, BIT(1) },
183183
[RST_APB0_TIMER] = { 0xb0, BIT(2) },
184184
[RST_APB0_RSB] = { 0xb0, BIT(3) },
185185
[RST_APB0_UART] = { 0xb0, BIT(4) },
186186
[RST_APB0_I2C] = { 0xb0, BIT(6) },
187187
};
188188

189-
static struct ccu_reset_map sun8i_h3_r_ccu_resets[] = {
189+
static const struct ccu_reset_map sun8i_h3_r_ccu_resets[] = {
190190
[RST_APB0_IR] = { 0xb0, BIT(1) },
191191
[RST_APB0_TIMER] = { 0xb0, BIT(2) },
192192
[RST_APB0_UART] = { 0xb0, BIT(4) },
193193
[RST_APB0_I2C] = { 0xb0, BIT(6) },
194194
};
195195

196-
static struct ccu_reset_map sun50i_a64_r_ccu_resets[] = {
196+
static const struct ccu_reset_map sun50i_a64_r_ccu_resets[] = {
197197
[RST_APB0_IR] = { 0xb0, BIT(1) },
198198
[RST_APB0_TIMER] = { 0xb0, BIT(2) },
199199
[RST_APB0_RSB] = { 0xb0, BIT(3) },

drivers/clk/sunxi-ng/ccu-sun8i-r40.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ static struct clk_hw_onecell_data sun8i_r40_hw_clks = {
11621162
.num = CLK_NUMBER,
11631163
};
11641164

1165-
static struct ccu_reset_map sun8i_r40_ccu_resets[] = {
1165+
static const struct ccu_reset_map sun8i_r40_ccu_resets[] = {
11661166
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
11671167
[RST_USB_PHY1] = { 0x0cc, BIT(1) },
11681168
[RST_USB_PHY2] = { 0x0cc, BIT(2) },

drivers/clk/sunxi-ng/ccu-sun8i-v3s.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ static struct clk_hw_onecell_data sun8i_v3_hw_clks = {
644644
.num = CLK_I2S0 + 1,
645645
};
646646

647-
static struct ccu_reset_map sun8i_v3s_ccu_resets[] = {
647+
static const struct ccu_reset_map sun8i_v3s_ccu_resets[] = {
648648
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
649649

650650
[RST_MBUS] = { 0x0fc, BIT(31) },
@@ -679,7 +679,7 @@ static struct ccu_reset_map sun8i_v3s_ccu_resets[] = {
679679
[RST_BUS_UART2] = { 0x2d8, BIT(18) },
680680
};
681681

682-
static struct ccu_reset_map sun8i_v3_ccu_resets[] = {
682+
static const struct ccu_reset_map sun8i_v3_ccu_resets[] = {
683683
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
684684

685685
[RST_MBUS] = { 0x0fc, BIT(31) },

drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static struct clk_hw_onecell_data sun9i_a80_de_hw_clks = {
177177
.num = CLK_NUMBER,
178178
};
179179

180-
static struct ccu_reset_map sun9i_a80_de_resets[] = {
180+
static const struct ccu_reset_map sun9i_a80_de_resets[] = {
181181
[RST_FE0] = { 0x0c, BIT(0) },
182182
[RST_FE1] = { 0x0c, BIT(1) },
183183
[RST_FE2] = { 0x0c, BIT(2) },

drivers/clk/sunxi-ng/ccu-sun9i-a80-usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static struct clk_hw_onecell_data sun9i_a80_usb_hw_clks = {
6868
.num = CLK_NUMBER,
6969
};
7070

71-
static struct ccu_reset_map sun9i_a80_usb_resets[] = {
71+
static const struct ccu_reset_map sun9i_a80_usb_resets[] = {
7272
[RST_USB0_HCI] = { 0x0, BIT(17) },
7373
[RST_USB1_HCI] = { 0x0, BIT(18) },
7474
[RST_USB2_HCI] = { 0x0, BIT(19) },

drivers/clk/sunxi-ng/ccu-sun9i-a80.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ static struct clk_hw_onecell_data sun9i_a80_hw_clks = {
11081108
.num = CLK_NUMBER,
11091109
};
11101110

1111-
static struct ccu_reset_map sun9i_a80_ccu_resets[] = {
1111+
static const struct ccu_reset_map sun9i_a80_ccu_resets[] = {
11121112
/* AHB0 reset controls */
11131113
[RST_BUS_FD] = { 0x5a0, BIT(0) },
11141114
[RST_BUS_VE] = { 0x5a0, BIT(1) },

drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ static struct clk_hw_onecell_data suniv_hw_clks = {
477477
.num = CLK_NUMBER,
478478
};
479479

480-
static struct ccu_reset_map suniv_ccu_resets[] = {
480+
static const struct ccu_reset_map suniv_ccu_resets[] = {
481481
[RST_USB_PHY0] = { 0x0cc, BIT(0) },
482482

483483
[RST_BUS_DMA] = { 0x2c0, BIT(6) },

drivers/clk/sunxi-ng/ccu_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct sunxi_ccu_desc {
5050

5151
struct clk_hw_onecell_data *hw_clks;
5252

53-
struct ccu_reset_map *resets;
53+
const struct ccu_reset_map *resets;
5454
unsigned long num_resets;
5555
};
5656

drivers/clk/sunxi-ng/ccu_reset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct ccu_reset_map {
1717

1818
struct ccu_reset {
1919
void __iomem *base;
20-
struct ccu_reset_map *reset_map;
20+
const struct ccu_reset_map *reset_map;
2121
spinlock_t *lock;
2222

2323
struct reset_controller_dev rcdev;

0 commit comments

Comments
 (0)