Lines Matching refs:status

100 	u8			status[29];
118 /* for status readback */
119 struct spi_transfer status;
152 host->status.len = len;
160 u8 *cp = host->data->status;
164 int status;
167 status = mmc_spi_readbytes(host, n);
168 if (status < 0)
169 return status;
185 return mmc_spi_skip(host, timeout, sizeof(host->data->status), 0);
219 u8 *cp = host->data->status;
243 cp = host->data->status;
247 * status byte ... and we already scanned 2 bytes.
278 cp = host->data->status;
324 /* SPI R2 == R1 + second status byte; SEND_STATUS
333 cp = host->data->status;
356 cp = host->data->status;
369 /* SPI R1 == just one status byte */
407 u8 *cp = data->status;
408 int status;
424 memset(cp, 0xff, sizeof(data->status));
433 * - status byte (for all response types)
436 * + second status byte, for R2 responses
467 cp += 2; /* min(N(CR)) + status */
470 cp += 10; /* max(N(CR)) + status + min(N(RC),N(WR)) */
476 cp = data->status + sizeof(data->status);
488 t->tx_buf = t->rx_buf = data->status;
489 t->len = cp - data->status;
493 status = spi_sync_locked(host->spi, &host->m);
494 if (status < 0) {
495 dev_dbg(&host->spi->dev, " ... write returned %d\n", status);
496 cmd->error = status;
497 return status;
506 * a status transfer.
576 t->len = (direction == DMA_TO_DEVICE) ? sizeof(scratch->status) : 1;
578 t->rx_buf = scratch->status;
601 int status, i;
608 status = spi_sync_locked(spi, &host->m);
609 if (status != 0) {
610 dev_dbg(&spi->dev, "write error (%d)\n", status);
611 return status;
626 pattern = get_unaligned_be32(scratch->status);
639 status = 0;
643 status = -EILSEQ;
649 status = -EIO;
652 status = -EPROTO;
655 if (status != 0) {
657 scratch->status[0], status);
658 return status;
663 /* Return when not busy. If we didn't collect that status yet,
666 for (i = 4; i < sizeof(scratch->status); i++) {
668 if (scratch->status[i] & 0x01)
695 int status;
703 status = mmc_spi_readbytes(host, 1);
704 if (status < 0)
705 return status;
706 status = scratch->status[0];
707 if (status == 0xff || status == 0)
708 status = mmc_spi_readtoken(host, timeout);
710 if (status < 0) {
711 dev_dbg(&spi->dev, "read error %02x (%d)\n", status, status);
712 return status;
719 while (status & 0x80) {
720 status <<= 1;
723 leftover = status << 1;
725 status = spi_sync_locked(spi, &host->m);
726 if (status < 0) {
727 dev_dbg(&spi->dev, "read error %d\n", status);
728 return status;
804 int status = 0;
815 /* transfer each block, and update request status */
822 status = mmc_spi_writeblock(host, t, timeout);
824 status = mmc_spi_readblock(host, t, timeout);
825 if (status < 0)
840 if (status < 0) {
841 data->error = status;
842 dev_dbg(&spi->dev, "%s status %d\n", write_or_read, status);
856 const unsigned statlen = sizeof(scratch->status);
863 * "not busy any longer" status, and leave chip selected.
869 memset(scratch->status, 0xff, statlen);
870 scratch->status[0] = SPI_TOKEN_STOP_TRAN;
882 /* Ideally we collected "not busy" status with one I/O,
887 if (scratch->status[tmp] != 0)
905 int status = -EINVAL;
942 status = mmc_spi_command_send(host, mrq, mrq->cmd, mrq->data != NULL);
943 if (status == 0 && mrq->data) {
957 status = mmc_spi_command_send(host, mrq, &stop, 0);
964 status = mmc_spi_command_send(host, mrq, mrq->stop, 0);
1002 * the card returns BUSY status, the clock must issue several cycles
1116 int status;
1119 status = spi_setup(host->spi);
1121 host->spi->max_speed_hz, status);
1154 int status;
1173 status = spi_setup(spi);
1174 if (status < 0) {
1177 status);
1178 return status;
1187 status = -ENOMEM;
1245 /* setup message for status/busy readback */
1248 spi_message_add_tail(&host->status, &host->readback);
1249 host->status.tx_buf = host->ones;
1250 host->status.rx_buf = &host->data->status;
1251 host->status.cs_change = 1;
1255 status = host->pdata->init(&spi->dev, mmc_spi_detect_irq, mmc);
1256 if (status != 0)
1266 status = mmc_add_host(mmc);
1267 if (status != 0)
1274 status = mmc_gpiod_request_cd(mmc, NULL, 0, false, 1000);
1275 if (status == -EPROBE_DEFER)
1277 if (!status) {
1289 status = mmc_gpiod_request_ro(mmc, NULL, 1, 0);
1290 if (status == -EPROBE_DEFER)
1292 if (!status)
1313 return status;