diff options
author | Prasad J Pandit <pjp@fedoraproject.org> | 2017-02-28 12:08:15 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-02-28 12:08:15 +0000 |
commit | 241999bf4c0dd75d300ceee46f7ad28b3a39fe97 (patch) | |
tree | 9c09ef58bba8f672d506bcfa8b41d24518d07cb7 /hw/sd/sdhci.c | |
parent | 45ba9f761bde329cc5ef276b571bd4f3c41a044e (diff) | |
download | qemu-241999bf4c0dd75d300ceee46f7ad28b3a39fe97.zip qemu-241999bf4c0dd75d300ceee46f7ad28b3a39fe97.tar.gz qemu-241999bf4c0dd75d300ceee46f7ad28b3a39fe97.tar.bz2 |
sd: sdhci: Remove block count enable check in single block transfers
In SDHCI protocol, the 'Block count enable' bit of the Transfer
Mode register is relevant only in multi block transfers. We need
not check it in single block transfers.
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-id: 20170214185225.7994-5-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.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index c270e09..6d6a791 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -570,7 +570,6 @@ static void sdhci_sdma_transfer_multi_blocks(SDHCIState *s) } /* single block SDMA transfer */ - static void sdhci_sdma_transfer_single_block(SDHCIState *s) { int n; @@ -589,10 +588,7 @@ static void sdhci_sdma_transfer_single_block(SDHCIState *s) sdbus_write_data(&s->sdbus, s->fifo_buffer[n]); } } - - if (s->trnmod & SDHC_TRNS_BLK_CNT_EN) { - s->blkcnt--; - } + s->blkcnt--; sdhci_end_transfer(s); } |