Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca3dcd3f authored by Jerome Brunet's avatar Jerome Brunet Committed by Ulf Hansson
Browse files

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: 51c5d844 ("MMC: meson: initial support for GX platforms")
Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
Reviewed-by: default avatarKevin Hilman <khilman@baylibre.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent de3ee99b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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)))