@@ -883,8 +883,14 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd)
host->flags &= ~SDHCI_REQ_USE_DMA;
} else {
WARN_ON(sg_cnt != 1);
- sdhci_writel(host, sg_dma_address(data->sg),
- SDHCI_DMA_ADDRESS);
+ if (host->uhsii_if_enabled)
+ sdhci_writel(host,
+ sg_dma_address(data->sg),
+ SDHCI_ADMA_ADDRESS);
+ else
+ sdhci_writel(host,
+ sg_dma_address(data->sg),
+ SDHCI_DMA_ADDRESS);
}
}
}
@@ -924,9 +930,15 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd)
sdhci_set_transfer_irqs(host);
/* Set the DMA boundary value and block size */
- sdhci_writew(host, SDHCI_MAKE_BLKSZ(SDHCI_DEFAULT_BOUNDARY_ARG,
- data->blksz), SDHCI_BLOCK_SIZE);
- sdhci_writew(host, data->blocks, SDHCI_BLOCK_COUNT);
+ if (host->uhsii_if_enabled) {
+ sdhci_writew(host, SDHCI_MAKE_BLKSZ(SDHCI_DEFAULT_BOUNDARY_ARG,
+ data->blksz), SDHCI_UHSII_BLOCK_SIZE);
+ sdhci_writew(host, data->blocks, SDHCI_UHSII_BLOCK_COUNT);
+ } else {
+ sdhci_writew(host, SDHCI_MAKE_BLKSZ(SDHCI_DEFAULT_BOUNDARY_ARG,
+ data->blksz), SDHCI_BLOCK_SIZE);
+ sdhci_writew(host, data->blocks, SDHCI_BLOCK_COUNT);
+ }
}
static void sdhci_set_transfer_mode(struct sdhci_host *host,