Lines Matching refs:cmd

203 static char *maptype(struct mmc_command *cmd)  in maptype()  argument
205 switch (mmc_spi_resp_type(cmd)) { in maptype()
216 struct mmc_command *cmd, int cs_on) in mmc_spi_response_get() argument
229 cmd->opcode, maptype(cmd)); in mmc_spi_response_get()
286 cmd->resp[0] = rotator >> 8; in mmc_spi_response_get()
289 cmd->resp[0] = *cp++; in mmc_spi_response_get()
291 cmd->error = 0; in mmc_spi_response_get()
294 if (cmd->resp[0] != 0) { in mmc_spi_response_get()
296 & cmd->resp[0]) in mmc_spi_response_get()
298 else if (R1_SPI_ILLEGAL_COMMAND & cmd->resp[0]) in mmc_spi_response_get()
300 else if (R1_SPI_COM_CRC & cmd->resp[0]) in mmc_spi_response_get()
303 & cmd->resp[0]) in mmc_spi_response_get()
308 switch (mmc_spi_resp_type(cmd)) { in mmc_spi_response_get()
318 timeout_ms = cmd->busy_timeout ? cmd->busy_timeout : in mmc_spi_response_get()
339 cmd->resp[0] |= (rotator & 0xFF00); in mmc_spi_response_get()
341 cmd->resp[0] |= *cp << 8; in mmc_spi_response_get()
348 cmd->resp[1] = 0; in mmc_spi_response_get()
350 cmd->resp[1] <<= 8; in mmc_spi_response_get()
361 cmd->resp[1] |= (rotator >> 8); in mmc_spi_response_get()
364 cmd->resp[1] |= *cp++; in mmc_spi_response_get()
375 mmc_spi_resp_type(cmd)); in mmc_spi_response_get()
383 tag, cmd->resp[0], cmd->resp[1]); in mmc_spi_response_get()
390 cmd->error = value; in mmc_spi_response_get()
404 struct mmc_command *cmd, int cs_on) in mmc_spi_command_send() argument
426 cp[1] = 0x40 | cmd->opcode; in mmc_spi_command_send()
427 put_unaligned_be32(cmd->arg, cp + 2); in mmc_spi_command_send()
471 if (cmd->flags & MMC_RSP_SPI_S2) /* R2/R5 */ in mmc_spi_command_send()
473 else if (cmd->flags & MMC_RSP_SPI_B4) /* R3/R4/R7 */ in mmc_spi_command_send()
475 else if (cmd->flags & MMC_RSP_BUSY) /* R1B */ in mmc_spi_command_send()
481 cmd->opcode, maptype(cmd)); in mmc_spi_command_send()
496 cmd->error = status; in mmc_spi_command_send()
501 return mmc_spi_response_get(host, cmd, cs_on); in mmc_spi_command_send()
775 mmc_spi_data_do(struct mmc_spi_host *host, struct mmc_command *cmd, in mmc_spi_data_do() argument
912 struct mmc_command *cmd; in mmc_spi_request() local
915 cmd = mrq->cmd; in mmc_spi_request()
916 if (!mmc_spi_resp_type(cmd)) { in mmc_spi_request()
918 cmd->error = -EINVAL; in mmc_spi_request()
922 cmd = mrq->stop; in mmc_spi_request()
923 if (cmd && !mmc_spi_resp_type(cmd)) { in mmc_spi_request()
925 cmd->error = -EINVAL; in mmc_spi_request()
942 status = mmc_spi_command_send(host, mrq, mrq->cmd, mrq->data != NULL); in mmc_spi_request()
944 mmc_spi_data_do(host, mrq->cmd, mrq->data, mrq->data->blksz); in mmc_spi_request()