Skip to content

Commit 04ef679

Browse files
Andre-ARMmripard
authored andcommitted
clk: sunxi-ng: h6: Fix clock divider range on some clocks
While comparing clocks between the H6 and H616, some of the M factor ranges were found to be wrong: the manual says they are only covering two bits [1:0], but our code had "5" in the number-of-bits field. By writing 0xff into that register in U-Boot and via FEL, it could be confirmed that bits [4:2] are indeed masked off, so the manual is right. Change to number of bits in the affected clock's description. Fixes: 524353e ("clk: sunxi-ng: add support for the Allwinner H6 CCU") Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20210118000912.28116-1-andre.przywara@arm.com
1 parent eec9d9b commit 04ef679

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static const char * const psi_ahb1_ahb2_parents[] = { "osc24M", "osc32k",
237237
static SUNXI_CCU_MP_WITH_MUX(psi_ahb1_ahb2_clk, "psi-ahb1-ahb2",
238238
psi_ahb1_ahb2_parents,
239239
0x510,
240-
0, 5, /* M */
240+
0, 2, /* M */
241241
8, 2, /* P */
242242
24, 2, /* mux */
243243
0);
@@ -246,19 +246,19 @@ static const char * const ahb3_apb1_apb2_parents[] = { "osc24M", "osc32k",
246246
"psi-ahb1-ahb2",
247247
"pll-periph0" };
248248
static SUNXI_CCU_MP_WITH_MUX(ahb3_clk, "ahb3", ahb3_apb1_apb2_parents, 0x51c,
249-
0, 5, /* M */
249+
0, 2, /* M */
250250
8, 2, /* P */
251251
24, 2, /* mux */
252252
0);
253253

254254
static SUNXI_CCU_MP_WITH_MUX(apb1_clk, "apb1", ahb3_apb1_apb2_parents, 0x520,
255-
0, 5, /* M */
255+
0, 2, /* M */
256256
8, 2, /* P */
257257
24, 2, /* mux */
258258
0);
259259

260260
static SUNXI_CCU_MP_WITH_MUX(apb2_clk, "apb2", ahb3_apb1_apb2_parents, 0x524,
261-
0, 5, /* M */
261+
0, 2, /* M */
262262
8, 2, /* P */
263263
24, 2, /* mux */
264264
0);

0 commit comments

Comments
 (0)