hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/mmc/host/jz4740_mmc.c
....@@ -1041,6 +1041,16 @@
10411041 mmc->ops = &jz4740_mmc_ops;
10421042 if (!mmc->f_max)
10431043 mmc->f_max = JZ_MMC_CLK_RATE;
1044
+
1045
+ /*
1046
+ * There seems to be a problem with this driver on the JZ4760 and
1047
+ * JZ4760B SoCs. There, when using the maximum rate supported (50 MHz),
1048
+ * the communication fails with many SD cards.
1049
+ * Until this bug is sorted out, limit the maximum rate to 24 MHz.
1050
+ */
1051
+ if (host->version == JZ_MMC_JZ4760 && mmc->f_max > JZ_MMC_CLK_RATE)
1052
+ mmc->f_max = JZ_MMC_CLK_RATE;
1053
+
10441054 mmc->f_min = mmc->f_max / 128;
10451055 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
10461056