OSDN Git Service

clk: sunxi-ng: h6: fix bus clocks' divider position
authorIcenowy Zheng <icenowy@aosc.io>
Wed, 8 Aug 2018 17:19:52 +0000 (01:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 08:19:16 +0000 (09:19 +0100)
commit1a2502d376ac047bd4f70a51658993b22513ddfc
tree985c57e7e4da101253aec39bdb8d8003060a5de5
parent11ace0214bb0be5a307d9791d3029668b4c16e7b
clk: sunxi-ng: h6: fix bus clocks' divider position

commit 2852bfbf4f168fec27049ad9ed20941fc9e84b95 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/sunxi-ng/ccu-sun50i-h6.c