diff options
author | Tom Rini <trini@konsulko.com> | 2018-12-03 17:51:45 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-12-03 17:51:45 -0500 |
commit | ec0d0d8742df12a4c0d3e8382b77c0672cd4aab6 (patch) | |
tree | 1e3f9f045bb61c577106b6bd39adbdc86abae663 /drivers/clk | |
parent | cf7c6f533331ff032d8949663ab2abe618da9cb4 (diff) | |
parent | 8e6442e3cd07249dd45948e44f17f7e51d638f8d (diff) | |
download | u-boot-ec0d0d8742df12a4c0d3e8382b77c0672cd4aab6.zip u-boot-ec0d0d8742df12a4c0d3e8382b77c0672cd4aab6.tar.gz u-boot-ec0d0d8742df12a4c0d3e8382b77c0672cd4aab6.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-sh
- MMC fixes for R-Car Gen3
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/renesas/clk-rcar-gen3.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/clk/renesas/clk-rcar-gen3.c b/drivers/clk/renesas/clk-rcar-gen3.c index 99698b1..0529fc8 100644 --- a/drivers/clk/renesas/clk-rcar-gen3.c +++ b/drivers/clk/renesas/clk-rcar-gen3.c @@ -107,7 +107,7 @@ static int gen3_clk_get_parent(struct gen3_clk_priv *priv, struct clk *clk, return renesas_clk_get_parent(clk, info, parent); } -static int gen3_clk_setup_sdif_div(struct clk *clk) +static int gen3_clk_setup_sdif_div(struct clk *clk, ulong rate) { struct gen3_clk_priv *priv = dev_get_priv(clk->dev); struct cpg_mssr_info *info = priv->info; @@ -133,7 +133,7 @@ static int gen3_clk_setup_sdif_div(struct clk *clk) debug("%s[%i] SDIF offset=%x\n", __func__, __LINE__, core->offset); - writel(1, priv->base + core->offset); + writel((rate == 400000000) ? 0x4 : 0x1, priv->base + core->offset); return 0; } @@ -141,10 +141,6 @@ static int gen3_clk_setup_sdif_div(struct clk *clk) static int gen3_clk_enable(struct clk *clk) { struct gen3_clk_priv *priv = dev_get_priv(clk->dev); - int ret = gen3_clk_setup_sdif_div(clk); - - if (ret) - return ret; return renesas_clk_endisable(clk, priv->base, true); } @@ -328,7 +324,7 @@ 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); + gen3_clk_setup_sdif_div(clk, rate); return gen3_clk_get_rate64(clk); } |