diff options
author | Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> | 2017-01-17 15:58:48 +0100 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2017-01-23 15:37:42 +0900 |
commit | 6d0e34bf4e21596563e5f5950d097a2eab4c81a8 (patch) | |
tree | d1d82e018cb8b85d7f0ddb102667b676fe891237 /drivers/mmc/s5p_sdhci.c | |
parent | 0c9e85f67cd86d2d7a3424ea3ebff0e6db7a3915 (diff) | |
download | u-boot-6d0e34bf4e21596563e5f5950d097a2eab4c81a8.tar.gz |
mmc: sdhci: Distinguish between base clock and maximum peripheral frequency
The sdhci controller assumes that the base clock frequency is fully supported by
the peripheral and doesn't support hardware limitations. The Linux kernel
distinguishes between base clock (max_clk) of the host controller and maximum
frequency (f_max) of the card interface. Use the same differentiation and allow
the platform to constrain the peripheral interface.
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Diffstat (limited to 'drivers/mmc/s5p_sdhci.c')
-rw-r--r-- | drivers/mmc/s5p_sdhci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index 1f1d2ed865..28327d5f0b 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -91,6 +91,7 @@ static int s5p_sdhci_core_init(struct sdhci_host *host) host->quirks = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_VOLTAGE | SDHCI_QUIRK_32BIT_DMA_ADDR | SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_USE_WIDE8; + host->max_clk = 52000000; host->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195; host->ops = &s5p_sdhci_ops; @@ -98,7 +99,7 @@ static int s5p_sdhci_core_init(struct sdhci_host *host) host->host_caps |= MMC_MODE_8BIT; #ifndef CONFIG_BLK - return add_sdhci(host, 52000000, 400000); + return add_sdhci(host, 0, 400000); #else return 0; #endif @@ -254,7 +255,7 @@ static int s5p_sdhci_probe(struct udevice *dev) if (ret) return ret; - ret = sdhci_setup_cfg(&plat->cfg, host, 52000000, 400000); + ret = sdhci_setup_cfg(&plat->cfg, host, 0, 400000); if (ret) return ret; |