]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
clk: rmobile: Assure SD-IF clock are configured correctly
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Thu, 11 Jan 2018 15:28:31 +0000 (16:28 +0100)
committerMarek Vasut <marex@denx.de>
Fri, 16 Feb 2018 15:43:09 +0000 (16:43 +0100)
The SD driver calls clk_set_rate() before clk_enable(), yet clk_set_rate()
implementation in the clock driver does not set the SD-IF divider. Fix it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
drivers/clk/renesas/clk-rcar-gen3.c

index 0c394a8a71be40685b50d3ad1283a4ac8acbfb83..1be3fe7136450a78e46fb4d6f6c1279b18d9b099 100644 (file)
@@ -288,6 +288,8 @@ static ulong gen3_clk_get_rate(struct clk *clk)
 
 static ulong gen3_clk_set_rate(struct clk *clk, ulong rate)
 {
+       /* Force correct SD-IF divider configuration if applicable */
+       gen3_clk_setup_sdif_div(clk);
        return gen3_clk_get_rate(clk);
 }