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>
This commit is contained in:
Maya Erez 2013-04-18 15:41:55 +03:00 committed by Chris Ball
parent b689167984
commit 775a9362b5
6 changed files with 72 additions and 22 deletions

View file

@ -96,6 +96,8 @@ struct mmc_command {
*/
unsigned int cmd_timeout_ms; /* in milliseconds */
/* Set this flag only for blocking sanitize request */
bool sanitize_busy;
struct mmc_data *data; /* data segment associated with cmd */
struct mmc_request *mrq; /* associated request */