aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorMaya Erez <merez@codeaurora.org>2013-04-18 08:41:55 -0400
committerChris Ball <cjb@laptop.org>2013-05-26 14:23:13 -0400
commit775a9362b5d7e006ff6bbec5cb9c9c9d5a751696 (patch)
tree78d66b7a04b5e339c2e0faa24290f72eb8f8bae4 /include/linux/mmc
parentb689167984bc14ed06c8bcff52ef5eb1fd9cf83b (diff)
mmc: card: Adding support for sanitize in eMMC 4.5
The sanitize support is added as a user-app ioctl call, and was removed from the block-device request, since its purpose is to be invoked not via File-System but by a user. This feature deletes the unmap memory region of the eMMC card, by writing to a specific register in the EXT_CSD. unmap region is the memory region that was previously deleted (by erase, trim or discard operation). In order to avoid timeout when sanitizing large-scale cards, the timeout for sanitize operation is 240 seconds. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/core.h2
-rw-r--r--include/linux/mmc/host.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 39613b9a6fc5..bd06ff566bfc 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -96,6 +96,8 @@ struct mmc_command {
96 */ 96 */
97 97
98 unsigned int cmd_timeout_ms; /* in milliseconds */ 98 unsigned int cmd_timeout_ms; /* in milliseconds */
99 /* Set this flag only for blocking sanitize request */
100 bool sanitize_busy;
99 101
100 struct mmc_data *data; /* data segment associated with cmd */ 102 struct mmc_data *data; /* data segment associated with cmd */
101 struct mmc_request *mrq; /* associated request */ 103 struct mmc_request *mrq; /* associated request */
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 38f60a97b218..6f3851533de0 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -280,6 +280,7 @@ struct mmc_host {
280#define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \ 280#define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \
281 MMC_CAP2_PACKED_WR) 281 MMC_CAP2_PACKED_WR)
282#define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */ 282#define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */
283#define MMC_CAP2_SANITIZE (1 << 15) /* Support Sanitize */
283 284
284 mmc_pm_flag_t pm_caps; /* supported pm features */ 285 mmc_pm_flag_t pm_caps; /* supported pm features */
285 286