summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-02-12 15:14:29 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-14 08:47:41 +0100
commit6f474985ca1048e39d4f33ed373631136650a086 (patch)
tree07cf64525379d9c8f2f399150c10aa003d4a869f /drivers
parentee6a508d2b1738c30d4e2eab06ce5732d172524d (diff)
downloadbarebox-6f474985ca1048e39d4f33ed373631136650a086.tar.gz
barebox-6f474985ca1048e39d4f33ed373631136650a086.tar.xz
mci: stm32_sdmmc2: add High-Speed (26 & 52 MHz) support
The SDMMC2 doesn't need any special setup for High-Speed modes, except for the clock changes. Thus set the cap flags if the max clock would allow for the higher speed mode. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mci/stm32_sdmmc2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mci/stm32_sdmmc2.c b/drivers/mci/stm32_sdmmc2.c
index 44f7e62399..65d0d34ffe 100644
--- a/drivers/mci/stm32_sdmmc2.c
+++ b/drivers/mci/stm32_sdmmc2.c
@@ -631,6 +631,11 @@ static int stm32_sdmmc2_probe(struct amba_device *adev,
mci_of_parse(&priv->mci);
+ if (mci->f_max >= 26000000)
+ mci->host_caps |= MMC_CAP_MMC_HIGHSPEED;
+ if (mci->f_max >= 52000000)
+ mci->host_caps |= MMC_CAP_MMC_HIGHSPEED_52MHZ;
+
return mci_register(&priv->mci);
priv_free: