]> git.baikalelectronics.ru Git - kernel.git/commit
clk: sunxi-ng: Implement factors offsets
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 8 Nov 2016 17:12:34 +0000 (18:12 +0100)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 23 Jan 2017 10:44:27 +0000 (11:44 +0100)
commitc84939941d388cf915ce0102de1a65c5d5334c78
tree92a3d993ca4999754bc512a66a3830577bde95d3
parent28306c0e7c86049580322d0a39df8154566b72db
clk: sunxi-ng: Implement factors offsets

The factors we've seen so far all had an offset of one. However, on the
earlier Allwinner SoCs, some factors could have no offset at all, meaning
that the value computed to reach the rate we want to use was the one we had
to program in the registers.

Implement an additional field for the factors that can have such an offset
(linears, not based on a power of two) to specify that offset.

This offset is not linked to the extremums that can be specified in those
structures too. The minimum and maximum are representing the range of
values we can use to try to compute the best rate. The offset comes later
on when we want to set the best value in the registers.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/clk/sunxi-ng/ccu_div.h
drivers/clk/sunxi-ng/ccu_mp.c
drivers/clk/sunxi-ng/ccu_mult.c
drivers/clk/sunxi-ng/ccu_mult.h
drivers/clk/sunxi-ng/ccu_nk.c
drivers/clk/sunxi-ng/ccu_nkm.c
drivers/clk/sunxi-ng/ccu_nkmp.c
drivers/clk/sunxi-ng/ccu_nm.c