summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2011-06-28 17:16:02 +0300
committerTony Lin <tony.lin@freescale.com>2012-03-01 14:45:08 +0800
commitf0706c0df00a86babb3a2064749b7d4a46b89eb9 (patch)
tree6e03a464c2328b52bf329e2537e728588af8b7bd /include
parentfdc7146f9f6dea954cf81e94fd24381c8efcf99c (diff)
mmc: queue: let host controllers specify maximum discard timeout
Some host controllers will not operate without a hardware timeout that is limited in value. However large discards require large timeouts, so there needs to be a way to specify the maximum discard size. A host controller driver may now specify the maximum discard timeout possible so that max_discard_sectors can be calculated. However, for eMMC when the High Capacity Erase Group Size is not in use, the timeout calculation depends on clock rate which may change. For that case Preferred Erase Size is used instead. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/core.h1
-rw-r--r--include/linux/mmc/host.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 1b5a49678045..1b1d92dff892 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -159,6 +159,7 @@ extern int mmc_can_trim(struct mmc_card *card);
extern int mmc_can_secure_erase_trim(struct mmc_card *card);
extern int mmc_erase_group_aligned(struct mmc_card *card, unsigned int from,
unsigned int nr);
+extern unsigned int mmc_calc_max_discard(struct mmc_card *card);
extern int mmc_set_blocklen(struct mmc_card *card, unsigned int blocklen);
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 42734dee9aba..e69656629a99 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -256,6 +256,8 @@ struct mmc_host {
unsigned int tuning_min;
unsigned int tuning_max;
unsigned int tuning_step;
+ unsigned int max_discard_to; /* max. discard timeout in ms */
+
/* private data */
spinlock_t lock; /* lock for claim and bus ops */