diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mmc/card.h | 2 | ||||
| -rw-r--r-- | include/linux/mmc/core.h | 7 | ||||
| -rw-r--r-- | include/linux/mmc/host.h | 22 |
3 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 9885e75d196b..e7fdaff68d7e 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -358,6 +358,7 @@ struct mmc_card { struct notifier_block reboot_notify; bool issue_long_pon; u8 *cached_ext_csd; + bool cmdq_init; }; /* @@ -613,4 +614,5 @@ extern struct mmc_wr_pack_stats *mmc_blk_get_packed_statistics( struct mmc_card *card); extern void mmc_blk_init_packed_statistics(struct mmc_card *card); extern int mmc_send_long_pon(struct mmc_card *card); +extern void mmc_blk_cmdq_req_done(struct mmc_request *mrq); #endif /* LINUX_MMC_CARD_H */ diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 07f96aa5ff6b..8139a58e6d8e 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -108,11 +108,18 @@ struct mmc_request { struct completion completion; void (*done)(struct mmc_request *);/* completion function */ struct mmc_host *host; + struct mmc_cmdq_req *cmdq_req; struct request *req; }; struct mmc_card; struct mmc_async_req; +struct mmc_cmdq_req; + +extern void mmc_cmdq_post_req(struct mmc_host *host, struct mmc_request *mrq, + int err); +extern int mmc_cmdq_start_req(struct mmc_host *host, + struct mmc_cmdq_req *cmdq_req); extern int mmc_stop_bkops(struct mmc_card *); extern int mmc_read_bkops_status(struct mmc_card *); diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index a2fbb73996a7..12b8d5505985 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -91,6 +91,9 @@ enum mmc_load { struct mmc_cmdq_host_ops { int (*enable)(struct mmc_host *host); void (*disable)(struct mmc_host *host, bool soft); + int (*request)(struct mmc_host *host, struct mmc_request *mrq); + void (*post_req)(struct mmc_host *host, struct mmc_request *mrq, + int err); }; struct mmc_host_ops { @@ -174,6 +177,25 @@ struct mmc_host_ops { struct mmc_card; struct device; +struct mmc_cmdq_req { + unsigned int cmd_flags; + u32 blk_addr; + /* active mmc request */ + struct mmc_request mrq; + struct mmc_data data; + struct mmc_command cmd; +#define DCMD (1 << 0) +#define QBR (1 << 1) +#define DIR (1 << 2) +#define PRIO (1 << 3) +#define REL_WR (1 << 4) +#define DAT_TAG (1 << 5) +#define FORCED_PRG (1 << 6) + unsigned int cmdq_req_flags; + int tag; /* used for command queuing */ + u8 ctx_id; +}; + struct mmc_async_req { /* active mmc request */ struct mmc_request *mrq; |
