Lines Matching refs:data
169 struct mmc_data *data; /* Current data request */
215 if (mrq->data) {
216 dev_dbg(dev, "data blocks %x blksz %x - err %d\n",
217 mrq->data->blocks,
218 mrq->data->blksz,
219 mrq->data->error);
288 alternate_idle = (host->mrq->data->flags & MMC_DATA_READ) ?
314 host->mrq->data->error = -ETIMEDOUT;
333 blksize = host->data->blksz;
344 host->data->error = -EINVAL;
350 host->data->error = -EINVAL;
429 is_read = (host->data->flags & MMC_DATA_READ) != 0;
438 host->data->error = -EILSEQ;
443 host->data->error = -ETIMEDOUT;
448 void bcm2835_prepare_dma(struct bcm2835_host *host, struct mmc_data *data)
455 if (data->flags & MMC_DATA_READ) {
471 if ((data->blocks > 1) && (dir_data == DMA_FROM_DEVICE)) {
477 (u32)data->blocks * data->blksz);
479 for_each_sg(data->sg, sg, data->sg_len, i) {
496 sg_len = dma_map_sg(dma_chan->device->dev, data->sg, data->sg_len,
501 desc = dmaengine_prep_slave_sg(dma_chan, data->sg, sg_len, dir_slave,
505 dma_unmap_sg(dma_chan->device->dev, data->sg, sg_len, dir_data);
542 struct mmc_data *data = cmd->data;
544 WARN_ON(host->data);
546 host->data = data;
547 if (!data)
551 host->data->bytes_xfered = 0;
557 if (data->flags & MMC_DATA_READ)
561 sg_miter_start(&host->sg_miter, data->sg, data->sg_len, flags);
562 host->blocks = data->blocks;
567 writel(data->blksz, host->ioaddr + SDHBCT);
568 writel(data->blocks, host->ioaddr + SDHBLC);
601 host->data = NULL;
636 if (!cmd->data && cmd->busy_timeout > 9000)
674 if (cmd->data) {
675 if (cmd->data->flags & MMC_DATA_WRITE)
677 if (cmd->data->flags & MMC_DATA_READ)
688 struct mmc_data *data;
692 data = host->data;
693 host->data = NULL;
699 if (host->mrq->stop && (data->error || !host->use_sbc)) {
714 struct mmc_data *data;
716 data = host->data;
721 data->bytes_xfered = data->error ? 0 : (data->blksz * data->blocks);
799 if (host->data && host->dma_desc)
814 if (!host->data)
836 if (host->data) {
837 host->data->error = -ETIMEDOUT;
867 if (host->mrq->data)
868 host->mrq->data->error = -EILSEQ;
872 if (host->mrq->data)
873 host->mrq->data->error = -ETIMEDOUT;
885 if (!host->data)
888 host->data->error = -EILSEQ;
890 host->data->error = -ETIMEDOUT;
911 /* There are no dedicated data/space available interrupt
913 * data/space available FIFO status bits. It is therefore not
914 * an error to get here when there is no data transfer in
917 if (!host->data)
921 if (host->data->error)
924 if (host->data->flags & MMC_DATA_WRITE) {
933 if ((host->blocks == 0) || host->data->error)
945 if (!host->data)
947 if ((host->blocks == 0) || host->data->error)
953 if (WARN_ON(!host->data)) {
960 if (host->data->error || (--host->blocks == 0))
964 } else if (host->data->flags & MMC_DATA_WRITE) {
1000 /* There is no true data interrupt status bit, so it is
1001 * necessary to qualify the data flag with the interrupt
1020 bool block, busy, data;
1026 data = host->irq_data;
1039 if (data)
1051 struct mmc_data *data;
1055 data = host->data;
1059 data->sg, data->sg_len,
1098 * in data mode the max is 50MHz wihout a minimum, and only
1103 * clock. CMD15 must be used to return to data mode, so this
1112 * BUT, the 3-bit clock divisor in data mode is too small if
1163 if (mrq->data)
1164 mrq->data->error = 0;
1168 if (mrq->data && !is_power_of_2(mrq->data->blksz)) {
1170 mrq->data->blksz);
1202 if (host->use_dma && mrq->data && (mrq->data->blocks > PIO_THRESHOLD))
1203 bcm2835_prepare_dma(host, mrq->data);
1205 host->use_sbc = !!mrq->sbc && host->mrq->data &&
1206 (host->mrq->data->flags & MMC_DATA_READ);
1213 if (host->data && host->dma_desc) {