summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAsutosh Das <asutoshd@codeaurora.org>2015-05-21 13:29:51 +0530
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:26:26 -0700
commit6d1be7e42b9e5f2dbdf6e8c1909c20cdfa6edc02 (patch)
tree063cbe0234835ebafe5013831588e9a76c1221e2 /include/linux
parent534f1ea89d21d8831a60c822a153967d3189dd5b (diff)
mmc: queue: initialization of command queue
Command Queueing (CQ) feature is introduced to eMMC standard in revision 5.1. CQ includes new commands for issuing tasks to the device, for ordering the execution of previously issued tasks and for additional task management functions. The idea is to keep the legacy and CQ code as discrete as possible. Hence, a separate queue is created for CQ. The issuing path is non-blocking since several requests (max. 32) can be queued at a time. Change-Id: I5b48d1b3ed17585b907ec70ff7c8d583003ec9e1 Signed-off-by: Asutosh Das <asutoshd@codeaurora.org> Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org> [subhashj@codeaurora.org: fixed trivial merge conflicts & compilation error] Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mmc/host.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 5afbac264ddd..2324a76123cf 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -195,6 +195,23 @@ struct mmc_slot {
void *handler_priv;
};
+
+/**
+ * mmc_cmdq_context_info - describes the contexts of cmdq
+ * @active_reqs requests being processed
+ * @curr_state state of cmdq engine
+ * @req_starved completion should invoke the request_fn since
+ * no tags were available
+ * @cmdq_ctx_lock acquire this before accessing this structure
+ */
+struct mmc_cmdq_context_info {
+ unsigned long active_reqs; /* in-flight requests */
+ unsigned long curr_state;
+#define CMDQ_STATE_ERR 0
+ /* no free tag available */
+ unsigned long req_starved;
+};
+
/**
* mmc_context_info - synchronization details for mmc context
* @is_done_rcv wake up reason was done request
@@ -370,6 +387,7 @@ struct mmc_host {
/* Some hosts need additional tuning */
#define MMC_CAP2_HS400_POST_TUNING (1 << 22)
#define MMC_CAP2_NONHOTPLUG (1 << 25) /*Don't support hotplug*/
+#define MMC_CAP2_CMD_QUEUE (1 << 26) /* support eMMC command queue */
mmc_pm_flag_t pm_caps; /* supported pm features */
@@ -492,6 +510,7 @@ struct mmc_host {
#endif
enum dev_state dev_status;
bool wakeup_on_idle;
+ struct mmc_cmdq_context_info cmdq_ctx;
unsigned long private[0] ____cacheline_aligned;
};