clk: renesas: Updates for v5.2

  - Add missing PCI USB clock on RZ/N1,
  - Add Z2 (Cortex-A53) clocks on R-Car E3 and RZ/G2E, incl. a new
    helper in <linux/math64.h>,
  - Small fixes and cleanups.
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCXKXmdAAKCRCKwlD9ZEnx
cIoQAQDlOT/x4flZmw8231eTeIThDme8NhHye+Bhh7/1UvtIPQEAqx/v+7Y8sLEO
GDwA0VwML+tuZuOI4OiszL88xXj83AA=
=5hgX
-----END PGP SIGNATURE-----
clk: renesas: rcar-gen3: Fix cpg_sd_clock_round_rate() return value

cpg_sd_clock_round_rate() may return an unsupported clock rate for the
requested clock rate. Therefore, when cpg_sd_clock_set_rate() sets the
clock rate acquired by cpg_sd_clock_round_rate(), an error may occur.

This is not conform the clk API design.

This patch fixes that by making sure cpg_sd_clock_calc_div() considers
only the division values defined in cpg_sd_div_table[].
With this fix, the cpg_sd_clock_round_rate() always return a support
clock rate.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Fixes: 90c073e53909da85 ("clk: shmobile: r8a7795: Add SD divider support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
1 file changed