summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven J. Hill <Steven.Hill@cavium.com>2017-04-24 20:41:56 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2017-04-24 21:49:48 +0200
commitdceb9781dcad8b9bdb88b9f7c06b2e47f5ad789e (patch)
tree7fcc04b00063b4780c05b51f60c3bc581f64e3ed
parentmmc: core: Export API to allow hosts to get the card address (diff)
downloadlinux-dceb9781dcad8b9bdb88b9f7c06b2e47f5ad789e.tar.xz
linux-dceb9781dcad8b9bdb88b9f7c06b2e47f5ad789e.zip
mmc: cavium: Fix detection of block or byte addressing.
Use the mmc_card_is_blockaddr() function to properly detect if the card uses byte or block addressing. Signed-off-by: Steven J. Hill <Steven.Hill@cavium.com> Acked-by: David Daney <david.daney@cavium.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/cavium.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/cavium.c b/drivers/mmc/host/cavium.c
index d89c011bbea8..58b51ba6aabd 100644
--- a/drivers/mmc/host/cavium.c
+++ b/drivers/mmc/host/cavium.c
@@ -629,7 +629,7 @@ static u64 prepare_ext_dma(struct mmc_host *mmc, struct mmc_request *mrq)
emm_dma = FIELD_PREP(MIO_EMM_DMA_VAL, 1) |
FIELD_PREP(MIO_EMM_DMA_SECTOR,
- (mrq->data->blksz == 512) ? 1 : 0) |
+ mmc_card_is_blockaddr(mmc->card) ? 1 : 0) |
FIELD_PREP(MIO_EMM_DMA_RW,
(mrq->data->flags & MMC_DATA_WRITE) ? 1 : 0) |
FIELD_PREP(MIO_EMM_DMA_BLOCK_CNT, mrq->data->blocks) |