Re: [Qemu-devel] [PATCH v4 4/4] sd: sdhci: Remove block count enable check in single block transfers
On Tue, Feb 14, 2017 at 10:52 AM, P J Pwrote: > From: Prasad J Pandit > > 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 Reviewed-by: Alistair Francis Thanks, Alistair > --- > hw/sd/sdhci.c | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c > index 8ae75fe..05558d3 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(>sdbus, s->fifo_buffer[n]); > } > } > - > -if (s->trnmod & SDHC_TRNS_BLK_CNT_EN) { > -s->blkcnt--; > -} > +s->blkcnt--; > > sdhci_end_transfer(s); > } > -- > 2.9.3 >
[Qemu-devel] [PATCH v4 4/4] sd: sdhci: Remove block count enable check in single block transfers
From: Prasad J PanditIn 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 --- hw/sd/sdhci.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 8ae75fe..05558d3 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(>sdbus, s->fifo_buffer[n]); } } - -if (s->trnmod & SDHC_TRNS_BLK_CNT_EN) { -s->blkcnt--; -} +s->blkcnt--; sdhci_end_transfer(s); } -- 2.9.3