mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
mmc: bcm2835: Don't overwrite max frequency unconditionally
commit118032be38upstream. The optional DT parameter max-frequency could init the max bus frequency. So take care of this, before setting the max bus frequency. Fixes:660fc733bd("mmc: bcm2835: Add new driver for the sdhost controller.") Signed-off-by: Phil Elwell <phil@raspberrypi.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Cc: <stable@vger.kernel.org> # 4.12+ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a1341cac93
commit
e8012ff877
@@ -1265,7 +1265,8 @@ static int bcm2835_add_host(struct bcm2835_host *host)
|
||||
char pio_limit_string[20];
|
||||
int ret;
|
||||
|
||||
mmc->f_max = host->max_clk;
|
||||
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;
|
||||
|
||||
mmc->max_busy_timeout = ~0 / (mmc->f_max / 1000);
|
||||
|
||||
Reference in New Issue
Block a user