@@ -728,12 +728,18 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
#ifdef CONFIG_MMC_SDHCI_SDMA
if (!(caps & SDHCI_CAN_DO_SDMA)) {
- printf("%s: Your controller doesn't support SDMA!!\n",
+ if (host->quirks & SDHCI_QUIRK_BROKEN_SDMA) {
+ caps &= ~SDHCI_CAN_DO_SDMA;
+ goto skip;
+ } else {
+ printf("%s: Your controller doesn't support SDMA!!\n",
__func__);
- return -EINVAL;
+ return -EINVAL;
+ }
}
host->flags |= USE_SDMA;
+skip:
#endif
#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)
if (!(caps & SDHCI_CAN_DO_ADMA2)) {
@@ -243,6 +243,7 @@
#define SDHCI_QUIRK_WAIT_SEND_CMD (1 << 6)
#define SDHCI_QUIRK_USE_WIDE8 (1 << 8)
#define SDHCI_QUIRK_NO_1_8_V (1 << 9)
+#define SDHCI_QUIRK_BROKEN_SDMA (1 << 10)
/* to make gcc happy */
struct sdhci_host;
ADd quirks relevant to broken SDMA. If set to SDHCI_QUIRK_BROKEN_SDMA, it should be run the pio mode. Signed-off-by: Jaehoon Chung <jh80.chung at samsung.com> --- drivers/mmc/sdhci.c | 10 ++++++++-- include/sdhci.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-)