Lines Matching refs:cmdinfo
97 esp_err_t sdspi_host_do_transaction(int slot, sdmmc_command_t *cmdinfo) in sdspi_host_do_transaction() argument
102 make_hw_cmd(cmdinfo->opcode, cmdinfo->arg, cmdinfo->timeout_ms, &hw_cmd); in sdspi_host_do_transaction()
106 if (SCF_CMD(cmdinfo->flags) == SCF_CMD_ADTC) { in sdspi_host_do_transaction()
108 } else if (SCF_CMD(cmdinfo->flags) == (SCF_CMD_ADTC | SCF_CMD_READ)) { in sdspi_host_do_transaction()
113 if (cmdinfo->datalen > SDSPI_MAX_DATA_LEN) { in sdspi_host_do_transaction()
122 if (!s_app_cmd && cmdinfo->opcode == SD_SEND_IF_COND) { in sdspi_host_do_transaction()
124 } else if (!s_app_cmd && cmdinfo->opcode == MMC_SEND_STATUS) { in sdspi_host_do_transaction()
126 } else if (!s_app_cmd && cmdinfo->opcode == SD_READ_OCR) { in sdspi_host_do_transaction()
128 } else if (s_app_cmd && cmdinfo->opcode == SD_APP_SD_STATUS) { in sdspi_host_do_transaction()
130 } else if (!s_app_cmd && cmdinfo->opcode == MMC_GO_IDLE_STATE && in sdspi_host_do_transaction()
131 !(cmdinfo->flags & SCF_RSP_R1)) { in sdspi_host_do_transaction()
134 } else if (!s_app_cmd && cmdinfo->opcode == SD_IO_SEND_OP_COND) { in sdspi_host_do_transaction()
136 } else if (!s_app_cmd && cmdinfo->opcode == SD_IO_RW_DIRECT) { in sdspi_host_do_transaction()
138 } else if (!s_app_cmd && cmdinfo->opcode == SD_IO_RW_EXTENDED) { in sdspi_host_do_transaction()
140 if (cmdinfo->arg & SD_ARG_CMD53_WRITE) flags |= SDSPI_CMD_FLAG_WRITE; in sdspi_host_do_transaction()
142 if (cmdinfo->arg & SD_ARG_CMD53_BLOCK_MODE) flags |= SDSPI_CMD_FLAG_MULTI_BLK; in sdspi_host_do_transaction()
149 cmdinfo->data, cmdinfo->datalen, flags); in sdspi_host_do_transaction()
156 cmdinfo->response[0] = hw_cmd.r1; in sdspi_host_do_transaction()
157 r1_response_to_err(hw_cmd.r1, cmdinfo->opcode, &ret); in sdspi_host_do_transaction()
159 cmdinfo->response[0] = (((uint32_t)hw_cmd.r1) << 8) | (hw_cmd.response[0] >> 24); in sdspi_host_do_transaction()
161 r1_response_to_err(hw_cmd.r1, cmdinfo->opcode, &ret); in sdspi_host_do_transaction()
162 cmdinfo->response[0] = __builtin_bswap32(hw_cmd.response[0]); in sdspi_host_do_transaction()
164 r1_sdio_response_to_err(hw_cmd.r1, cmdinfo->opcode, &ret); in sdspi_host_do_transaction()
165 cmdinfo->response[0] = __builtin_bswap32(hw_cmd.response[0]); in sdspi_host_do_transaction()
167 r1_sdio_response_to_err(hw_cmd.r1, cmdinfo->opcode, &ret); in sdspi_host_do_transaction()
168 cmdinfo->response[0] = hw_cmd.response[0]; in sdspi_host_do_transaction()
174 s_app_cmd = (cmdinfo->opcode == MMC_APP_CMD); in sdspi_host_do_transaction()