]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
commit52ca71cdae974fb0715792e10a463760c4e30500
treeefbdc09b1b2dc4c9ae7500d275bb851b68fdc29e
parent23e665ff05155aae78934459d0ec9fc568462162
clk: sunxi-ng: r40: Allow setting parent rate for external clock outputs

BugLink: https://bugs.launchpad.net/bugs/1862429
commit c7b305267eb77fe47498676e9337324c9653494c upstream.

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: cd030a78f7aa ("clk: sunxi-ng: support R40 SoC")
Fixes: 01a7ea763fc4 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/clk/sunxi-ng/ccu-sun8i-r40.c