From: Jaehoon Chung Date: Mon, 20 Jan 2020 09:47:35 +0000 (+0900) Subject: mmc: sdhci: add quriks relevant to broken SDMA X-Git-Tag: submit/tizen/20200121.034330~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ab52e2b3d372248e58502ef7703a4940ac19656;p=platform%2Fkernel%2Fu-boot.git mmc: sdhci: add quriks relevant to broken SDMA ADd quirks relevant to broken SDMA. If set to SDHCI_QUIRK_BROKEN_SDMA, it should be run the pio mode. Change-Id: Iddae84fea4d1de0301b9afd45f9f55d7d3f8de74 Signed-off-by: Jaehoon Chung --- diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 81f2f35dda..bb2bcd4702 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -729,16 +729,22 @@ 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)) { - printf("%s: Your controller doesn't support SDMA!!\n", + debug("%s: Your controller doesn't support SDMA!!\n", __func__); return -EINVAL; } diff --git a/include/sdhci.h b/include/sdhci.h index 01addb7a60..9865a9d6c8 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -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;