Lines Matching refs:status
120 u8 status[29]; member
139 struct spi_transfer status; member
173 int status; in mmc_spi_readbytes() local
180 host->status.len = len; in mmc_spi_readbytes()
187 status = spi_sync_locked(host->spi, &host->readback); in mmc_spi_readbytes()
194 return status; in mmc_spi_readbytes()
200 u8 *cp = host->data->status; in mmc_spi_skip()
204 int status; in mmc_spi_skip() local
207 status = mmc_spi_readbytes(host, n); in mmc_spi_skip()
208 if (status < 0) in mmc_spi_skip()
209 return status; in mmc_spi_skip()
232 return mmc_spi_skip(host, timeout, sizeof(host->data->status), 0); in mmc_spi_wait_unbusy()
265 u8 *cp = host->data->status; in mmc_spi_response_get()
289 cp = host->data->status; in mmc_spi_response_get()
324 cp = host->data->status; in mmc_spi_response_get()
376 cp = host->data->status; in mmc_spi_response_get()
399 cp = host->data->status; in mmc_spi_response_get()
450 u8 *cp = data->status; in mmc_spi_command_send()
451 int status; in mmc_spi_command_send() local
467 memset(cp, 0xff, sizeof(data->status)); in mmc_spi_command_send()
519 cp = data->status + sizeof(data->status); in mmc_spi_command_send()
531 t->tx_buf = t->rx_buf = data->status; in mmc_spi_command_send()
533 t->len = cp - data->status; in mmc_spi_command_send()
543 status = spi_sync_locked(host->spi, &host->m); in mmc_spi_command_send()
549 if (status < 0) { in mmc_spi_command_send()
550 dev_dbg(&host->spi->dev, " ... write returned %d\n", status); in mmc_spi_command_send()
551 cmd->error = status; in mmc_spi_command_send()
552 return status; in mmc_spi_command_send()
646 ? sizeof(scratch->status) in mmc_spi_setup_data_message()
650 t->rx_buf = scratch->status; in mmc_spi_setup_data_message()
652 t->rx_dma = dma + offsetof(struct scratch, status); in mmc_spi_setup_data_message()
675 int status, i; in mmc_spi_writeblock() local
687 status = spi_sync_locked(spi, &host->m); in mmc_spi_writeblock()
689 if (status != 0) { in mmc_spi_writeblock()
690 dev_dbg(&spi->dev, "write error (%d)\n", status); in mmc_spi_writeblock()
691 return status; in mmc_spi_writeblock()
711 pattern = get_unaligned_be32(scratch->status); in mmc_spi_writeblock()
724 status = 0; in mmc_spi_writeblock()
728 status = -EILSEQ; in mmc_spi_writeblock()
734 status = -EIO; in mmc_spi_writeblock()
737 status = -EPROTO; in mmc_spi_writeblock()
740 if (status != 0) { in mmc_spi_writeblock()
742 scratch->status[0], status); in mmc_spi_writeblock()
743 return status; in mmc_spi_writeblock()
753 for (i = 4; i < sizeof(scratch->status); i++) { in mmc_spi_writeblock()
755 if (scratch->status[i] & 0x01) in mmc_spi_writeblock()
782 int status; in mmc_spi_readblock() local
790 status = mmc_spi_readbytes(host, 1); in mmc_spi_readblock()
791 if (status < 0) in mmc_spi_readblock()
792 return status; in mmc_spi_readblock()
793 status = scratch->status[0]; in mmc_spi_readblock()
794 if (status == 0xff || status == 0) in mmc_spi_readblock()
795 status = mmc_spi_readtoken(host, timeout); in mmc_spi_readblock()
797 if (status < 0) { in mmc_spi_readblock()
798 dev_dbg(&spi->dev, "read error %02x (%d)\n", status, status); in mmc_spi_readblock()
799 return status; in mmc_spi_readblock()
806 while (status & 0x80) { in mmc_spi_readblock()
807 status <<= 1; in mmc_spi_readblock()
810 leftover = status << 1; in mmc_spi_readblock()
821 status = spi_sync_locked(spi, &host->m); in mmc_spi_readblock()
911 int status = 0; in mmc_spi_data_do() local
953 status = mmc_spi_writeblock(host, t, timeout); in mmc_spi_data_do()
955 status = mmc_spi_readblock(host, t, timeout); in mmc_spi_data_do()
956 if (status < 0) in mmc_spi_data_do()
973 if (status < 0) { in mmc_spi_data_do()
974 data->error = status; in mmc_spi_data_do()
978 status); in mmc_spi_data_do()
992 const unsigned statlen = sizeof(scratch->status); in mmc_spi_data_do()
1005 memset(scratch->status, 0xff, statlen); in mmc_spi_data_do()
1006 scratch->status[0] = SPI_TOKEN_STOP_TRAN; in mmc_spi_data_do()
1035 if (scratch->status[tmp] != 0) in mmc_spi_data_do()
1053 int status = -EINVAL; in mmc_spi_request() local
1090 status = mmc_spi_command_send(host, mrq, mrq->cmd, mrq->data != NULL); in mmc_spi_request()
1091 if (status == 0 && mrq->data) { in mmc_spi_request()
1105 status = mmc_spi_command_send(host, mrq, &stop, 0); in mmc_spi_request()
1112 status = mmc_spi_command_send(host, mrq, mrq->stop, 0); in mmc_spi_request()
1260 int status; in mmc_spi_set_ios() local
1263 status = spi_setup(host->spi); in mmc_spi_set_ios()
1266 host->spi->max_speed_hz, status); in mmc_spi_set_ios()
1299 int status; in mmc_spi_probe() local
1318 status = spi_setup(spi); in mmc_spi_probe()
1319 if (status < 0) { in mmc_spi_probe()
1322 status); in mmc_spi_probe()
1323 return status; in mmc_spi_probe()
1332 status = -ENOMEM; in mmc_spi_probe()
1410 spi_message_add_tail(&host->status, &host->readback); in mmc_spi_probe()
1411 host->status.tx_buf = host->ones; in mmc_spi_probe()
1412 host->status.tx_dma = host->ones_dma; in mmc_spi_probe()
1413 host->status.rx_buf = &host->data->status; in mmc_spi_probe()
1414 host->status.rx_dma = host->data_dma + offsetof(struct scratch, status); in mmc_spi_probe()
1415 host->status.cs_change = 1; in mmc_spi_probe()
1419 status = host->pdata->init(&spi->dev, mmc_spi_detect_irq, mmc); in mmc_spi_probe()
1420 if (status != 0) in mmc_spi_probe()
1430 status = mmc_add_host(mmc); in mmc_spi_probe()
1431 if (status != 0) in mmc_spi_probe()
1435 status = mmc_gpio_request_cd(mmc, host->pdata->cd_gpio, in mmc_spi_probe()
1437 if (status != 0) in mmc_spi_probe()
1450 status = mmc_gpio_request_ro(mmc, host->pdata->ro_gpio); in mmc_spi_probe()
1451 if (status != 0) in mmc_spi_probe()
1480 return status; in mmc_spi_probe()