Commit 33e6d74d authored by Ulf Hansson's avatar Ulf Hansson

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: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarSteven J. Hill <Steven.Hill@cavium.com>
Acked-by: default avatarDavid Daney <david.daney@cavium.com>
parent f328c76e
...@@ -2560,6 +2560,12 @@ unsigned int mmc_calc_max_discard(struct mmc_card *card) ...@@ -2560,6 +2560,12 @@ unsigned int mmc_calc_max_discard(struct mmc_card *card)
} }
EXPORT_SYMBOL(mmc_calc_max_discard); 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) int mmc_set_blocklen(struct mmc_card *card, unsigned int blocklen)
{ {
struct mmc_command cmd = {}; struct mmc_command cmd = {};
......
...@@ -315,6 +315,8 @@ static inline bool mmc_large_sector(struct mmc_card *card) ...@@ -315,6 +315,8 @@ static inline bool mmc_large_sector(struct mmc_card *card)
return card->ext_csd.data_sector_size == 4096; return card->ext_csd.data_sector_size == 4096;
} }
bool mmc_card_is_blockaddr(struct mmc_card *card);
#define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC) #define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC)
#define mmc_card_sd(c) ((c)->type == MMC_TYPE_SD) #define mmc_card_sd(c) ((c)->type == MMC_TYPE_SD)
#define mmc_card_sdio(c) ((c)->type == MMC_TYPE_SDIO) #define mmc_card_sdio(c) ((c)->type == MMC_TYPE_SDIO)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment