Skip to content

Commit

Permalink
mmc: bcm2835-mmc: Support underclocking
Browse files Browse the repository at this point in the history
Support underclocking of the SD bus using the max-frequency DT property
(which currently has no DT parameter). The sd_overclock parameter
already provides another way to achieve the same thing which should be
equivalent in end result, but it is a bug not to support max-frequency
as well.

See: #2350

Signed-off-by: Phil Elwell <[email protected]>
  • Loading branch information
Phil Elwell committed Jan 22, 2018
1 parent 3cd16c3 commit ba338f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mmc/host/bcm2835-mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1310,8 +1310,8 @@ static int bcm2835_mmc_add_host(struct bcm2835_host *host)

host->clk_mul = 0;

mmc->f_max = host->max_clk;
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 / SDHCI_MAX_DIV_SPEC_300;

/* SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK */
Expand Down

0 comments on commit ba338f7

Please sign in to comment.