aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mmc/card.h3
-rw-r--r--include/linux/mmc/core.h2
-rw-r--r--include/linux/mmc/host.h1
3 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 534974c3ef0c..6402d9224d6a 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -209,6 +209,7 @@ struct mmc_card {
209#define MMC_STATE_HIGHSPEED_DDR (1<<4) /* card is in high speed mode */ 209#define MMC_STATE_HIGHSPEED_DDR (1<<4) /* card is in high speed mode */
210#define MMC_STATE_ULTRAHIGHSPEED (1<<5) /* card is in ultra high speed mode */ 210#define MMC_STATE_ULTRAHIGHSPEED (1<<5) /* card is in ultra high speed mode */
211#define MMC_CARD_SDXC (1<<6) /* card is SDXC */ 211#define MMC_CARD_SDXC (1<<6) /* card is SDXC */
212#define MMC_CARD_REMOVED (1<<7) /* card has been removed */
212 unsigned int quirks; /* card quirks */ 213 unsigned int quirks; /* card quirks */
213#define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ 214#define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */
214#define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */ 215#define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */
@@ -370,6 +371,7 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data)
370#define mmc_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED) 371#define mmc_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED)
371#define mmc_sd_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED) 372#define mmc_sd_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED)
372#define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC) 373#define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC)
374#define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED))
373 375
374#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) 376#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT)
375#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) 377#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY)
@@ -379,6 +381,7 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data)
379#define mmc_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED) 381#define mmc_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED)
380#define mmc_sd_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED) 382#define mmc_sd_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED)
381#define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC) 383#define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC)
384#define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED)
382 385
383/* 386/*
384 * Quirk add/remove for MMC products. 387 * Quirk add/remove for MMC products.
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 174a844a5dda..87a976cc5654 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -180,6 +180,8 @@ extern int mmc_try_claim_host(struct mmc_host *host);
180 180
181extern int mmc_flush_cache(struct mmc_card *); 181extern int mmc_flush_cache(struct mmc_card *);
182 182
183extern int mmc_detect_card_removed(struct mmc_host *host);
184
183/** 185/**
184 * mmc_claim_host - exclusively claim a host 186 * mmc_claim_host - exclusively claim a host
185 * @host: mmc host to claim 187 * @host: mmc host to claim
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 706f72279a17..9a03d0335745 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -299,6 +299,7 @@ struct mmc_host {
299 int claim_cnt; /* "claim" nesting count */ 299 int claim_cnt; /* "claim" nesting count */
300 300
301 struct delayed_work detect; 301 struct delayed_work detect;
302 int detect_change; /* card detect flag */
302 303
303 const struct mmc_bus_ops *bus_ops; /* current bus driver */ 304 const struct mmc_bus_ops *bus_ops; /* current bus driver */
304 unsigned int bus_refs; /* reference counter */ 305 unsigned int bus_refs; /* reference counter */