[zircon][sdhci] Set DMA capabilities based on quirks
The SDMMC core driver uses the capabilities flags to decide whether or
not to request DMA transfers. If SDHCI_QUIRK_NO_DMA is set the SDHCI
driver should ignore the capabilities reported by the host controller
and not set these flags.
Test: CQ (no devices affected)
Change-Id: Ib902698893b2b2b577407edd0cc007d872b61f87
diff --git a/zircon/system/dev/block/sdhci/sdhci.c b/zircon/system/dev/block/sdhci/sdhci.c
index 8114a90..5c1c6b3 100644
--- a/zircon/system/dev/block/sdhci/sdhci.c
+++ b/zircon/system/dev/block/sdhci/sdhci.c
@@ -1124,10 +1124,10 @@
if (caps0 & SDHCI_CORECFG_8_BIT_SUPPORT) {
dev->info.caps |= SDMMC_HOST_CAP_BUS_WIDTH_8;
}
- if (caps0 & SDHCI_CORECFG_ADMA2_SUPPORT) {
+ if (caps0 & SDHCI_CORECFG_ADMA2_SUPPORT && !(dev->quirks & SDHCI_QUIRK_NO_DMA)) {
dev->info.caps |= SDMMC_HOST_CAP_ADMA2;
}
- if (caps0 & SDHCI_CORECFG_64BIT_SUPPORT) {
+ if (caps0 & SDHCI_CORECFG_64BIT_SUPPORT && !(dev->quirks & SDHCI_QUIRK_NO_DMA)) {
dev->info.caps |= SDMMC_HOST_CAP_SIXTY_FOUR_BIT;
}
if (caps0 & SDHCI_CORECFG_3P3_VOLT_SUPPORT) {