Commit 3828ecaa authored by Adrian Hunter's avatar Adrian Hunter Committed by Ulf Hansson

mmc: sdhci-pci: Add 64-bit DMA support

Set a 64-bit DMA mask when using 64-bit DMA.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 4f64f843
...@@ -1064,7 +1064,7 @@ static int sdhci_pci_enable_dma(struct sdhci_host *host) ...@@ -1064,7 +1064,7 @@ static int sdhci_pci_enable_dma(struct sdhci_host *host)
{ {
struct sdhci_pci_slot *slot; struct sdhci_pci_slot *slot;
struct pci_dev *pdev; struct pci_dev *pdev;
int ret; int ret = -1;
slot = sdhci_priv(host); slot = sdhci_priv(host);
pdev = slot->chip->pdev; pdev = slot->chip->pdev;
...@@ -1076,6 +1076,16 @@ static int sdhci_pci_enable_dma(struct sdhci_host *host) ...@@ -1076,6 +1076,16 @@ static int sdhci_pci_enable_dma(struct sdhci_host *host)
"doesn't fully claim to support it.\n"); "doesn't fully claim to support it.\n");
} }
if (host->flags & SDHCI_USE_64_BIT_DMA) {
if (host->quirks2 & SDHCI_QUIRK2_BROKEN_64_BIT_DMA) {
host->flags &= ~SDHCI_USE_64_BIT_DMA;
} else {
ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
if (ret)
dev_warn(&pdev->dev, "Failed to set 64-bit DMA mask\n");
}
}
if (ret)
ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment