Lines Matching full:cmd

34 	struct mmc_command *cmd;  member
40 struct mmc_command cmd = {}; in mmc_app_cmd() local
54 cmd.opcode = MMC_APP_CMD; in mmc_app_cmd()
57 cmd.arg = card->rca << 16; in mmc_app_cmd()
58 cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC; in mmc_app_cmd()
60 cmd.arg = 0; in mmc_app_cmd()
61 cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_BCR; in mmc_app_cmd()
64 err = mmc_wait_for_cmd(host, &cmd, 0); in mmc_app_cmd()
69 if (!mmc_host_is_spi(host) && !(cmd.resp[0] & R1_APP_CMD)) in mmc_app_cmd()
77 struct mmc_command *cmd) in mmc_wait_for_app_cmd() argument
91 if (cmd->resp[0] & R1_SPI_ILLEGAL_COMMAND) in mmc_wait_for_app_cmd()
99 memset(cmd->resp, 0, sizeof(cmd->resp)); in mmc_wait_for_app_cmd()
100 cmd->retries = 0; in mmc_wait_for_app_cmd()
102 mrq.cmd = cmd; in mmc_wait_for_app_cmd()
103 cmd->data = NULL; in mmc_wait_for_app_cmd()
107 err = cmd->error; in mmc_wait_for_app_cmd()
108 if (!cmd->error) in mmc_wait_for_app_cmd()
113 if (cmd->resp[0] & R1_SPI_ILLEGAL_COMMAND) in mmc_wait_for_app_cmd()
123 struct mmc_command cmd = {}; in mmc_app_set_bus_width() local
125 cmd.opcode = SD_APP_SET_BUS_WIDTH; in mmc_app_set_bus_width()
126 cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; in mmc_app_set_bus_width()
130 cmd.arg = SD_BUS_WIDTH_1; in mmc_app_set_bus_width()
133 cmd.arg = SD_BUS_WIDTH_4; in mmc_app_set_bus_width()
139 return mmc_wait_for_app_cmd(card->host, card, &cmd); in mmc_app_set_bus_width()
146 struct mmc_command *cmd = data->cmd; in sd_app_op_cond_cb() local
152 err = mmc_wait_for_app_cmd(host, NULL, cmd); in sd_app_op_cond_cb()
162 if (!(cmd->resp[0] & R1_SPI_IDLE)) in sd_app_op_cond_cb()
164 } else if (cmd->resp[0] & MMC_CARD_BUSY) { in sd_app_op_cond_cb()
174 struct mmc_command cmd = {}; in mmc_send_app_op_cond() local
178 .cmd = &cmd in mmc_send_app_op_cond()
182 cmd.opcode = SD_APP_OP_COND; in mmc_send_app_op_cond()
184 cmd.arg = ocr & (1 << 30); /* SPI only defines one bit */ in mmc_send_app_op_cond()
186 cmd.arg = ocr; in mmc_send_app_op_cond()
187 cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R3 | MMC_CMD_BCR; in mmc_send_app_op_cond()
196 *rocr = cmd.resp[0]; in mmc_send_app_op_cond()
203 struct mmc_command cmd = { in mmc_send_ext_addr() local
212 return mmc_wait_for_cmd(host, &cmd, 0); in mmc_send_ext_addr()
218 struct mmc_command cmd = {}; in __mmc_send_if_cond() local
228 cmd.opcode = SD_SEND_IF_COND; in __mmc_send_if_cond()
229 cmd.arg = ((ocr & 0xFF8000) != 0) << 8 | pcie_bits << 8 | test_pattern; in __mmc_send_if_cond()
230 cmd.flags = MMC_RSP_SPI_R7 | MMC_RSP_R7 | MMC_CMD_BCR; in __mmc_send_if_cond()
232 err = mmc_wait_for_cmd(host, &cmd, 0); in __mmc_send_if_cond()
237 result_pattern = cmd.resp[1] & 0xFF; in __mmc_send_if_cond()
239 result_pattern = cmd.resp[0] & 0xFF; in __mmc_send_if_cond()
245 *resp = cmd.resp[0]; in __mmc_send_if_cond()
294 struct mmc_command cmd = {}; in mmc_send_relative_addr() local
296 cmd.opcode = SD_SEND_RELATIVE_ADDR; in mmc_send_relative_addr()
297 cmd.arg = 0; in mmc_send_relative_addr()
298 cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR; in mmc_send_relative_addr()
300 err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES); in mmc_send_relative_addr()
304 *rca = cmd.resp[0] >> 16; in mmc_send_relative_addr()
313 struct mmc_command cmd = {}; in mmc_app_send_scr() local
331 mrq.cmd = &cmd; in mmc_app_send_scr()
334 cmd.opcode = SD_APP_SEND_SCR; in mmc_app_send_scr()
335 cmd.arg = 0; in mmc_app_send_scr()
336 cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC; in mmc_app_send_scr()
355 if (cmd.error) in mmc_app_send_scr()
356 return cmd.error; in mmc_app_send_scr()
384 struct mmc_command cmd = {}; in mmc_app_sd_status() local
394 mrq.cmd = &cmd; in mmc_app_sd_status()
397 cmd.opcode = SD_APP_SD_STATUS; in mmc_app_sd_status()
398 cmd.arg = 0; in mmc_app_sd_status()
399 cmd.flags = MMC_RSP_SPI_R2 | MMC_RSP_R1 | MMC_CMD_ADTC; in mmc_app_sd_status()
413 if (cmd.error) in mmc_app_sd_status()
414 return cmd.error; in mmc_app_sd_status()