Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1743171 > unrolled thread

[PATCH 1/3] mmc: meson-gx: make sure the clock is rounded down

Started byJerome Brunet <jbrunet@baylibre.com>
First post2017-10-02 14:30 +0200
Last post2017-10-02 14:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/3] mmc: meson-gx: make sure the clock is rounded down Jerome Brunet <jbrunet@baylibre.com> - 2017-10-02 14:30 +0200

#1743171 — [PATCH 1/3] mmc: meson-gx: make sure the clock is rounded down

FromJerome Brunet <jbrunet@baylibre.com>
Date2017-10-02 14:30 +0200
Subject[PATCH 1/3] mmc: meson-gx: make sure the clock is rounded down
Message-ID<uw81b-7ep-1@gated-at.bofh.it>
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>
---
 drivers/mmc/host/meson-gx-mmc.c | 3 +--
 1 file changed, 1 insertion(+), 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)
 	div->shift = __ffs(CLK_DIV_MASK);
 	div->width = __builtin_popcountl(CLK_DIV_MASK);
 	div->hw.init = &init;
-	div->flags = (CLK_DIVIDER_ONE_BASED |
-		      CLK_DIVIDER_ROUND_CLOSEST);
+	div->flags = CLK_DIVIDER_ONE_BASED;
 
 	clk = devm_clk_register(host->dev, &div->hw);
 	if (WARN_ON(IS_ERR(clk)))
-- 
2.13.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web