Lines Matching refs:r_data
168 struct mmc_data *r_data = host->req->cmd->data;
169 struct scatterlist *sg = r_data->sg;
182 if ((r_data->flags & MMC_DATA_WRITE)
200 if (r_data->flags & MMC_DATA_READ)
202 else if (r_data->flags & MMC_DATA_WRITE)
223 static void tifm_sd_bounce_block(struct tifm_sd *host, struct mmc_data *r_data)
225 struct scatterlist *sg = r_data->sg;
226 unsigned int t_size = r_data->blksz;
249 if (r_data->flags & MMC_DATA_WRITE)
251 r_data->blksz - t_size,
253 else if (r_data->flags & MMC_DATA_READ)
255 r_data->blksz - t_size, p_cnt);
262 static int tifm_sd_set_dma_data(struct tifm_sd *host, struct mmc_data *r_data)
265 unsigned int t_size = TIFM_DMA_TSIZE * r_data->blksz;
276 tifm_sd_bounce_block(host, r_data);
282 dma_len = sg_dma_len(&r_data->sg[host->sg_pos]) - host->block_pos;
288 dma_len = sg_dma_len(&r_data->sg[host->sg_pos]);
292 dma_blk_cnt = dma_len / r_data->blksz;
294 host->block_pos += dma_blk_cnt * r_data->blksz;
302 sg = &r_data->sg[host->sg_pos];
304 if (r_data->flags & MMC_DATA_WRITE) {
306 tifm_sd_bounce_block(host, r_data);
319 if (r_data->flags & MMC_DATA_WRITE)
479 struct mmc_data *r_data = NULL;
488 r_data = host->req->cmd->data;
490 if (r_data && (fifo_status & TIFM_FIFO_READY)) {
491 if (tifm_sd_set_dma_data(host, r_data)) {
625 struct mmc_data *r_data = mrq->cmd->data;
644 if (r_data) {
645 tifm_sd_set_data_timeout(host, r_data);
647 if ((r_data->flags & MMC_DATA_WRITE) && !mrq->stop)
660 host->sg_len = r_data->sg_len;
663 r_data->blksz);
666 r_data->flags & MMC_DATA_WRITE
674 host->sg_len = tifm_map_sg(sock, r_data->sg,
675 r_data->sg_len,
676 r_data->flags
684 r_data->flags & MMC_DATA_WRITE
693 writel(ilog2(r_data->blksz) - 2,
700 if (r_data->flags & MMC_DATA_WRITE)
707 tifm_sd_set_dma_data(host, r_data);
710 writel(r_data->blocks - 1,
712 writel(r_data->blksz - 1,
735 struct mmc_data *r_data = NULL;
751 r_data = mrq->cmd->data;
752 if (r_data) {
759 (r_data->flags & MMC_DATA_WRITE)
761 tifm_unmap_sg(sock, r_data->sg, r_data->sg_len,
762 (r_data->flags & MMC_DATA_WRITE)
766 r_data->bytes_xfered = r_data->blocks
768 r_data->bytes_xfered *= r_data->blksz;
769 r_data->bytes_xfered += r_data->blksz