[2/3] mmc: sdhci: not return error when SDMA is not supported

Message ID 20200122231504.26958-3-jh80.chung@samsung.com
State New
Headers show
Series
  • [1/3] mmc: sdhci: use phys2bus macro when dma address is accessed
Related show

Commit Message

Jaehoon Chung Jan. 22, 2020, 11:15 p.m.
If Host controller doesn't support SDMA, it doesn't need to return
error. Because it can be worked with PIO mode.

Signed-off-by: Jaehoon Chung <jh80.chung at samsung.com>
---
 drivers/mmc/sdhci.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Patch

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 93c9049c5d..bd8157d053 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -729,13 +729,13 @@  int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
 	debug("%s, caps: 0x%x\n", __func__, caps);
 
 #ifdef CONFIG_MMC_SDHCI_SDMA
-	if (!(caps & SDHCI_CAN_DO_SDMA)) {
-		printf("%s: Your controller doesn't support SDMA!!\n",
+	if ((caps & SDHCI_CAN_DO_SDMA)) {
+		host->flags |= USE_SDMA;
+	} else {
+		caps &= ~SDHCI_CAN_DO_SDMA;
+		debug("%s: Your controller doesn't support SDMA!!\n",
 		       __func__);
-		return -EINVAL;
 	}
-
-	host->flags |= USE_SDMA;
 #endif
 #if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)
 	if (!(caps & SDHCI_CAN_DO_ADMA2)) {