summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/core.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2024-12-02 11:53:34 +1000
committerDave Airlie <airlied@redhat.com>2024-12-02 11:53:34 +1000
commit9ee603b619a6fcc030b46012a900b67e0041b90d (patch)
tree00bf3ba8d87c6720ba1f7de62ce6ef4dd0c5c371 /drivers/mmc/core/core.h
parent25961511c559ed13db76df3ae5ee0b7f43d209e8 (diff)
parent40384c840ea1944d7c5a392e8975ed088ecf0b37 (diff)
Merge remote-tracking branch 'drm/drm-next' into drm-tip
Diffstat (limited to 'drivers/mmc/core/core.h')
-rw-r--r--drivers/mmc/core/core.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
index 37091a6589ed..fc9c066e6468 100644
--- a/drivers/mmc/core/core.h
+++ b/drivers/mmc/core/core.h
@@ -81,6 +81,7 @@ int mmc_detect_card_removed(struct mmc_host *host);
int mmc_attach_mmc(struct mmc_host *host);
int mmc_attach_sd(struct mmc_host *host);
int mmc_attach_sdio(struct mmc_host *host);
+int mmc_attach_sd_uhs2(struct mmc_host *host);
/* Module parameters */
extern bool use_spi_crc;
@@ -116,15 +117,13 @@ bool mmc_is_req_done(struct mmc_host *host, struct mmc_request *mrq);
int mmc_start_request(struct mmc_host *host, struct mmc_request *mrq);
-int mmc_erase(struct mmc_card *card, unsigned int from, unsigned int nr,
- unsigned int arg);
+int mmc_erase(struct mmc_card *card, sector_t from, unsigned int nr, unsigned int arg);
int mmc_can_erase(struct mmc_card *card);
int mmc_can_trim(struct mmc_card *card);
int mmc_can_discard(struct mmc_card *card);
int mmc_can_sanitize(struct mmc_card *card);
int mmc_can_secure_erase_trim(struct mmc_card *card);
-int mmc_erase_group_aligned(struct mmc_card *card, unsigned int from,
- unsigned int nr);
+int mmc_erase_group_aligned(struct mmc_card *card, sector_t from, unsigned int nr);
unsigned int mmc_calc_max_discard(struct mmc_card *card);
int mmc_set_blocklen(struct mmc_card *card, unsigned int blocklen);
@@ -199,4 +198,14 @@ static inline int mmc_flush_cache(struct mmc_host *host)
return 0;
}
+static inline unsigned int mmc_sector_div(sector_t dividend, u32 divisor)
+{
+ return div_u64(dividend, divisor);
+}
+
+static inline unsigned int mmc_sector_mod(sector_t dividend, u32 divisor)
+{
+ return sector_div(dividend, divisor);
+}
+
#endif