diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2012-02-29 02:17:21 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-03-27 12:20:03 -0400 |
commit | 907d2e7cc7ebba4ab398422a7f0435e1802be65b (patch) | |
tree | 40e51b724bf01a9a507c83c2f1152ec67d5c9a7e /include/linux | |
parent | 4b1a61705a563edb951b8fd9734bcb14286a7888 (diff) |
mmc: start removing enable / disable API
Most parts of the enable / disable API are no longer used and
can be removed.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mmc/core.h | 1 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 46 |
2 files changed, 4 insertions, 43 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 87a976cc5654..2bfa589764de 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
@@ -175,7 +175,6 @@ extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int); | |||
175 | 175 | ||
176 | extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); | 176 | extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); |
177 | extern void mmc_release_host(struct mmc_host *host); | 177 | extern void mmc_release_host(struct mmc_host *host); |
178 | extern void mmc_do_release_host(struct mmc_host *host); | ||
179 | extern int mmc_try_claim_host(struct mmc_host *host); | 178 | extern int mmc_try_claim_host(struct mmc_host *host); |
180 | 179 | ||
181 | extern int mmc_flush_cache(struct mmc_card *); | 180 | extern int mmc_flush_cache(struct mmc_card *); |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index d1d3743fde90..e05bd241c676 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -80,34 +80,11 @@ struct mmc_ios { | |||
80 | 80 | ||
81 | struct mmc_host_ops { | 81 | struct mmc_host_ops { |
82 | /* | 82 | /* |
83 | * Hosts that support power saving can use the 'enable' and 'disable' | 83 | * 'enable' is called when the host is claimed and 'disable' is called |
84 | * methods to exit and enter power saving states. 'enable' is called | 84 | * when the host is released. 'enable' and 'disable' are deprecated. |
85 | * when the host is claimed and 'disable' is called (or scheduled with | ||
86 | * a delay) when the host is released. The 'disable' is scheduled if | ||
87 | * the disable delay set by 'mmc_set_disable_delay()' is non-zero, | ||
88 | * otherwise 'disable' is called immediately. 'disable' may be | ||
89 | * scheduled repeatedly, to permit ever greater power saving at the | ||
90 | * expense of ever greater latency to re-enable. Rescheduling is | ||
91 | * determined by the return value of the 'disable' method. A positive | ||
92 | * value gives the delay in milliseconds. | ||
93 | * | ||
94 | * In the case where a host function (like set_ios) may be called | ||
95 | * with or without the host claimed, enabling and disabling can be | ||
96 | * done directly and will nest correctly. Call 'mmc_host_enable()' and | ||
97 | * 'mmc_host_lazy_disable()' for this purpose, but note that these | ||
98 | * functions must be paired. | ||
99 | * | ||
100 | * Alternatively, 'mmc_host_enable()' may be paired with | ||
101 | * 'mmc_host_disable()' which calls 'disable' immediately. In this | ||
102 | * case the 'disable' method will be called with 'lazy' set to 0. | ||
103 | * This is mainly useful for error paths. | ||
104 | * | ||
105 | * Because lazy disable may be called from a work queue, the 'disable' | ||
106 | * method must claim the host when 'lazy' != 0, which will work | ||
107 | * correctly because recursion is detected and handled. | ||
108 | */ | 85 | */ |
109 | int (*enable)(struct mmc_host *host); | 86 | int (*enable)(struct mmc_host *host); |
110 | int (*disable)(struct mmc_host *host, int lazy); | 87 | int (*disable)(struct mmc_host *host); |
111 | /* | 88 | /* |
112 | * It is optional for the host to implement pre_req and post_req in | 89 | * It is optional for the host to implement pre_req and post_req in |
113 | * order to support double buffering of requests (prepare one | 90 | * order to support double buffering of requests (prepare one |
@@ -218,7 +195,7 @@ struct mmc_host { | |||
218 | #define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */ | 195 | #define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */ |
219 | #define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */ | 196 | #define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */ |
220 | #define MMC_CAP_8_BIT_DATA (1 << 6) /* Can the host do 8 bit transfers */ | 197 | #define MMC_CAP_8_BIT_DATA (1 << 6) /* Can the host do 8 bit transfers */ |
221 | #define MMC_CAP_DISABLE (1 << 7) /* Can the host be disabled */ | 198 | |
222 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ | 199 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ |
223 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ | 200 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ |
224 | #define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */ | 201 | #define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */ |
@@ -301,13 +278,7 @@ struct mmc_host { | |||
301 | unsigned int removed:1; /* host is being removed */ | 278 | unsigned int removed:1; /* host is being removed */ |
302 | #endif | 279 | #endif |
303 | 280 | ||
304 | /* Only used with MMC_CAP_DISABLE */ | ||
305 | int enabled; /* host is enabled */ | ||
306 | int rescan_disable; /* disable card detection */ | 281 | int rescan_disable; /* disable card detection */ |
307 | int nesting_cnt; /* "enable" nesting count */ | ||
308 | int en_dis_recurs; /* detect recursion */ | ||
309 | unsigned int disable_delay; /* disable delay in msecs */ | ||
310 | struct delayed_work disable; /* disabling work */ | ||
311 | 282 | ||
312 | struct mmc_card *card; /* device attached to this host */ | 283 | struct mmc_card *card; /* device attached to this host */ |
313 | 284 | ||
@@ -407,17 +378,8 @@ int mmc_card_awake(struct mmc_host *host); | |||
407 | int mmc_card_sleep(struct mmc_host *host); | 378 | int mmc_card_sleep(struct mmc_host *host); |
408 | int mmc_card_can_sleep(struct mmc_host *host); | 379 | int mmc_card_can_sleep(struct mmc_host *host); |
409 | 380 | ||
410 | int mmc_host_enable(struct mmc_host *host); | ||
411 | int mmc_host_disable(struct mmc_host *host); | ||
412 | int mmc_host_lazy_disable(struct mmc_host *host); | ||
413 | int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); | 381 | int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); |
414 | 382 | ||
415 | static inline void mmc_set_disable_delay(struct mmc_host *host, | ||
416 | unsigned int disable_delay) | ||
417 | { | ||
418 | host->disable_delay = disable_delay; | ||
419 | } | ||
420 | |||
421 | /* Module parameter */ | 383 | /* Module parameter */ |
422 | extern bool mmc_assume_removable; | 384 | extern bool mmc_assume_removable; |
423 | 385 | ||