summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2017-04-24 13:41:55 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2017-04-24 21:49:15 +0200
commit33e6d74d65c358270f00d228877178964aab84b3 (patch)
tree5a3590e037d82638dbd3a7e0a6f9442230fe6d3a /drivers/mmc
parentf328c76e568d13c9fee21b5cf7411c96285f0f89 (diff)
downloadop-kernel-dev-33e6d74d65c358270f00d228877178964aab84b3.zip
op-kernel-dev-33e6d74d65c358270f00d228877178964aab84b3.tar.gz
mmc: core: Export API to allow hosts to get the card address
Some hosts controllers, like Cavium, needs to know whether the card operates in byte- or block-address mode. Therefore export a new API, mmc_card_is_blockaddr(), which provides this information. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Steven J. Hill <Steven.Hill@cavium.com> Acked-by: David Daney <david.daney@cavium.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index e5f6bbf..82c45dd 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2560,6 +2560,12 @@ unsigned int mmc_calc_max_discard(struct mmc_card *card)
}
EXPORT_SYMBOL(mmc_calc_max_discard);
+bool mmc_card_is_blockaddr(struct mmc_card *card)
+{
+ return card ? mmc_card_blockaddr(card) : false;
+}
+EXPORT_SYMBOL(mmc_card_is_blockaddr);
+
int mmc_set_blocklen(struct mmc_card *card, unsigned int blocklen)
{
struct mmc_command cmd = {};
OpenPOWER on IntegriCloud