diff options
Diffstat (limited to 'include/linux/mmc/host.h')
-rw-r--r-- | include/linux/mmc/host.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 1ee4424462eb..0f83858147a6 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -106,6 +106,15 @@ struct mmc_host_ops { | |||
106 | */ | 106 | */ |
107 | int (*enable)(struct mmc_host *host); | 107 | int (*enable)(struct mmc_host *host); |
108 | int (*disable)(struct mmc_host *host, int lazy); | 108 | int (*disable)(struct mmc_host *host, int lazy); |
109 | /* | ||
110 | * It is optional for the host to implement pre_req and post_req in | ||
111 | * order to support double buffering of requests (prepare one | ||
112 | * request while another request is active). | ||
113 | */ | ||
114 | void (*post_req)(struct mmc_host *host, struct mmc_request *req, | ||
115 | int err); | ||
116 | void (*pre_req)(struct mmc_host *host, struct mmc_request *req, | ||
117 | bool is_first_req); | ||
109 | void (*request)(struct mmc_host *host, struct mmc_request *req); | 118 | void (*request)(struct mmc_host *host, struct mmc_request *req); |
110 | /* | 119 | /* |
111 | * Avoid calling these three functions too often or in a "fast path", | 120 | * Avoid calling these three functions too often or in a "fast path", |
@@ -139,11 +148,22 @@ struct mmc_host_ops { | |||
139 | int (*start_signal_voltage_switch)(struct mmc_host *host, struct mmc_ios *ios); | 148 | int (*start_signal_voltage_switch)(struct mmc_host *host, struct mmc_ios *ios); |
140 | int (*execute_tuning)(struct mmc_host *host); | 149 | int (*execute_tuning)(struct mmc_host *host); |
141 | void (*enable_preset_value)(struct mmc_host *host, bool enable); | 150 | void (*enable_preset_value)(struct mmc_host *host, bool enable); |
151 | int (*select_drive_strength)(unsigned int max_dtr, int host_drv, int card_drv); | ||
142 | }; | 152 | }; |
143 | 153 | ||
144 | struct mmc_card; | 154 | struct mmc_card; |
145 | struct device; | 155 | struct device; |
146 | 156 | ||
157 | struct mmc_async_req { | ||
158 | /* active mmc request */ | ||
159 | struct mmc_request *mrq; | ||
160 | /* | ||
161 | * Check error status of completed mmc request. | ||
162 | * Returns 0 if success otherwise non zero. | ||
163 | */ | ||
164 | int (*err_check) (struct mmc_card *, struct mmc_async_req *); | ||
165 | }; | ||
166 | |||
147 | struct mmc_host { | 167 | struct mmc_host { |
148 | struct device *parent; | 168 | struct device *parent; |
149 | struct device class_dev; | 169 | struct device class_dev; |
@@ -231,6 +251,7 @@ struct mmc_host { | |||
231 | unsigned int max_req_size; /* maximum number of bytes in one req */ | 251 | unsigned int max_req_size; /* maximum number of bytes in one req */ |
232 | unsigned int max_blk_size; /* maximum size of one mmc block */ | 252 | unsigned int max_blk_size; /* maximum size of one mmc block */ |
233 | unsigned int max_blk_count; /* maximum number of blocks in one req */ | 253 | unsigned int max_blk_count; /* maximum number of blocks in one req */ |
254 | unsigned int max_discard_to; /* max. discard timeout in ms */ | ||
234 | 255 | ||
235 | /* private data */ | 256 | /* private data */ |
236 | spinlock_t lock; /* lock for claim and bus ops */ | 257 | spinlock_t lock; /* lock for claim and bus ops */ |
@@ -281,6 +302,8 @@ struct mmc_host { | |||
281 | 302 | ||
282 | struct dentry *debugfs_root; | 303 | struct dentry *debugfs_root; |
283 | 304 | ||
305 | struct mmc_async_req *areq; /* active async req */ | ||
306 | |||
284 | unsigned long private[0] ____cacheline_aligned; | 307 | unsigned long private[0] ____cacheline_aligned; |
285 | }; | 308 | }; |
286 | 309 | ||
@@ -373,5 +396,4 @@ static inline int mmc_host_cmd23(struct mmc_host *host) | |||
373 | { | 396 | { |
374 | return host->caps & MMC_CAP_CMD23; | 397 | return host->caps & MMC_CAP_CMD23; |
375 | } | 398 | } |
376 | #endif | 399 | #endif /* LINUX_MMC_HOST_H */ |
377 | |||