clk: sunxi-ng: h6: Fix clock divider range on some clocks
authorAndre Przywara <andre.przywara@arm.com>
Mon, 18 Jan 2021 00:09:12 +0000 (00:09 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:37:58 +0000 (11:37 +0100)
commitd99d58b8df08dbf932a5206661041dd00b540e4d
treead3d6fd02e720b071968cca346a09c72881c47fb
parent57ae53cc5a799dda43fd256c4c9f6846eee2fe6e
clk: sunxi-ng: h6: Fix clock divider range on some clocks

[ Upstream commit 04ef679591c76571a9e7d5ca48316cc86fa0ef12 ]

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: 524353ea480b ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/sunxi-ng/ccu-sun50i-h6.c