From: "Steven J. Hill" <steven.hill@cavium.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: David Daney <david.daney@cavium.com>,
Jan Glauber <jglauber@cavium.com>,
linux-mmc@vger.kernel.org, linux-mips@linux-mips.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] mmc: cavium: Fix detection of block or byte addressing.
Date: Mon, 24 Apr 2017 13:41:56 -0500 [thread overview]
Message-ID: <1493059318-767-3-git-send-email-steven.hill@cavium.com> (raw)
In-Reply-To: <1493059318-767-1-git-send-email-steven.hill@cavium.com>
From: "Steven J. Hill" <Steven.Hill@cavium.com>
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>
---
drivers/mmc/host/cavium.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/cavium.c b/drivers/mmc/host/cavium.c
index d842b69..36b25e4 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) |
--
2.1.4
next prev parent reply other threads:[~2017-04-24 18:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-24 18:41 [PATCH 0/4] MMC support for Octeon platforms Steven J. Hill
2017-04-24 18:41 ` [PATCH 1/4] mmc: core: Export API to allow hosts to get the card address Steven J. Hill
2017-04-24 18:41 ` Steven J. Hill [this message]
2017-04-24 18:41 ` [PATCH 3/4] mmc: cavium: Add MMC support for Octeon SOCs Steven J. Hill
2017-04-24 18:41 ` [PATCH 4/4] MIPS: Octeon: cavium_octeon_defconfig: Enable Octeon MMC Steven J. Hill
2017-04-24 19:56 ` [PATCH 0/4] MMC support for Octeon platforms Ulf Hansson
2017-04-24 21:19 ` Steven J. Hill
2017-04-25 19:54 ` Ralf Baechle
2017-04-25 20:05 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1493059318-767-3-git-send-email-steven.hill@cavium.com \
--to=steven.hill@cavium.com \
--cc=david.daney@cavium.com \
--cc=jglauber@cavium.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox