mmc: sdhci: Let drivers define their DMA mask
[sfrench/cifs-2.6.git] / drivers / mmc / host / sdhci.c
index 922a5b594c5eb4fc9924544ee9135c4d2f7eb3c1..b056400e34b14d5ba0eba44b6c72556c7d273592 100644 (file)
@@ -3781,18 +3781,14 @@ int sdhci_setup_host(struct sdhci_host *host)
                host->flags &= ~SDHCI_USE_ADMA;
        }
 
-       /*
-        * It is assumed that a 64-bit capable device has set a 64-bit DMA mask
-        * and *must* do 64-bit DMA.  A driver has the opportunity to change
-        * that during the first call to ->enable_dma().  Similarly
-        * SDHCI_QUIRK2_BROKEN_64_BIT_DMA must be left to the drivers to
-        * implement.
-        */
        if (sdhci_can_64bit_dma(host))
                host->flags |= SDHCI_USE_64_BIT_DMA;
 
        if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) {
-               ret = sdhci_set_dma_mask(host);
+               if (host->ops->set_dma_mask)
+                       ret = host->ops->set_dma_mask(host);
+               else
+                       ret = sdhci_set_dma_mask(host);
 
                if (!ret && host->ops->enable_dma)
                        ret = host->ops->enable_dma(host);