clk: sunxi-ng: sun4i: Use sigma-delta modulation for audio PLL
authorChen-Yu Tsai <wens@csie.org>
Thu, 12 Oct 2017 08:37:02 +0000 (16:37 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Fri, 13 Oct 2017 07:27:23 +0000 (09:27 +0200)
commitde344851919493033cdaa5736b2bfbcb05b50038
treef76d8db4d91acbe968285a6b47615ffbebbc645c
parenta5e3e2b2ef85efe213c19b4911042bc2937a1aa6
clk: sunxi-ng: sun4i: 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 A10 and A20.

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