]> git.dujemihanovic.xyz Git - u-boot.git/commit
clk: renesas: rcar-gen3: Factor out CPG library
authorHai Pham <hai.pham.ud@renesas.com>
Thu, 26 Jan 2023 20:06:07 +0000 (21:06 +0100)
committerMarek Vasut <marek.vasut+renesas@gmail.com>
Thu, 2 Feb 2023 00:49:20 +0000 (01:49 +0100)
commit1b4ca865b2dfcefa11be4eb64842ca4f85f95d7a
tree60493de8fa18de8d388395609d767d88ec36c0ca
parentd8132ae37ad66be63591d8ef34d95b8822361754
clk: renesas: rcar-gen3: Factor out CPG library

R-Car V3U has a CPG different enough to not be a generic Gen3 CPG but
similar enough to reuse code. Introduce a new CPG library, factor out
the SD clock and RPC clock handling and hook them to the generic Gen3
CPG driver so we have an equal state.

Based on Linux commit [1] and [2] by Wolfram Sang

[1] 8bb67d87346a ("clk: renesas: rcar-gen3: Factor out CPG library")
[2] 6f21d145b90f ("clk: renesas: cpg-lib: Move RPC clock registration to
the library")

Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek: - Add rcar_clk_* prefix to all functions
       - Rebase on changes to
         clk: renesas: Introduce and use rcar_clk_get_rate64_div_table function
       - Use u32_encode_bits/GENMASK bitfield ops
drivers/clk/renesas/Kconfig
drivers/clk/renesas/Makefile
drivers/clk/renesas/clk-rcar-gen3.c
drivers/clk/renesas/rcar-cpg-lib.c [new file with mode: 0644]
drivers/clk/renesas/rcar-cpg-lib.h [new file with mode: 0644]