summaryrefslogtreecommitdiff
path: root/drivers/mmc/pic32_sdhci.c
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>2017-01-17 15:58:48 +0100
committerJaehoon Chung <jh80.chung@samsung.com>2017-01-23 15:37:42 +0900
commit6d0e34bf4e21596563e5f5950d097a2eab4c81a8 (patch)
treed1d82e018cb8b85d7f0ddb102667b676fe891237 /drivers/mmc/pic32_sdhci.c
parent0c9e85f67cd86d2d7a3424ea3ebff0e6db7a3915 (diff)
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/pic32_sdhci.c')
-rw-r--r--drivers/mmc/pic32_sdhci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/pic32_sdhci.c b/drivers/mmc/pic32_sdhci.c
index c06364cfc1..1e14fa14d6 100644
--- a/drivers/mmc/pic32_sdhci.c
+++ b/drivers/mmc/pic32_sdhci.c
@@ -56,7 +56,9 @@ static int pic32_sdhci_probe(struct udevice *dev)
return ret;
}
- ret = add_sdhci(host, f_min_max[1], f_min_max[0]);
+ host->max_clk = f_min_max[1];
+
+ ret = add_sdhci(host, 0, f_min_max[0]);
if (ret)
return ret;
host->mmc->dev = dev;