]> git.baikalelectronics.ru Git - kernel.git/commit
clk: sunxi-ng: r40: Allow setting parent rate for external clock outputs
authorChen-Yu Tsai <wens@csie.org>
Wed, 18 Dec 2019 03:04:31 +0000 (11:04 +0800)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 18 Dec 2019 22:06:51 +0000 (23:06 +0100)
commite5999139701096b2fa4ed86d738aaeb2748f793d
tree883dfb8141d5befac507824815d8c05a61c39ff9
parentfbaef278dff753915f29798c0fc3e7d50a842374
clk: sunxi-ng: r40: Allow setting parent rate for external clock outputs

One of the uses of the external clock outputs is to provide a stable
32768 Hz clock signal to WiFi and Bluetooth chips. On the R40, the RTC
has an internal RC oscillator that is muxed with the external crystal.

Allow setting the parent rate for the external clock outputs so that
requests for 32768 Hz get passed to the RTC's clock driver to mux in
the external crystal if it isn't already muxed correctly.

Fixes: 81ee6781e39e ("clk: sunxi-ng: support R40 SoC")
Fixes: 1f2f0ea64263 ("clk: sunxi-ng: r40: Force LOSC parent to RTC LOSC output")
Cc: <stable@kernel.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/clk/sunxi-ng/ccu-sun8i-r40.c