summaryrefslogtreecommitdiffstats
path: root/hw/sd/sdhci.c
diff options
context:
space:
mode:
authorPrasad J Pandit2017-02-28 13:08:14 +0100
committerPeter Maydell2017-02-28 13:08:14 +0100
commit45ba9f761bde329cc5ef276b571bd4f3c41a044e (patch)
tree8c1bc88cff9ea0386e9233af1c6413a074c282c9 /hw/sd/sdhci.c
parentsd: sdhci: check transfer mode register in multi block transfer (diff)
downloadqemu-45ba9f761bde329cc5ef276b571bd4f3c41a044e.tar.gz
qemu-45ba9f761bde329cc5ef276b571bd4f3c41a044e.tar.xz
qemu-45ba9f761bde329cc5ef276b571bd4f3c41a044e.zip
sd: sdhci: conditionally invoke multi block transfer
In sdhci_write invoke multi block transfer if it is enabled in the transfer mode register 's->trnmod'. Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-id: 20170214185225.7994-4-ppandit@redhat.com Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/sd/sdhci.c')
-rw-r--r--hw/sd/sdhci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 5adeab6b4b..c270e09dac 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -1023,7 +1023,11 @@ sdhci_write(void *opaque, hwaddr offset, uint64_t val, unsigned size)
/* Writing to last byte of sdmasysad might trigger transfer */
if (!(mask & 0xFF000000) && TRANSFERRING_DATA(s->prnsts) && s->blkcnt &&
s->blksize && SDHC_DMA_TYPE(s->hostctl) == SDHC_CTRL_SDMA) {
- sdhci_sdma_transfer_multi_blocks(s);
+ if (s->trnmod & SDHC_TRNS_MULTI) {
+ sdhci_sdma_transfer_multi_blocks(s);
+ } else {
+ sdhci_sdma_transfer_single_block(s);
+ }
}
break;
case SDHC_BLKSIZE: