/drivers/mmc/core/ |
D | core.c | 83 struct mmc_request *mrq) in mmc_should_fail_request() argument 85 struct mmc_command *cmd = mrq->cmd; in mmc_should_fail_request() 86 struct mmc_data *data = mrq->data; in mmc_should_fail_request() 107 struct mmc_request *mrq) in mmc_should_fail_request() argument 113 static inline void mmc_complete_cmd(struct mmc_request *mrq) in mmc_complete_cmd() argument 115 if (mrq->cap_cmd_during_tfr && !completion_done(&mrq->cmd_completion)) in mmc_complete_cmd() 116 complete_all(&mrq->cmd_completion); in mmc_complete_cmd() 119 void mmc_command_done(struct mmc_host *host, struct mmc_request *mrq) in mmc_command_done() argument 121 if (!mrq->cap_cmd_during_tfr) in mmc_command_done() 124 mmc_complete_cmd(mrq); in mmc_command_done() [all …]
|
D | mmc_test.c | 191 struct mmc_request *mrq, unsigned int blocks) in mmc_test_prepare_sbc() argument 195 if (!mrq->sbc || !mmc_host_cmd23(card->host) || in mmc_test_prepare_sbc() 196 !mmc_test_card_cmd23(card) || !mmc_op_multi(mrq->cmd->opcode) || in mmc_test_prepare_sbc() 198 mrq->sbc = NULL; in mmc_test_prepare_sbc() 202 mrq->sbc->opcode = MMC_SET_BLOCK_COUNT; in mmc_test_prepare_sbc() 203 mrq->sbc->arg = blocks; in mmc_test_prepare_sbc() 204 mrq->sbc->flags = MMC_RSP_R1 | MMC_CMD_AC; in mmc_test_prepare_sbc() 211 struct mmc_request *mrq, struct scatterlist *sg, unsigned sg_len, in mmc_test_prepare_mrq() argument 214 if (WARN_ON(!mrq || !mrq->cmd || !mrq->data || !mrq->stop)) in mmc_test_prepare_mrq() 218 mrq->cmd->opcode = write ? in mmc_test_prepare_mrq() [all …]
|
D | sd_ops.c | 55 struct mmc_request mrq = {}; in mmc_wait_for_app_cmd() local 73 memset(&mrq, 0, sizeof(struct mmc_request)); in mmc_wait_for_app_cmd() 78 mrq.cmd = cmd; in mmc_wait_for_app_cmd() 81 mmc_wait_for_req(host, &mrq); in mmc_wait_for_app_cmd() 259 struct mmc_request mrq = {}; in mmc_app_send_scr() local 278 mrq.cmd = &cmd; in mmc_app_send_scr() 279 mrq.data = &data; in mmc_app_send_scr() 295 mmc_wait_for_req(card->host, &mrq); in mmc_app_send_scr() 330 struct mmc_request mrq = {}; in mmc_app_sd_status() local 341 mrq.cmd = &cmd; in mmc_app_sd_status() [all …]
|
D | core.h | 99 void mmc_wait_for_req_done(struct mmc_host *host, struct mmc_request *mrq); 100 bool mmc_is_req_done(struct mmc_host *host, struct mmc_request *mrq); 102 int mmc_start_request(struct mmc_host *host, struct mmc_request *mrq); 136 int mmc_cqe_start_req(struct mmc_host *host, struct mmc_request *mrq); 137 void mmc_cqe_post_req(struct mmc_host *host, struct mmc_request *mrq); 149 static inline void mmc_pre_req(struct mmc_host *host, struct mmc_request *mrq) in mmc_pre_req() argument 152 host->ops->pre_req(host, mrq); in mmc_pre_req() 164 static inline void mmc_post_req(struct mmc_host *host, struct mmc_request *mrq, in mmc_post_req() argument 168 host->ops->post_req(host, mrq, err); in mmc_post_req()
|
D | block.c | 183 static void mmc_blk_hsq_req_done(struct mmc_request *mrq); 477 struct mmc_request mrq = {}; in __mmc_blk_ioctl_cmd() local 544 mrq.data = &data; in __mmc_blk_ioctl_cmd() 547 mrq.cmd = &cmd; in __mmc_blk_ioctl_cmd() 570 mrq.sbc = &sbc; in __mmc_blk_ioctl_cmd() 577 mmc_wait_for_req(card->host, &mrq); in __mmc_blk_ioctl_cmd() 939 struct mmc_request mrq = {}; in mmc_sd_num_wr_blocks() local 968 mrq.cmd = &cmd; in mmc_sd_num_wr_blocks() 969 mrq.data = &data; in mmc_sd_num_wr_blocks() 977 mmc_wait_for_req(card->host, &mrq); in mmc_sd_num_wr_blocks() [all …]
|
/drivers/mmc/host/ |
D | usdhi6rol0.c | 160 struct mmc_request *mrq; member 281 int opc = host->mrq ? host->mrq->cmd->opcode : -1; in usdhi6_error_code() 299 err, host->wait, host->mrq ? host->mrq->cmd->opcode : -1); in usdhi6_error_code() 317 struct mmc_data *data = host->mrq->data; in usdhi6_blk_bounce() 321 __func__, host->mrq->cmd->opcode, data->sg_len, in usdhi6_blk_bounce() 344 struct mmc_request *mrq = host->mrq; in usdhi6_sg_prep() local 345 struct mmc_data *data = mrq->data; in usdhi6_sg_prep() 357 struct mmc_data *data = host->mrq->data; in usdhi6_sg_map() 389 sg->offset, host->mrq->cmd->opcode, host->mrq); in usdhi6_sg_map() 397 struct mmc_data *data = host->mrq->data; in usdhi6_sg_unmap() [all …]
|
D | cqhci-core.c | 27 struct mmc_request *mrq; member 422 static void cqhci_prep_task_desc(struct mmc_request *mrq, in cqhci_prep_task_desc() argument 426 u32 req_flags = mrq->data->flags; in cqhci_prep_task_desc() 439 CQHCI_BLK_COUNT(mrq->data->blocks) | in cqhci_prep_task_desc() 440 CQHCI_BLK_ADDR((u64)mrq->data->blk_addr); in cqhci_prep_task_desc() 445 u64 desc1 = cqhci_crypto_prep_task_desc(mrq); in cqhci_prep_task_desc() 450 mmc_hostname(mrq->host), mrq->tag, desc1, desc0); in cqhci_prep_task_desc() 453 mmc_hostname(mrq->host), mrq->tag, desc0); in cqhci_prep_task_desc() 457 static int cqhci_dma_map(struct mmc_host *host, struct mmc_request *mrq) in cqhci_dma_map() argument 460 struct mmc_data *data = mrq->data; in cqhci_dma_map() [all …]
|
D | mmc_hsq.c | 24 mmc->ops->request(mmc, hsq->mrq); in mmc_hsq_retry_handler() 37 if (hsq->mrq || hsq->recovery_halt) { in mmc_hsq_pump_requests() 49 hsq->mrq = slot->mrq; in mmc_hsq_pump_requests() 55 ret = mmc->ops->request_atomic(mmc, hsq->mrq); in mmc_hsq_pump_requests() 57 mmc->ops->request(mmc, hsq->mrq); in mmc_hsq_pump_requests() 94 if (slot->mrq) in mmc_hsq_update_next_tag() 101 if (slot->mrq) in mmc_hsq_update_next_tag() 119 hsq->mrq = NULL; in mmc_hsq_post_request() 153 bool mmc_hsq_finalize_request(struct mmc_host *mmc, struct mmc_request *mrq) in mmc_hsq_finalize_request() argument 160 if (!hsq->enabled || !hsq->mrq || hsq->mrq != mrq) { in mmc_hsq_finalize_request() [all …]
|
D | sh_mmcif.c | 222 struct mmc_request *mrq; member 275 struct mmc_request *mrq = host->mrq; in sh_mmcif_dma_complete() local 280 if (WARN(!mrq || !mrq->data, "%s: NULL data in DMA completion!\n", in sh_mmcif_dma_complete() 289 struct mmc_data *data = host->mrq->data; in sh_mmcif_start_dma_rx() 339 struct mmc_data *data = host->mrq->data; in sh_mmcif_start_dma_tx() 604 struct mmc_data *data = host->mrq->data; in sh_mmcif_next_block() 623 struct mmc_request *mrq) in sh_mmcif_single_read() argument 637 struct mmc_data *data = host->mrq->data; in sh_mmcif_read_block() 658 struct mmc_request *mrq) in sh_mmcif_multi_read() argument 660 struct mmc_data *data = mrq->data; in sh_mmcif_multi_read() [all …]
|
D | tmio_mmc_core.c | 233 struct mmc_request *mrq; in tmio_mmc_reset_work() local 237 mrq = host->mrq; in tmio_mmc_reset_work() 244 if (IS_ERR_OR_NULL(mrq) || in tmio_mmc_reset_work() 253 mrq->cmd->opcode); in tmio_mmc_reset_work() 260 mrq->cmd->error = -ETIMEDOUT; in tmio_mmc_reset_work() 270 host->mrq = NULL; in tmio_mmc_reset_work() 271 mmc_request_done(host->mmc, mrq); in tmio_mmc_reset_work() 325 (cmd->opcode == SD_IO_RW_EXTENDED || host->mrq->sbc)) in tmio_mmc_start_command() 492 host->mrq); in tmio_mmc_do_data_irq() 495 host->mrq); in tmio_mmc_do_data_irq() [all …]
|
D | bcm2835.c | 167 struct mmc_request *mrq; /* Current request */ member 209 struct mmc_request *mrq = host->mrq; in bcm2835_dumpregs() local 212 if (mrq) { in bcm2835_dumpregs() 213 bcm2835_dumpcmd(host, mrq->sbc, "sbc"); in bcm2835_dumpregs() 214 bcm2835_dumpcmd(host, mrq->cmd, "cmd"); in bcm2835_dumpregs() 215 if (mrq->data) { in bcm2835_dumpregs() 217 mrq->data->blocks, in bcm2835_dumpregs() 218 mrq->data->blksz, in bcm2835_dumpregs() 219 mrq->data->error); in bcm2835_dumpregs() 221 bcm2835_dumpcmd(host, mrq->stop, "stop"); in bcm2835_dumpregs() [all …]
|
D | cqhci-crypto.h | 23 static inline u64 cqhci_crypto_prep_task_desc(struct mmc_request *mrq) in cqhci_crypto_prep_task_desc() argument 25 if (!mrq->crypto_ctx) in cqhci_crypto_prep_task_desc() 29 WARN_ON_ONCE(mrq->crypto_ctx->bc_dun[0] > U32_MAX); in cqhci_crypto_prep_task_desc() 32 CQHCI_CRYPTO_KEYSLOT(mrq->crypto_key_slot) | in cqhci_crypto_prep_task_desc() 33 mrq->crypto_ctx->bc_dun[0]; in cqhci_crypto_prep_task_desc() 43 static inline u64 cqhci_crypto_prep_task_desc(struct mmc_request *mrq) in cqhci_crypto_prep_task_desc() argument
|
D | cavium.c | 625 static u64 prepare_ext_dma(struct mmc_host *mmc, struct mmc_request *mrq) in prepare_ext_dma() argument 634 (mrq->data->flags & MMC_DATA_WRITE) ? 1 : 0) | in prepare_ext_dma() 635 FIELD_PREP(MIO_EMM_DMA_BLOCK_CNT, mrq->data->blocks) | in prepare_ext_dma() 636 FIELD_PREP(MIO_EMM_DMA_CARD_ADDR, mrq->cmd->arg); in prepare_ext_dma() 645 mrq->data->blocks, (emm_dma & MIO_EMM_DMA_MULTI) ? 1 : 0); in prepare_ext_dma() 650 struct mmc_request *mrq) in cvm_mmc_dma_request() argument 657 if (!mrq->data || !mrq->data->sg || !mrq->data->sg_len || in cvm_mmc_dma_request() 658 !mrq->stop || mrq->stop->opcode != MMC_STOP_TRANSMISSION) { in cvm_mmc_dma_request() 665 data = mrq->data; in cvm_mmc_dma_request() 672 host->current_req = mrq; in cvm_mmc_dma_request() [all …]
|
D | sunxi-mmc.c | 295 struct mmc_request *mrq; member 485 struct mmc_command *cmd = host->mrq->cmd; in sunxi_mmc_dump_errinfo() 486 struct mmc_data *data = host->mrq->data; in sunxi_mmc_dump_errinfo() 513 struct mmc_request *mrq = host->mrq; in sunxi_mmc_finalize_request() local 514 struct mmc_data *data = mrq->data; in sunxi_mmc_finalize_request() 522 mrq->cmd->error = -ETIMEDOUT; in sunxi_mmc_finalize_request() 526 host->manual_stop_mrq = mrq; in sunxi_mmc_finalize_request() 529 if (mrq->stop) in sunxi_mmc_finalize_request() 530 mrq->stop->error = -ETIMEDOUT; in sunxi_mmc_finalize_request() 532 if (mrq->cmd->flags & MMC_RSP_136) { in sunxi_mmc_finalize_request() [all …]
|
D | atmel-mci.c | 318 struct mmc_request *mrq; member 382 struct mmc_request *mrq; member 412 struct mmc_request *mrq; in atmci_req_show() local 419 mrq = slot->mrq; in atmci_req_show() 421 if (mrq) { in atmci_req_show() 422 cmd = mrq->cmd; in atmci_req_show() 423 data = mrq->data; in atmci_req_show() 424 stop = mrq->stop; in atmci_req_show() 698 if (host->mrq->cmd->data) { in atmci_timeout_timer() 699 host->mrq->cmd->data->error = -ETIMEDOUT; in atmci_timeout_timer() [all …]
|
D | mvsdio.c | 36 struct mmc_request *mrq; member 136 static void mvsd_request(struct mmc_host *mmc, struct mmc_request *mrq) in mvsd_request() argument 140 struct mmc_command *cmd = mrq->cmd; in mvsd_request() 145 BUG_ON(host->mrq != NULL); in mvsd_request() 146 host->mrq = mrq; in mvsd_request() 173 if (mrq->data) { in mvsd_request() 174 struct mmc_data *data = mrq->data; in mvsd_request() 463 struct mmc_request *mrq = host->mrq; in mvsd_irq() local 464 struct mmc_command *cmd = mrq->cmd; in mvsd_irq() 468 host->mrq = NULL; in mvsd_irq() [all …]
|
D | rtsx_pci_sdmmc.c | 29 struct mmc_request *mrq; member 181 static void sdmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq) in sdmmc_pre_req() argument 184 struct mmc_data *data = mrq->data; in sdmmc_pre_req() 197 static void sdmmc_post_req(struct mmc_host *mmc, struct mmc_request *mrq, in sdmmc_post_req() argument 202 struct mmc_data *data = mrq->data; in sdmmc_post_req() 428 struct mmc_request *mrq) in sd_read_long_data() argument 433 struct mmc_command *cmd = mrq->cmd; in sd_read_long_data() 434 struct mmc_data *data = mrq->data; in sd_read_long_data() 486 struct mmc_request *mrq) in sd_write_long_data() argument 491 struct mmc_command *cmd = mrq->cmd; in sd_write_long_data() [all …]
|
D | meson-mx-sdio.c | 120 struct mmc_request *mrq; member 147 return cmd->mrq->cmd; in meson_mx_mmc_get_next_cmd() 149 (!cmd->mrq->sbc || cmd->error || cmd->data->error)) in meson_mx_mmc_get_next_cmd() 150 return cmd->mrq->stop; in meson_mx_mmc_get_next_cmd() 245 struct mmc_request *mrq; in meson_mx_mmc_request_done() local 247 mrq = host->mrq; in meson_mx_mmc_request_done() 252 host->mrq = NULL; in meson_mx_mmc_request_done() 255 mmc_request_done(host->mmc, mrq); in meson_mx_mmc_request_done() 310 static int meson_mx_mmc_map_dma(struct mmc_host *mmc, struct mmc_request *mrq) in meson_mx_mmc_map_dma() argument 312 struct mmc_data *data = mrq->data; in meson_mx_mmc_map_dma() [all …]
|
D | sdhci.c | 467 static void sdhci_mod_timer(struct sdhci_host *host, struct mmc_request *mrq, in sdhci_mod_timer() argument 470 if (sdhci_data_line_cmd(mrq->cmd)) in sdhci_mod_timer() 476 static void sdhci_del_timer(struct sdhci_host *host, struct mmc_request *mrq) in sdhci_del_timer() argument 478 if (sdhci_data_line_cmd(mrq->cmd)) in sdhci_del_timer() 1373 struct mmc_request *mrq) in sdhci_auto_cmd12() argument 1375 return !mrq->sbc && (host->flags & SDHCI_AUTO_CMD12) && in sdhci_auto_cmd12() 1376 !mrq->cap_cmd_during_tfr; in sdhci_auto_cmd12() 1380 struct mmc_request *mrq) in sdhci_auto_cmd23() argument 1382 return mrq->sbc && (host->flags & SDHCI_AUTO_CMD23); in sdhci_auto_cmd23() 1386 struct mmc_request *mrq) in sdhci_manual_cmd23() argument [all …]
|
D | mtk-sd.c | 425 struct mmc_request *mrq; member 650 struct mmc_request *mrq, struct mmc_command *cmd); 973 struct mmc_request *mrq, struct mmc_command *cmd) in msdc_cmd_find_resp() argument 1001 struct mmc_request *mrq, struct mmc_command *cmd) in msdc_cmd_prepare_raw_cmd() argument 1009 u32 resp = msdc_cmd_find_resp(host, mrq, cmd); in msdc_cmd_prepare_raw_cmd() 1030 if (mmc_card_mmc(mmc->card) && mrq->sbc && in msdc_cmd_prepare_raw_cmd() 1031 !(mrq->sbc->arg & 0xFFFF0000)) in msdc_cmd_prepare_raw_cmd() 1055 static void msdc_start_data(struct msdc_host *host, struct mmc_request *mrq, in msdc_start_data() argument 1132 static void msdc_request_done(struct msdc_host *host, struct mmc_request *mrq) in msdc_request_done() argument 1143 host->mrq = NULL; in msdc_request_done() [all …]
|
D | s3cmci.c | 319 if ((!host->mrq) || (!host->mrq->data)) in get_data_buffer() 322 if (host->pio_sgptr >= host->mrq->data->sg_len) { in get_data_buffer() 324 host->pio_sgptr, host->mrq->data->sg_len); in get_data_buffer() 327 sg = &host->mrq->data->sg[host->pio_sgptr]; in get_data_buffer() 335 host->pio_sgptr, host->mrq->data->sg_len); in get_data_buffer() 563 if (host->mrq->data) in pio_tasklet() 564 host->mrq->data->error = -EINVAL; in pio_tasklet() 635 if (!host->mrq) { in s3cmci_irq() 641 cmd = host->cmd_is_stop ? host->mrq->stop : host->mrq->cmd; in s3cmci_irq() 688 if (host->mrq->cmd->flags & MMC_RSP_136) { in s3cmci_irq() [all …]
|
D | au1xmmc.c | 90 struct mmc_request *mrq; member 239 struct mmc_request *mrq = host->mrq; in au1xmmc_finish_request() local 241 host->mrq = NULL; in au1xmmc_finish_request() 253 mmc_request_done(host->mmc, mrq); in au1xmmc_finish_request() 317 struct mmc_request *mrq = host->mrq; in au1xmmc_data_complete() local 323 if (host->mrq == NULL) in au1xmmc_data_complete() 326 data = mrq->cmd->data; in au1xmmc_data_complete() 384 data = host->mrq->data; in au1xmmc_send_pio() 440 data = host->mrq->data; in au1xmmc_receive_pio() 517 struct mmc_request *mrq = host->mrq; in au1xmmc_cmd_complete() local [all …]
|
/drivers/memstick/core/ |
D | memstick.c | 222 int memstick_next_req(struct memstick_host *host, struct memstick_request **mrq) in memstick_next_req() argument 226 if ((*mrq) && (*mrq)->error && host->retries) { in memstick_next_req() 227 (*mrq)->error = rc; in memstick_next_req() 233 rc = host->card->next_request(host->card, mrq); in memstick_next_req() 238 *mrq = NULL; in memstick_next_req() 264 void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, in memstick_init_req_sg() argument 267 mrq->tpc = tpc; in memstick_init_req_sg() 269 mrq->data_dir = WRITE; in memstick_init_req_sg() 271 mrq->data_dir = READ; in memstick_init_req_sg() 273 mrq->sg = *sg; in memstick_init_req_sg() [all …]
|
/drivers/firmware/tegra/ |
D | bpmp.c | 241 unsigned int mrq, unsigned long flags, in __tegra_bpmp_channel_write() argument 244 channel->ob->code = mrq; in __tegra_bpmp_channel_write() 254 tegra_bpmp_write_threaded(struct tegra_bpmp *bpmp, unsigned int mrq, in tegra_bpmp_write_threaded() argument 285 err = __tegra_bpmp_channel_write(channel, mrq, MSG_ACK | MSG_RING, in tegra_bpmp_write_threaded() 305 unsigned int mrq, unsigned long flags, in tegra_bpmp_channel_write() argument 314 return __tegra_bpmp_channel_write(channel, mrq, flags, data, size); in tegra_bpmp_channel_write() 333 err = tegra_bpmp_channel_write(channel, msg->mrq, MSG_ACK, in tegra_bpmp_transfer_atomic() 368 channel = tegra_bpmp_write_threaded(bpmp, msg->mrq, msg->tx.data, in tegra_bpmp_transfer() 389 unsigned int mrq) in tegra_bpmp_find_mrq() argument 394 if (entry->mrq == mrq) in tegra_bpmp_find_mrq() [all …]
|
/drivers/staging/greybus/ |
D | sdio.c | 23 struct mmc_request *mrq; member 367 if (single_op(data->mrq->cmd) && data->blocks > 1) { in gb_sdio_transfer() 411 struct mmc_data *data = host->mrq->data; in gb_sdio_command() 499 struct mmc_request *mrq; in gb_sdio_mrq_work() local 509 mrq = host->mrq; in gb_sdio_mrq_work() 510 if (!mrq) { in gb_sdio_mrq_work() 518 mrq->cmd->error = -ESHUTDOWN; in gb_sdio_mrq_work() 522 if (mrq->sbc) { in gb_sdio_mrq_work() 523 ret = gb_sdio_command(host, mrq->sbc); in gb_sdio_mrq_work() 528 ret = gb_sdio_command(host, mrq->cmd); in gb_sdio_mrq_work() [all …]
|