OSDN Git Service

mmc: tegra: Use sdhci_pltfm_clk_get_max_clock
authorAapo Vienamo <avienamo@nvidia.com>
Mon, 4 Jun 2018 15:35:40 +0000 (18:35 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 16 Jul 2018 09:21:45 +0000 (11:21 +0200)
commit75067aba7afbeca2101f50f78ac1b7c036778c44
treea279000115c7a0639e97510bf5af5b9d3ab05bb9
parenta94a7483a91cb6a0d15a4413e8fc853f33a4e1b9
mmc: tegra: Use sdhci_pltfm_clk_get_max_clock

The sdhci get_max_clock callback is set to sdhci_pltfm_clk_get_max_clock
and tegra_sdhci_get_max_clock is removed. It appears that the
shdci-tegra specific callback was originally introduced due to the
requirement that the host clock has to be twice the bus clock on DDR50
mode. As far as I can tell the only effect the removal has on DDR50 mode
is in cases where the parent clock is unable to supply the requested
clock rate, causing the DDR50 mode to run at a lower frequency.
Currently the DDR50 mode isn't enabled on any of the SoCs and would also
require configuring the SDHCI clock divider register to function
properly.

The problem with tegra_sdhci_get_max_clock is that it divides the clock
rate by two and thus artificially limits the maximum frequency of faster
signaling modes which don't have the host-bus frequency ratio requirement
of DDR50 such as SDR104 and HS200. Furthermore, the call to
clk_round_rate() may return an error which isn't handled by
tegra_sdhci_get_max_clock.

Signed-off-by: Aapo Vienamo <avienamo@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-tegra.c