mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] mci: stm32_sdmmc2: add High-Speed (26 & 52 MHz) support
@ 2020-02-12 14:14 Ahmad Fatoum
  2020-02-12 14:14 ` [PATCH 2/2] mci: core: populate mci_ios.timing member Ahmad Fatoum
  2020-02-14  7:47 ` [PATCH 1/2] mci: stm32_sdmmc2: add High-Speed (26 & 52 MHz) support Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2020-02-12 14:14 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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>
---
 drivers/mci/stm32_sdmmc2.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mci/stm32_sdmmc2.c b/drivers/mci/stm32_sdmmc2.c
index 695e61d1ccd7..0c26869b0378 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:
-- 
2.25.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-14  7:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 14:14 [PATCH 1/2] mci: stm32_sdmmc2: add High-Speed (26 & 52 MHz) support Ahmad Fatoum
2020-02-12 14:14 ` [PATCH 2/2] mci: core: populate mci_ios.timing member Ahmad Fatoum
2020-02-14  7:47 ` [PATCH 1/2] mci: stm32_sdmmc2: add High-Speed (26 & 52 MHz) support Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox