summaryrefslogtreecommitdiff
path: root/drivers/mmc/card/queue.h
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2016-12-08 13:23:49 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2016-12-12 18:30:05 +0300
commitf397c8d80a5e413984bd9ccdf4161c7156b365ce (patch)
tree9767f0418fe8ef53d6571fefc8b7b53558b7fce0 /drivers/mmc/card/queue.h
parentff6af28faff53a7389230026b83e543385f7b21d (diff)
downloadlinux-f397c8d80a5e413984bd9ccdf4161c7156b365ce.tar.xz
mmc: block: Move files to core
Once upon a time it made sense to keep the mmc block device driver and its related code, in its own directory called card. Over time, more an more functions/structures have become shared through generic mmc header files, between the core and the card directory. In other words, the relationship between them has become closer. By sharing functions/structures via generic header files, it becomes easy for outside users to abuse them. In a way to avoid that from happen, let's move the files from card directory into the core directory, as it enables us to move definitions of functions/structures into mmc core specific header files. Note, this is only the first step in providing a cleaner mmc interface for outside users. Following changes will do the actual cleanup, as that is not part of this change. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/mmc/card/queue.h')
-rw-r--r--drivers/mmc/card/queue.h64
1 files changed, 0 insertions, 64 deletions
diff --git a/drivers/mmc/card/queue.h b/drivers/mmc/card/queue.h
deleted file mode 100644
index dac8c3d010dd..000000000000
--- a/drivers/mmc/card/queue.h
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef MMC_QUEUE_H
-#define MMC_QUEUE_H
-
-static inline bool mmc_req_is_special(struct request *req)
-{
- return req &&
- (req_op(req) == REQ_OP_FLUSH ||
- req_op(req) == REQ_OP_DISCARD ||
- req_op(req) == REQ_OP_SECURE_ERASE);
-}
-
-struct request;
-struct task_struct;
-struct mmc_blk_data;
-
-struct mmc_blk_request {
- struct mmc_request mrq;
- struct mmc_command sbc;
- struct mmc_command cmd;
- struct mmc_command stop;
- struct mmc_data data;
- int retune_retry_done;
-};
-
-struct mmc_queue_req {
- struct request *req;
- struct mmc_blk_request brq;
- struct scatterlist *sg;
- char *bounce_buf;
- struct scatterlist *bounce_sg;
- unsigned int bounce_sg_len;
- struct mmc_async_req mmc_active;
-};
-
-struct mmc_queue {
- struct mmc_card *card;
- struct task_struct *thread;
- struct semaphore thread_sem;
- unsigned int flags;
-#define MMC_QUEUE_SUSPENDED (1 << 0)
-#define MMC_QUEUE_NEW_REQUEST (1 << 1)
- bool asleep;
- struct mmc_blk_data *blkdata;
- struct request_queue *queue;
- struct mmc_queue_req *mqrq;
- struct mmc_queue_req *mqrq_cur;
- struct mmc_queue_req *mqrq_prev;
- int qdepth;
-};
-
-extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *,
- const char *);
-extern void mmc_cleanup_queue(struct mmc_queue *);
-extern void mmc_queue_suspend(struct mmc_queue *);
-extern void mmc_queue_resume(struct mmc_queue *);
-
-extern unsigned int mmc_queue_map_sg(struct mmc_queue *,
- struct mmc_queue_req *);
-extern void mmc_queue_bounce_pre(struct mmc_queue_req *);
-extern void mmc_queue_bounce_post(struct mmc_queue_req *);
-
-extern int mmc_access_rpmb(struct mmc_queue *);
-
-#endif