]> git.baikalelectronics.ru Git - kernel.git/commit
clk: sunxi-ng: Convert early providers to platform drivers
authorSamuel Holland <samuel@sholland.org>
Fri, 19 Nov 2021 03:33:36 +0000 (21:33 -0600)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 23 Nov 2021 09:29:05 +0000 (10:29 +0100)
commited3f45ae46a70b1a8be6576b0cf05a9221858a12
tree664419f113c41d25cadbbed16f74e1bcc2bbebd3
parent502c834c5c1f991e150b381908d5eafd138460c6
clk: sunxi-ng: Convert early providers to platform drivers

The PRCM CCU drivers depend on clocks provided by other CCU drivers. For
example, the sun8i-r-ccu driver uses the "pll-periph" clock provided by
the SoC's main CCU.

However, sun8i-r-ccu is an early OF clock provider, and many of the
main CCUs (e.g. sun50i-a64-ccu) use platform drivers. This means that
the consumer clocks will be orphaned until the supplier driver is bound.
This can be avoided by converting the remaining CCUs to use platform
drivers. Then fw_devlink will ensure the drivers are bound in the
optimal order.

The sun5i CCU is the only one which actually needs to be an early clock
provider, because it provides the clock for the system timer. That one
is left alone.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20211119033338.25486-4-samuel@sholland.org
drivers/clk/sunxi-ng/Kconfig
drivers/clk/sunxi-ng/ccu-sun4i-a10.c
drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c
drivers/clk/sunxi-ng/ccu-sun50i-h616.c
drivers/clk/sunxi-ng/ccu-sun6i-a31.c
drivers/clk/sunxi-ng/ccu-sun8i-a23.c
drivers/clk/sunxi-ng/ccu-sun8i-a33.c
drivers/clk/sunxi-ng/ccu-sun8i-h3.c
drivers/clk/sunxi-ng/ccu-sun8i-r.c
drivers/clk/sunxi-ng/ccu-sun8i-v3s.c
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c