Skip to content

Commit ca3dcd3

Browse files
jbrun3tUlf Hansson
authored andcommitted
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: 51c5d84 ("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>
1 parent de3ee99 commit ca3dcd3

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/mmc/host/meson-gx-mmc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
531531
div->shift = __ffs(CLK_DIV_MASK);
532532
div->width = __builtin_popcountl(CLK_DIV_MASK);
533533
div->hw.init = &init;
534-
div->flags = (CLK_DIVIDER_ONE_BASED |
535-
CLK_DIVIDER_ROUND_CLOSEST);
534+
div->flags = CLK_DIVIDER_ONE_BASED;
536535

537536
clk = devm_clk_register(host->dev, &div->hw);
538537
if (WARN_ON(IS_ERR(clk)))

0 commit comments

Comments
 (0)