diff options
-rw-r--r-- | drivers/mmc/core/core.c | 31 | ||||
-rw-r--r-- | drivers/mmc/core/host.c | 7 | ||||
-rw-r--r-- | drivers/mmc/core/sd_ops.c | 2 | ||||
-rw-r--r-- | include/linux/mmc/core.h | 2 |
4 files changed, 27 insertions, 15 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index b5d8a6d90cca..e08aa352bd50 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -140,7 +140,16 @@ static void mmc_wait_done(struct mmc_request *mrq) | |||
140 | complete(mrq->done_data); | 140 | complete(mrq->done_data); |
141 | } | 141 | } |
142 | 142 | ||
143 | int mmc_wait_for_req(struct mmc_host *host, struct mmc_request *mrq) | 143 | /** |
144 | * mmc_wait_for_req - start a request and wait for completion | ||
145 | * @host: MMC host to start command | ||
146 | * @mrq: MMC request to start | ||
147 | * | ||
148 | * Start a new MMC custom command request for a host, and wait | ||
149 | * for the command to complete. Does not attempt to parse the | ||
150 | * response. | ||
151 | */ | ||
152 | void mmc_wait_for_req(struct mmc_host *host, struct mmc_request *mrq) | ||
144 | { | 153 | { |
145 | DECLARE_COMPLETION_ONSTACK(complete); | 154 | DECLARE_COMPLETION_ONSTACK(complete); |
146 | 155 | ||
@@ -150,8 +159,6 @@ int mmc_wait_for_req(struct mmc_host *host, struct mmc_request *mrq) | |||
150 | mmc_start_request(host, mrq); | 159 | mmc_start_request(host, mrq); |
151 | 160 | ||
152 | wait_for_completion(&complete); | 161 | wait_for_completion(&complete); |
153 | |||
154 | return 0; | ||
155 | } | 162 | } |
156 | 163 | ||
157 | EXPORT_SYMBOL(mmc_wait_for_req); | 164 | EXPORT_SYMBOL(mmc_wait_for_req); |
@@ -192,6 +199,9 @@ EXPORT_SYMBOL(mmc_wait_for_cmd); | |||
192 | * @data: data phase for command | 199 | * @data: data phase for command |
193 | * @card: the MMC card associated with the data transfer | 200 | * @card: the MMC card associated with the data transfer |
194 | * @write: flag to differentiate reads from writes | 201 | * @write: flag to differentiate reads from writes |
202 | * | ||
203 | * Computes the data timeout parameters according to the | ||
204 | * correct algorithm given the card type. | ||
195 | */ | 205 | */ |
196 | void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card, | 206 | void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card, |
197 | int write) | 207 | int write) |
@@ -240,15 +250,10 @@ void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card, | |||
240 | EXPORT_SYMBOL(mmc_set_data_timeout); | 250 | EXPORT_SYMBOL(mmc_set_data_timeout); |
241 | 251 | ||
242 | /** | 252 | /** |
243 | * __mmc_claim_host - exclusively claim a host | 253 | * mmc_claim_host - exclusively claim a host |
244 | * @host: mmc host to claim | 254 | * @host: mmc host to claim |
245 | * @card: mmc card to claim host for | ||
246 | * | ||
247 | * Claim a host for a set of operations. If a valid card | ||
248 | * is passed and this wasn't the last card selected, select | ||
249 | * the card before returning. | ||
250 | * | 255 | * |
251 | * Note: you should use mmc_card_claim_host or mmc_claim_host. | 256 | * Claim a host for a set of operations. |
252 | */ | 257 | */ |
253 | void mmc_claim_host(struct mmc_host *host) | 258 | void mmc_claim_host(struct mmc_host *host) |
254 | { | 259 | { |
@@ -498,8 +503,10 @@ void __mmc_release_bus(struct mmc_host *host) | |||
498 | * @host: host which changed state. | 503 | * @host: host which changed state. |
499 | * @delay: optional delay to wait before detection (jiffies) | 504 | * @delay: optional delay to wait before detection (jiffies) |
500 | * | 505 | * |
501 | * All we know is that card(s) have been inserted or removed | 506 | * MMC drivers should call this when they detect a card has been |
502 | * from the socket(s). We don't know which socket or cards. | 507 | * inserted or removed. The MMC layer will confirm that any |
508 | * present card is still functional, and initialize any newly | ||
509 | * inserted. | ||
503 | */ | 510 | */ |
504 | void mmc_detect_change(struct mmc_host *host, unsigned long delay) | 511 | void mmc_detect_change(struct mmc_host *host, unsigned long delay) |
505 | { | 512 | { |
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 1433d95c40bb..6a7e29849603 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c | |||
@@ -93,6 +93,10 @@ EXPORT_SYMBOL(mmc_alloc_host); | |||
93 | /** | 93 | /** |
94 | * mmc_add_host - initialise host hardware | 94 | * mmc_add_host - initialise host hardware |
95 | * @host: mmc host | 95 | * @host: mmc host |
96 | * | ||
97 | * Register the host with the driver model. The host must be | ||
98 | * prepared to start servicing requests before this function | ||
99 | * completes. | ||
96 | */ | 100 | */ |
97 | int mmc_add_host(struct mmc_host *host) | 101 | int mmc_add_host(struct mmc_host *host) |
98 | { | 102 | { |
@@ -126,7 +130,8 @@ EXPORT_SYMBOL(mmc_add_host); | |||
126 | * @host: mmc host | 130 | * @host: mmc host |
127 | * | 131 | * |
128 | * Unregister and remove all cards associated with this host, | 132 | * Unregister and remove all cards associated with this host, |
129 | * and power down the MMC bus. | 133 | * and power down the MMC bus. No new requests will be issued |
134 | * after this function has returned. | ||
130 | */ | 135 | */ |
131 | void mmc_remove_host(struct mmc_host *host) | 136 | void mmc_remove_host(struct mmc_host *host) |
132 | { | 137 | { |
diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c index 848b5f5c2344..ee9a1b9f5998 100644 --- a/drivers/mmc/core/sd_ops.c +++ b/drivers/mmc/core/sd_ops.c | |||
@@ -25,7 +25,7 @@ | |||
25 | * mmc_wait_for_app_cmd - start an application command and wait for | 25 | * mmc_wait_for_app_cmd - start an application command and wait for |
26 | completion | 26 | completion |
27 | * @host: MMC host to start command | 27 | * @host: MMC host to start command |
28 | * @rca: RCA to send MMC_APP_CMD to | 28 | * @card: Card to send MMC_APP_CMD to |
29 | * @cmd: MMC command to start | 29 | * @cmd: MMC command to start |
30 | * @retries: maximum number of retries | 30 | * @retries: maximum number of retries |
31 | * | 31 | * |
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 04bbe12fae8d..63a80ea61124 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
@@ -99,7 +99,7 @@ struct mmc_request { | |||
99 | struct mmc_host; | 99 | struct mmc_host; |
100 | struct mmc_card; | 100 | struct mmc_card; |
101 | 101 | ||
102 | extern int mmc_wait_for_req(struct mmc_host *, struct mmc_request *); | 102 | extern void mmc_wait_for_req(struct mmc_host *, struct mmc_request *); |
103 | extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); | 103 | extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); |
104 | extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *, | 104 | extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *, |
105 | struct mmc_command *, int); | 105 | struct mmc_command *, int); |