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

Commit 118032be authored by Phil Elwell's avatar Phil Elwell Committed by Ulf Hansson
Browse files

mmc: bcm2835: Don't overwrite max frequency unconditionally



The optional DT parameter max-frequency could init the max bus frequency.
So take care of this, before setting the max bus frequency.

Fixes: 660fc733 ("mmc: bcm2835: Add new driver for the sdhost controller.")
Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.org>
Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Cc: <stable@vger.kernel.org> # 4.12+
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent fe0e5804
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1265,6 +1265,7 @@ static int bcm2835_add_host(struct bcm2835_host *host)
	char pio_limit_string[20];
	int ret;

	if (!mmc->f_max || mmc->f_max > host->max_clk)
		mmc->f_max = host->max_clk;
	mmc->f_min = host->max_clk / SDCDIV_MAX_CDIV;