aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIcenowy Zheng <icenowy@aosc.io>2018-08-08 13:19:52 -0400
committerChen-Yu Tsai <wens@csie.org>2018-08-26 22:35:03 -0400
commit2852bfbf4f168fec27049ad9ed20941fc9e84b95 (patch)
treea8217b9fbafbb8abb7aa9d03a7027ed29191c192
parent5b394b2ddf0347bef56e50c69a58773c94343ff3 (diff)
clk: sunxi-ng: h6: fix bus clocks' divider position
The bus clocks (AHB/APB) on Allwinner H6 have their second divider start at bit 8, according to the user manual and the BSP code. However, currently the divider offset is incorrectly set to 16, thus the divider is not correctly read and the clock frequency is not correctly calculated. Fix this bit offset on all affected bus clocks in ccu-sun50i-h6. Cc: stable@vger.kernel.org # v4.17.y Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
-rw-r--r--drivers/clk/sunxi-ng/ccu-sun50i-h6.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c
index bdbfe78fe133..0f7a0ffd3f70 100644
--- a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c
@@ -224,7 +224,7 @@ static SUNXI_CCU_MP_WITH_MUX(psi_ahb1_ahb2_clk, "psi-ahb1-ahb2",
224 psi_ahb1_ahb2_parents, 224 psi_ahb1_ahb2_parents,
225 0x510, 225 0x510,
226 0, 5, /* M */ 226 0, 5, /* M */
227 16, 2, /* P */ 227 8, 2, /* P */
228 24, 2, /* mux */ 228 24, 2, /* mux */
229 0); 229 0);
230 230
@@ -233,19 +233,19 @@ static const char * const ahb3_apb1_apb2_parents[] = { "osc24M", "osc32k",
233 "pll-periph0" }; 233 "pll-periph0" };
234static SUNXI_CCU_MP_WITH_MUX(ahb3_clk, "ahb3", ahb3_apb1_apb2_parents, 0x51c, 234static SUNXI_CCU_MP_WITH_MUX(ahb3_clk, "ahb3", ahb3_apb1_apb2_parents, 0x51c,
235 0, 5, /* M */ 235 0, 5, /* M */
236 16, 2, /* P */ 236 8, 2, /* P */
237 24, 2, /* mux */ 237 24, 2, /* mux */
238 0); 238 0);
239 239
240static SUNXI_CCU_MP_WITH_MUX(apb1_clk, "apb1", ahb3_apb1_apb2_parents, 0x520, 240static SUNXI_CCU_MP_WITH_MUX(apb1_clk, "apb1", ahb3_apb1_apb2_parents, 0x520,
241 0, 5, /* M */ 241 0, 5, /* M */
242 16, 2, /* P */ 242 8, 2, /* P */
243 24, 2, /* mux */ 243 24, 2, /* mux */
244 0); 244 0);
245 245
246static SUNXI_CCU_MP_WITH_MUX(apb2_clk, "apb2", ahb3_apb1_apb2_parents, 0x524, 246static SUNXI_CCU_MP_WITH_MUX(apb2_clk, "apb2", ahb3_apb1_apb2_parents, 0x524,
247 0, 5, /* M */ 247 0, 5, /* M */
248 16, 2, /* P */ 248 8, 2, /* P */
249 24, 2, /* mux */ 249 24, 2, /* mux */
250 0); 250 0);
251 251