Lines Matching refs:status

100 	u8			status[29];  member
119 struct spi_transfer status; member
153 int status; in mmc_spi_readbytes() local
160 host->status.len = len; in mmc_spi_readbytes()
167 status = spi_sync_locked(host->spi, &host->readback); in mmc_spi_readbytes()
174 return status; in mmc_spi_readbytes()
180 u8 *cp = host->data->status; in mmc_spi_skip()
184 int status; in mmc_spi_skip() local
187 status = mmc_spi_readbytes(host, n); in mmc_spi_skip()
188 if (status < 0) in mmc_spi_skip()
189 return status; in mmc_spi_skip()
212 return mmc_spi_skip(host, timeout, sizeof(host->data->status), 0); in mmc_spi_wait_unbusy()
246 u8 *cp = host->data->status; in mmc_spi_response_get()
270 cp = host->data->status; in mmc_spi_response_get()
305 cp = host->data->status; in mmc_spi_response_get()
360 cp = host->data->status; in mmc_spi_response_get()
383 cp = host->data->status; in mmc_spi_response_get()
434 u8 *cp = data->status; in mmc_spi_command_send()
435 int status; in mmc_spi_command_send() local
451 memset(cp, 0xff, sizeof(data->status)); in mmc_spi_command_send()
503 cp = data->status + sizeof(data->status); in mmc_spi_command_send()
515 t->tx_buf = t->rx_buf = data->status; in mmc_spi_command_send()
517 t->len = cp - data->status; in mmc_spi_command_send()
527 status = spi_sync_locked(host->spi, &host->m); in mmc_spi_command_send()
533 if (status < 0) { in mmc_spi_command_send()
534 dev_dbg(&host->spi->dev, " ... write returned %d\n", status); in mmc_spi_command_send()
535 cmd->error = status; in mmc_spi_command_send()
536 return status; in mmc_spi_command_send()
629 t->len = (direction == DMA_TO_DEVICE) ? sizeof(scratch->status) : 1; in mmc_spi_setup_data_message()
632 t->rx_buf = scratch->status; in mmc_spi_setup_data_message()
634 t->rx_dma = dma + offsetof(struct scratch, status); in mmc_spi_setup_data_message()
657 int status, i; in mmc_spi_writeblock() local
668 status = spi_sync_locked(spi, &host->m); in mmc_spi_writeblock()
670 if (status != 0) { in mmc_spi_writeblock()
671 dev_dbg(&spi->dev, "write error (%d)\n", status); in mmc_spi_writeblock()
672 return status; in mmc_spi_writeblock()
692 pattern = get_unaligned_be32(scratch->status); in mmc_spi_writeblock()
705 status = 0; in mmc_spi_writeblock()
709 status = -EILSEQ; in mmc_spi_writeblock()
715 status = -EIO; in mmc_spi_writeblock()
718 status = -EPROTO; in mmc_spi_writeblock()
721 if (status != 0) { in mmc_spi_writeblock()
723 scratch->status[0], status); in mmc_spi_writeblock()
724 return status; in mmc_spi_writeblock()
734 for (i = 4; i < sizeof(scratch->status); i++) { in mmc_spi_writeblock()
736 if (scratch->status[i] & 0x01) in mmc_spi_writeblock()
763 int status; in mmc_spi_readblock() local
771 status = mmc_spi_readbytes(host, 1); in mmc_spi_readblock()
772 if (status < 0) in mmc_spi_readblock()
773 return status; in mmc_spi_readblock()
774 status = scratch->status[0]; in mmc_spi_readblock()
775 if (status == 0xff || status == 0) in mmc_spi_readblock()
776 status = mmc_spi_readtoken(host, timeout); in mmc_spi_readblock()
778 if (status < 0) { in mmc_spi_readblock()
779 dev_dbg(&spi->dev, "read error %02x (%d)\n", status, status); in mmc_spi_readblock()
780 return status; in mmc_spi_readblock()
787 while (status & 0x80) { in mmc_spi_readblock()
788 status <<= 1; in mmc_spi_readblock()
791 leftover = status << 1; in mmc_spi_readblock()
802 status = spi_sync_locked(spi, &host->m); in mmc_spi_readblock()
803 if (status < 0) { in mmc_spi_readblock()
804 dev_dbg(&spi->dev, "read error %d\n", status); in mmc_spi_readblock()
805 return status; in mmc_spi_readblock()
893 int status = 0; in mmc_spi_data_do() local
937 status = mmc_spi_writeblock(host, t, timeout); in mmc_spi_data_do()
939 status = mmc_spi_readblock(host, t, timeout); in mmc_spi_data_do()
940 if (status < 0) in mmc_spi_data_do()
957 if (status < 0) { in mmc_spi_data_do()
958 data->error = status; in mmc_spi_data_do()
961 status); in mmc_spi_data_do()
975 const unsigned statlen = sizeof(scratch->status); in mmc_spi_data_do()
988 memset(scratch->status, 0xff, statlen); in mmc_spi_data_do()
989 scratch->status[0] = SPI_TOKEN_STOP_TRAN; in mmc_spi_data_do()
1018 if (scratch->status[tmp] != 0) in mmc_spi_data_do()
1036 int status = -EINVAL; in mmc_spi_request() local
1073 status = mmc_spi_command_send(host, mrq, mrq->cmd, mrq->data != NULL); in mmc_spi_request()
1074 if (status == 0 && mrq->data) { in mmc_spi_request()
1088 status = mmc_spi_command_send(host, mrq, &stop, 0); in mmc_spi_request()
1095 status = mmc_spi_command_send(host, mrq, mrq->stop, 0); in mmc_spi_request()
1247 int status; in mmc_spi_set_ios() local
1250 status = spi_setup(host->spi); in mmc_spi_set_ios()
1253 host->spi->max_speed_hz, status); in mmc_spi_set_ios()
1332 int status; in mmc_spi_probe() local
1351 status = spi_setup(spi); in mmc_spi_probe()
1352 if (status < 0) { in mmc_spi_probe()
1355 status); in mmc_spi_probe()
1356 return status; in mmc_spi_probe()
1365 status = -ENOMEM; in mmc_spi_probe()
1423 status = mmc_spi_dma_alloc(host); in mmc_spi_probe()
1424 if (status) in mmc_spi_probe()
1431 spi_message_add_tail(&host->status, &host->readback); in mmc_spi_probe()
1432 host->status.tx_buf = host->ones; in mmc_spi_probe()
1433 host->status.tx_dma = host->ones_dma; in mmc_spi_probe()
1434 host->status.rx_buf = &host->data->status; in mmc_spi_probe()
1435 host->status.rx_dma = host->data_dma + offsetof(struct scratch, status); in mmc_spi_probe()
1436 host->status.cs_change = 1; in mmc_spi_probe()
1440 status = host->pdata->init(&spi->dev, mmc_spi_detect_irq, mmc); in mmc_spi_probe()
1441 if (status != 0) in mmc_spi_probe()
1451 status = mmc_add_host(mmc); in mmc_spi_probe()
1452 if (status != 0) in mmc_spi_probe()
1459 status = mmc_gpiod_request_cd(mmc, NULL, 0, false, 1000); in mmc_spi_probe()
1460 if (status == -EPROBE_DEFER) in mmc_spi_probe()
1462 if (!status) { in mmc_spi_probe()
1474 status = mmc_gpiod_request_ro(mmc, NULL, 1, 0); in mmc_spi_probe()
1475 if (status == -EPROBE_DEFER) in mmc_spi_probe()
1477 if (!status) in mmc_spi_probe()
1501 return status; in mmc_spi_probe()