Lines Matching full:cmd
33 struct mmc_command *cmd; member
39 struct mmc_command cmd = {}; in mmc_app_cmd() local
44 cmd.opcode = MMC_APP_CMD; in mmc_app_cmd()
47 cmd.arg = card->rca << 16; in mmc_app_cmd()
48 cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC; in mmc_app_cmd()
50 cmd.arg = 0; in mmc_app_cmd()
51 cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_BCR; in mmc_app_cmd()
54 err = mmc_wait_for_cmd(host, &cmd, 0); in mmc_app_cmd()
59 if (!mmc_host_is_spi(host) && !(cmd.resp[0] & R1_APP_CMD)) in mmc_app_cmd()
67 struct mmc_command *cmd) in mmc_wait_for_app_cmd() argument
81 if (cmd->resp[0] & R1_SPI_ILLEGAL_COMMAND) in mmc_wait_for_app_cmd()
89 memset(cmd->resp, 0, sizeof(cmd->resp)); in mmc_wait_for_app_cmd()
90 cmd->retries = 0; in mmc_wait_for_app_cmd()
92 mrq.cmd = cmd; in mmc_wait_for_app_cmd()
93 cmd->data = NULL; in mmc_wait_for_app_cmd()
97 err = cmd->error; in mmc_wait_for_app_cmd()
98 if (!cmd->error) in mmc_wait_for_app_cmd()
103 if (cmd->resp[0] & R1_SPI_ILLEGAL_COMMAND) in mmc_wait_for_app_cmd()
113 struct mmc_command cmd = {}; in mmc_app_set_bus_width() local
115 cmd.opcode = SD_APP_SET_BUS_WIDTH; in mmc_app_set_bus_width()
116 cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; in mmc_app_set_bus_width()
120 cmd.arg = SD_BUS_WIDTH_1; in mmc_app_set_bus_width()
123 cmd.arg = SD_BUS_WIDTH_4; in mmc_app_set_bus_width()
129 return mmc_wait_for_app_cmd(card->host, card, &cmd); in mmc_app_set_bus_width()
136 struct mmc_command *cmd = data->cmd; in sd_app_op_cond_cb() local
142 err = mmc_wait_for_app_cmd(host, NULL, cmd); in sd_app_op_cond_cb()
152 if (!(cmd->resp[0] & R1_SPI_IDLE)) in sd_app_op_cond_cb()
154 } else if (cmd->resp[0] & MMC_CARD_BUSY) { in sd_app_op_cond_cb()
164 struct mmc_command cmd = {}; in mmc_send_app_op_cond() local
168 .cmd = &cmd in mmc_send_app_op_cond()
172 cmd.opcode = SD_APP_OP_COND; in mmc_send_app_op_cond()
174 cmd.arg = ocr & (1 << 30); /* SPI only defines one bit */ in mmc_send_app_op_cond()
176 cmd.arg = ocr; in mmc_send_app_op_cond()
177 cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R3 | MMC_CMD_BCR; in mmc_send_app_op_cond()
186 *rocr = cmd.resp[0]; in mmc_send_app_op_cond()
194 struct mmc_command cmd = {}; in __mmc_send_if_cond() local
204 cmd.opcode = SD_SEND_IF_COND; in __mmc_send_if_cond()
205 cmd.arg = ((ocr & 0xFF8000) != 0) << 8 | pcie_bits << 8 | test_pattern; in __mmc_send_if_cond()
206 cmd.flags = MMC_RSP_SPI_R7 | MMC_RSP_R7 | MMC_CMD_BCR; in __mmc_send_if_cond()
208 err = mmc_wait_for_cmd(host, &cmd, 0); in __mmc_send_if_cond()
213 result_pattern = cmd.resp[1] & 0xFF; in __mmc_send_if_cond()
215 result_pattern = cmd.resp[0] & 0xFF; in __mmc_send_if_cond()
221 *resp = cmd.resp[0]; in __mmc_send_if_cond()
270 struct mmc_command cmd = {}; in mmc_send_relative_addr() local
272 cmd.opcode = SD_SEND_RELATIVE_ADDR; in mmc_send_relative_addr()
273 cmd.arg = 0; in mmc_send_relative_addr()
274 cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR; in mmc_send_relative_addr()
276 err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES); in mmc_send_relative_addr()
280 *rca = cmd.resp[0] >> 16; in mmc_send_relative_addr()
289 struct mmc_command cmd = {}; in mmc_app_send_scr() local
307 mrq.cmd = &cmd; in mmc_app_send_scr()
310 cmd.opcode = SD_APP_SEND_SCR; in mmc_app_send_scr()
311 cmd.arg = 0; in mmc_app_send_scr()
312 cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC; in mmc_app_send_scr()
331 if (cmd.error) in mmc_app_send_scr()
332 return cmd.error; in mmc_app_send_scr()
360 struct mmc_command cmd = {}; in mmc_app_sd_status() local
370 mrq.cmd = &cmd; in mmc_app_sd_status()
373 cmd.opcode = SD_APP_SD_STATUS; in mmc_app_sd_status()
374 cmd.arg = 0; in mmc_app_sd_status()
375 cmd.flags = MMC_RSP_SPI_R2 | MMC_RSP_R1 | MMC_CMD_ADTC; in mmc_app_sd_status()
389 if (cmd.error) in mmc_app_sd_status()
390 return cmd.error; in mmc_app_sd_status()