clk: sunxi-ng: sun6i: Use sigma-delta modulation for audio PLL
authorChen-Yu Tsai <wens@csie.org>
Thu, 12 Oct 2017 08:37:04 +0000 (16:37 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Fri, 13 Oct 2017 07:27:34 +0000 (09:27 +0200)
commitee6501d69217a887cb496c42ff97ba43adff4ab1
tree8cc397672adf7e0adea9b5485fa03d9c32ed7523
parent042f7f8f9715096abce42b944d4a23b0e3c31521
clk: sunxi-ng: sun6i: Use sigma-delta modulation for audio PLL

The audio blocks require specific clock rates. Until now we were using
the closest clock rate possible with integer N-M factors. This resulted
in audio playback being slightly slower than it should be.

The vendor kernel gets around this (for newer SoCs) by using sigma-delta
modulation to generate a fractional-N factor. As the PLL hardware is
identical in most chips, we can back port the settings from the newer
SoC, in this case the H3, onto the A31.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/clk/sunxi-ng/ccu-sun6i-a31.c