• Home
  • Raw
  • Download

Lines Matching refs:r_data

169 	struct mmc_data *r_data = host->req->cmd->data;  in tifm_sd_transfer_data()  local
170 struct scatterlist *sg = r_data->sg; in tifm_sd_transfer_data()
183 if ((r_data->flags & MMC_DATA_WRITE) in tifm_sd_transfer_data()
201 if (r_data->flags & MMC_DATA_READ) in tifm_sd_transfer_data()
203 else if (r_data->flags & MMC_DATA_WRITE) in tifm_sd_transfer_data()
224 static void tifm_sd_bounce_block(struct tifm_sd *host, struct mmc_data *r_data) in tifm_sd_bounce_block() argument
226 struct scatterlist *sg = r_data->sg; in tifm_sd_bounce_block()
227 unsigned int t_size = r_data->blksz; in tifm_sd_bounce_block()
250 if (r_data->flags & MMC_DATA_WRITE) in tifm_sd_bounce_block()
252 r_data->blksz - t_size, in tifm_sd_bounce_block()
254 else if (r_data->flags & MMC_DATA_READ) in tifm_sd_bounce_block()
256 r_data->blksz - t_size, p_cnt); in tifm_sd_bounce_block()
263 static int tifm_sd_set_dma_data(struct tifm_sd *host, struct mmc_data *r_data) in tifm_sd_set_dma_data() argument
266 unsigned int t_size = TIFM_DMA_TSIZE * r_data->blksz; in tifm_sd_set_dma_data()
277 tifm_sd_bounce_block(host, r_data); in tifm_sd_set_dma_data()
283 dma_len = sg_dma_len(&r_data->sg[host->sg_pos]) - host->block_pos; in tifm_sd_set_dma_data()
289 dma_len = sg_dma_len(&r_data->sg[host->sg_pos]); in tifm_sd_set_dma_data()
293 dma_blk_cnt = dma_len / r_data->blksz; in tifm_sd_set_dma_data()
295 host->block_pos += dma_blk_cnt * r_data->blksz; in tifm_sd_set_dma_data()
303 sg = &r_data->sg[host->sg_pos]; in tifm_sd_set_dma_data()
305 if (r_data->flags & MMC_DATA_WRITE) { in tifm_sd_set_dma_data()
307 tifm_sd_bounce_block(host, r_data); in tifm_sd_set_dma_data()
320 if (r_data->flags & MMC_DATA_WRITE) in tifm_sd_set_dma_data()
480 struct mmc_data *r_data = NULL; in tifm_sd_data_event() local
489 r_data = host->req->cmd->data; in tifm_sd_data_event()
491 if (r_data && (fifo_status & TIFM_FIFO_READY)) { in tifm_sd_data_event()
492 if (tifm_sd_set_dma_data(host, r_data)) { in tifm_sd_data_event()
626 struct mmc_data *r_data = mrq->cmd->data; in tifm_sd_request() local
650 if (r_data) { in tifm_sd_request()
651 tifm_sd_set_data_timeout(host, r_data); in tifm_sd_request()
653 if ((r_data->flags & MMC_DATA_WRITE) && !mrq->stop) in tifm_sd_request()
666 host->sg_len = r_data->sg_len; in tifm_sd_request()
669 r_data->blksz); in tifm_sd_request()
672 r_data->flags & MMC_DATA_WRITE in tifm_sd_request()
680 host->sg_len = tifm_map_sg(sock, r_data->sg, in tifm_sd_request()
681 r_data->sg_len, in tifm_sd_request()
682 r_data->flags in tifm_sd_request()
690 r_data->flags & MMC_DATA_WRITE in tifm_sd_request()
699 writel(ilog2(r_data->blksz) - 2, in tifm_sd_request()
706 if (r_data->flags & MMC_DATA_WRITE) in tifm_sd_request()
713 tifm_sd_set_dma_data(host, r_data); in tifm_sd_request()
716 writel(r_data->blocks - 1, in tifm_sd_request()
718 writel(r_data->blksz - 1, in tifm_sd_request()
741 struct mmc_data *r_data = NULL; in tifm_sd_end_cmd() local
757 r_data = mrq->cmd->data; in tifm_sd_end_cmd()
758 if (r_data) { in tifm_sd_end_cmd()
765 (r_data->flags & MMC_DATA_WRITE) in tifm_sd_end_cmd()
767 tifm_unmap_sg(sock, r_data->sg, r_data->sg_len, in tifm_sd_end_cmd()
768 (r_data->flags & MMC_DATA_WRITE) in tifm_sd_end_cmd()
772 r_data->bytes_xfered = r_data->blocks in tifm_sd_end_cmd()
774 r_data->bytes_xfered *= r_data->blksz; in tifm_sd_end_cmd()
775 r_data->bytes_xfered += r_data->blksz in tifm_sd_end_cmd()