We currently have callbacks for max_clk, f_min but are missing the callback for f_max. Signed-off-by: Philip Rakity <prakity@xxxxxxxxxxx> --- drivers/mmc/host/sdhci.c | 9 ++++++--- drivers/mmc/host/sdhci.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 1709f8b..7a444f7 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2364,9 +2364,12 @@ int sdhci_add_host(struct sdhci_host *host) */ mmc->ops = &sdhci_ops; mmc->f_max = host->max_clk; - if (host->ops->get_min_clock) - mmc->f_min = host->ops->get_min_clock(host); - else if (host->version >= SDHCI_SPEC_300) { + if (host->ops->get_min_clock || host->ops->get_f_max_clock) { + if (host->ops->get_min_clock) + mmc->f_min = host->ops->get_min_clock(host); + if (host->ops->get_f_max_clock) + mmc->f_max = host->ops->get_f_max_clock(host); + } else if (host->version >= SDHCI_SPEC_300) { if (host->clk_mul) { mmc->f_min = (host->max_clk * host->clk_mul) / 1024; mmc->f_max = host->max_clk * host->clk_mul; diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 15cb026..7295c2a 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -264,6 +264,7 @@ struct sdhci_ops { void (*platform_reset_enter)(struct sdhci_host *host, u8 mask); void (*platform_reset_exit)(struct sdhci_host *host, u8 mask); int (*set_uhs_signaling)(struct sdhci_host *host, unsigned int uhs); + unsigned int (*get_f_max_clock)(struct sdhci_host *host); }; -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html