diff mbox series

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

Message ID 20200324225859.8462-3-jh80.chung@samsung.com
State Superseded
Headers show
Series Support SDMA mode on RPI4 target - 32bit | expand

Commit Message

Jaehoon Chung March 24, 2020, 10:58 p.m. UTC
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>
Reviewed-by: Peng Fan <peng.fan at nxp.com>
Reviewed-by: Minkyu Kang <mk7.kang at samsung.com>
---
 drivers/mmc/sdhci.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 2b7493fbac..49e67fc7bd 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -741,13 +741,12 @@  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)) {
+	if ((caps & SDHCI_CAN_DO_SDMA)) {
+		host->flags |= USE_SDMA;
+	} else {
 		printf("%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)) {