Lines Matching refs:scratch
98 /* "scratch" is per-{command,block} data exchanged with the card */
99 struct scratch {
123 struct scratch *data;
232 * be stored in the scratch buffer. It's somewhere after the
406 struct scratch *data = host->data;
519 struct scratch *scratch = host->data;
531 scratch->data_token = SPI_TOKEN_MULTI_WRITE;
533 scratch->data_token = SPI_TOKEN_SINGLE;
534 t->tx_buf = &scratch->data_token;
552 t->tx_buf = &scratch->crc_val;
555 t->rx_buf = &scratch->crc_val;
576 t->len = (direction == DMA_TO_DEVICE) ? sizeof(scratch->status) : 1;
578 t->rx_buf = scratch->status;
602 struct scratch *scratch = host->data;
606 scratch->crc_val = cpu_to_be16(crc_itu_t(0, t->tx_buf, t->len));
626 pattern = get_unaligned_be32(scratch->status);
657 scratch->status[0], status);
666 for (i = 4; i < sizeof(scratch->status); i++) {
668 if (scratch->status[i] & 0x01)
696 struct scratch *scratch = host->data;
706 status = scratch->status[0];
744 cp = (u8 *) &scratch->crc_val;
755 be16_to_cpus(&scratch->crc_val);
756 if (scratch->crc_val != crc) {
759 scratch->crc_val, crc, t->len);
854 struct scratch *scratch = host->data;
856 const unsigned statlen = sizeof(scratch->status);
869 memset(scratch->status, 0xff, statlen);
870 scratch->status[0] = SPI_TOKEN_STOP_TRAN;
887 if (scratch->status[tmp] != 0)