aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2017-10-02 08:27:41 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2017-10-04 04:41:42 -0400
commitca3dcd3ff5b13a31a09a0119dc484b97ec19c4c8 (patch)
tree8a664f92c3218e17fb1050234cee3565c4ce22d0
parentde3ee99b097dd51938276e3af388cd4ad0f2750a (diff)
mmc: meson-gx: make sure the clock is rounded down
Using CLK_DIVIDER_ROUND_CLOSEST is unsafe as the mmc clock could be rounded to a rate higher the specified rate. Removing this flag ensure that, if the rate needs to be rounded, it will be rounded down. Fixes: 51c5d8447bd7 ("MMC: meson: initial support for GX platforms") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/meson-gx-mmc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index c885c2d4b904..421c8719c202 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -531,8 +531,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
531 div->shift = __ffs(CLK_DIV_MASK); 531 div->shift = __ffs(CLK_DIV_MASK);
532 div->width = __builtin_popcountl(CLK_DIV_MASK); 532 div->width = __builtin_popcountl(CLK_DIV_MASK);
533 div->hw.init = &init; 533 div->hw.init = &init;
534 div->flags = (CLK_DIVIDER_ONE_BASED | 534 div->flags = CLK_DIVIDER_ONE_BASED;
535 CLK_DIVIDER_ROUND_CLOSEST);
536 535
537 clk = devm_clk_register(host->dev, &div->hw); 536 clk = devm_clk_register(host->dev, &div->hw);
538 if (WARN_ON(IS_ERR(clk))) 537 if (WARN_ON(IS_ERR(clk)))