• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/mmc/host/

Lines Matching refs:status

118 	u8			status[29];
136 /* for status readback */
137 struct spi_transfer status;
171 int status;
178 host->status.len = len;
185 status = spi_sync_locked(host->spi, &host->readback);
192 return status;
198 u8 *cp = host->data->status;
202 int status;
205 status = mmc_spi_readbytes(host, n);
206 if (status < 0)
207 return status;
230 return mmc_spi_skip(host, timeout, sizeof(host->data->status), 0);
263 u8 *cp = host->data->status;
287 cp = host->data->status;
291 * status byte ... and we already scanned 2 bytes.
322 cp = host->data->status;
365 /* SPI R2 == R1 + second status byte; SEND_STATUS
374 cp = host->data->status;
397 cp = host->data->status;
410 /* SPI R1 == just one status byte */
448 u8 *cp = data->status;
450 int status;
466 memset(cp++, 0xff, sizeof(data->status));
473 *cp++ = (crc7(0, &data->status[1], 5) << 1) | 0x01;
477 * - status byte (for all response types)
480 * + second status byte, for R2 responses
511 cp += 2; /* min(N(CR)) + status */
514 cp += 10; /* max(N(CR)) + status + min(N(RC),N(WR)) */
520 cp = data->status + sizeof(data->status);
532 t->tx_buf = t->rx_buf = data->status;
534 t->len = cp - data->status;
544 status = spi_sync_locked(host->spi, &host->m);
550 if (status < 0) {
551 dev_dbg(&host->spi->dev, " ... write returned %d\n", status);
552 cmd->error = status;
553 return status;
562 * a status transfer.
647 ? sizeof(scratch->status)
651 t->rx_buf = scratch->status;
653 t->rx_dma = dma + offsetof(struct scratch, status);
676 int status, i;
688 status = spi_sync_locked(spi, &host->m);
690 if (status != 0) {
691 dev_dbg(&spi->dev, "write error (%d)\n", status);
692 return status;
712 pattern = scratch->status[0] << 24;
713 pattern |= scratch->status[1] << 16;
714 pattern |= scratch->status[2] << 8;
715 pattern |= scratch->status[3];
728 status = 0;
732 status = -EILSEQ;
738 status = -EIO;
741 status = -EPROTO;
744 if (status != 0) {
746 scratch->status[0], status);
747 return status;
754 /* Return when not busy. If we didn't collect that status yet,
757 for (i = 4; i < sizeof(scratch->status); i++) {
759 if (scratch->status[i] & 0x01)
786 int status;
794 status = mmc_spi_readbytes(host, 1);
795 if (status < 0)
796 return status;
797 status = scratch->status[0];
798 if (status == 0xff || status == 0)
799 status = mmc_spi_readtoken(host, timeout);
801 if (status < 0) {
802 dev_dbg(&spi->dev, "read error %02x (%d)\n", status, status);
803 return status;
810 while (status & 0x80) {
811 status <<= 1;
814 leftover = status << 1;
825 status = spi_sync_locked(spi, &host->m);
915 int status = 0;
945 /* transfer each block, and update request status */
957 status = mmc_spi_writeblock(host, t, timeout);
959 status = mmc_spi_readblock(host, t, timeout);
960 if (status < 0)
977 if (status < 0) {
978 data->error = status;
979 dev_dbg(&spi->dev, "%s status %d\n",
982 status);
996 const unsigned statlen = sizeof(scratch->status);
1003 * "not busy any longer" status, and leave chip selected.
1009 memset(scratch->status, 0xff, statlen);
1010 scratch->status[0] = SPI_TOKEN_STOP_TRAN;
1034 /* Ideally we collected "not busy" status with one I/O,
1039 if (scratch->status[tmp] != 0)
1057 int status = -EINVAL;
1091 status = mmc_spi_command_send(host, mrq, mrq->cmd, mrq->data != NULL);
1092 if (status == 0 && mrq->data) {
1095 status = mmc_spi_command_send(host, mrq, mrq->stop, 0);
1125 * the card returns BUSY status, the clock must issue several cycles
1226 int status;
1229 status = spi_setup(host->spi);
1232 host->spi->max_speed_hz, status);
1287 int status;
1305 status = spi_setup(spi);
1306 if (status < 0) {
1309 status);
1310 return status;
1319 status = -ENOMEM;
1394 /* setup message for status/busy readback */
1398 spi_message_add_tail(&host->status, &host->readback);
1399 host->status.tx_buf = host->ones;
1400 host->status.tx_dma = host->ones_dma;
1401 host->status.rx_buf = &host->data->status;
1402 host->status.rx_dma = host->data_dma + offsetof(struct scratch, status);
1403 host->status.cs_change = 1;
1407 status = host->pdata->init(&spi->dev, mmc_spi_detect_irq, mmc);
1408 if (status != 0)
1416 status = mmc_add_host(mmc);
1417 if (status != 0)
1446 return status;