Skip to contentSkip to conversation

mmc: dw_mmc: Use dma_set_mask_and_coherent() helper

PATCH In review Shawn Lin 2 participants 2 messages Oct 10, 2025 – Oct 17, 2025

Subsystems (2)
lore
Share & tools
lore

Shawn Lin

author maintainer
#0 lore raw

PATCH 1/1 mmc: dw_mmc: Use dma_set_mask_and_coherent() helper

Use dma_set_mask_and_coherent() instead. No functional changes.

---

 drivers/mmc/host/dw_mmc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/mmc/host/dw_mmc.c +2 -3
index c5db92b..c4f5f44 100644
@@ -3120,9 +3120,8 @@ static void dw_mci_init_dma(struct dw_mci *host)
 			host->dma_64bit_address = 1;
 			dev_info(host->dev,
 				 "IDMAC supports 64-bit address mode.\n");
-			if (!dma_set_mask(host->dev, DMA_BIT_MASK(64)))
-				dma_set_coherent_mask(host->dev,
-						      DMA_BIT_MASK(64));
+			if (dma_set_mask_and_coherent(host->dev, DMA_BIT_MASK(64)))
+				dev_info(host->dev, "Fail to set 64-bit DMA mask");
 		} else {
 			/* host supports IDMAC in 32-bit address mode */
 			host->dma_64bit_address = 0;
Signature · 1 line
2.7.4
#1 lore raw
Quoted 4 lines · Shawn Lin

Use dma_set_mask_and_coherent() instead. No functional changes.

Applied for next, thanks!

Kind regards
Uffe

Quoted 24 lines

---

 drivers/mmc/host/dw_mmc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/mmc/host/dw_mmc.c +2 -4
index c5db92b..c4f5f44 100644
@@ -3120,9 +3120,8 @@ static void dw_mci_init_dma(struct dw_mci *host)
                        host->dma_64bit_address = 1;
                        dev_info(host->dev,
                                 "IDMAC supports 64-bit address mode.\n");
-                       if (!dma_set_mask(host->dev, DMA_BIT_MASK(64)))
-                               dma_set_coherent_mask(host->dev,
-                                                     DMA_BIT_MASK(64));
+                       if (dma_set_mask_and_coherent(host->dev, DMA_BIT_MASK(64)))
+                               dev_info(host->dev, "Fail to set 64-bit DMA mask");
                } else {
                        /* host supports IDMAC in 32-bit address mode */
                        host->dma_64bit_address = 0;
--

2.7.4