u-boot/drivers/clk/renesas
Hai Pham 4dbbc3f373 clk: renesas: Switch to new SD clock handling
The old SD handling code was huge and could not handle all the details
which showed up on R-Car Gen3 SoCs meanwhile. It is time to switch to
another design. Have SDnH a separate clock, use the existing divider
clocks and move the errata handling from the clock driver to the SDHI
driver where it belongs.

Based on Linux series by Wolfram Sang, commit bb6d3fa98a41 ("clk:
renesas: rcar-gen3: Switch to new SD clock handling") and commit
e5f7e81ee430a ("mmc: renesas_sdhi: Parse DT for SDnH")

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
       - Fix missing ~ in GENMASK(a, b), use clrsetbits_le32 instead
       - Use DIV_ROUND_CLOSEST, else if parent clock = 199999992 and
         rate = 200000000, the divider would be 0 and table lookup
	 would fail.
       - Turn rcar_clk_get_table_val into signed integer, so it can
         return 0 as a valid value and negative values as errors.
       - Make the code operate on correct clock and add comment
         which explains the reasoning behind it.
       - Rebase on changes to
         clk: renesas: Introduce and use rcar_clk_get_rate64_div_table function
2023-02-02 01:49:20 +01:00
..
clk-rcar-gen2.c clk: renesas: Convert Gen2/Gen3 clock tables to clk-provider struct clk_div_table 2023-02-02 01:49:20 +01:00
clk-rcar-gen3.c clk: renesas: Switch to new SD clock handling 2023-02-02 01:49:20 +01:00
Kconfig clk: renesas: r8a7796: Add R8A77961 CPG/MSSR support 2023-02-02 01:49:20 +01:00
Makefile clk: renesas: r8a7796: Add R8A77961 CPG/MSSR support 2023-02-02 01:49:20 +01:00
r8a774a1-cpg-mssr.c clk: renesas: Add and enable CPG reset driver 2023-02-02 01:49:20 +01:00
r8a774b1-cpg-mssr.c clk: renesas: Add and enable CPG reset driver 2023-02-02 01:49:20 +01:00
r8a774c0-cpg-mssr.c clk: renesas: Add and enable CPG reset driver 2023-02-02 01:49:20 +01:00
r8a774e1-cpg-mssr.c clk: renesas: Add and enable CPG reset driver 2023-02-02 01:49:20 +01:00
r8a779a0-cpg-mssr.c clk: renesas: Add and enable CPG reset driver 2023-02-02 01:49:20 +01:00
r8a7790-cpg-mssr.c clk: renesas: Make reset controller modemr register offset configurable 2021-05-21 15:00:17 +02:00
r8a7791-cpg-mssr.c clk: renesas: Make reset controller modemr register offset configurable 2021-05-21 15:00:17 +02:00
r8a7792-cpg-mssr.c clk: renesas: Make reset controller modemr register offset configurable 2021-05-21 15:00:17 +02:00
r8a7794-cpg-mssr.c clk: renesas: Make reset controller modemr register offset configurable 2021-05-21 15:00:17 +02:00
r8a7795-cpg-mssr.c clk: renesas: Add and enable CPG reset driver 2023-02-02 01:49:20 +01:00
r8a7796-cpg-mssr.c clk: renesas: Add and enable CPG reset driver 2023-02-02 01:49:20 +01:00
r8a77965-cpg-mssr.c clk: renesas: Add and enable CPG reset driver 2023-02-02 01:49:20 +01:00
r8a77970-cpg-mssr.c clk: renesas: Add and enable CPG reset driver 2023-02-02 01:49:20 +01:00
r8a77980-cpg-mssr.c clk: renesas: Add and enable CPG reset driver 2023-02-02 01:49:20 +01:00
r8a77990-cpg-mssr.c clk: renesas: Add and enable CPG reset driver 2023-02-02 01:49:20 +01:00
r8a77995-cpg-mssr.c clk: renesas: Add and enable CPG reset driver 2023-02-02 01:49:20 +01:00
rcar-gen2-cpg.h clk: renesas: Make reset controller modemr register offset configurable 2021-05-21 15:00:17 +02:00
rcar-gen3-cpg.h clk: renesas: Switch to new SD clock handling 2023-02-02 01:49:20 +01:00
renesas-cpg-mssr.c clk: renesas: Add R8A779A0 clock tables 2021-06-24 20:22:17 +02:00
renesas-cpg-mssr.h clk: renesas: Add R8A779A0 clock tables 2021-06-24 20:22:17 +02:00