Lines Matching defs:cmd

326 	u32 cmd;
405 struct mmc_command *cmd;
435 u32 hs200_cmd_int_delay; /* cmd internal delay for HS200/SDR104 */
436 u32 hs400_cmd_int_delay; /* cmd internal delay for HS400 */
438 /* cmd response sample selection for HS400 */
626 struct mmc_request *mrq, struct mmc_command *cmd);
943 struct mmc_request *mrq, struct mmc_command *cmd)
947 switch (mmc_resp_type(cmd)) {
971 struct mmc_request *mrq, struct mmc_command *cmd)
978 u32 opcode = cmd->opcode;
979 u32 resp = msdc_cmd_find_resp(host, mrq, cmd);
984 if ((opcode == SD_IO_RW_DIRECT && cmd->flags == (unsigned int) -1) ||
991 (opcode == SD_SWITCH && mmc_cmd_type(cmd) == MMC_CMD_ADTC) ||
992 (opcode == SD_APP_SD_STATUS && mmc_cmd_type(cmd) == MMC_CMD_ADTC) ||
993 (opcode == MMC_SEND_EXT_CSD && mmc_cmd_type(cmd) == MMC_CMD_ADTC))
996 if (cmd->data) {
997 struct mmc_data *data = cmd->data;
1026 struct mmc_command *cmd, struct mmc_data *data)
1039 dev_dbg(host->dev, "%s: cmd=%d DMA data: %d blocks; read=%d\n",
1040 __func__, cmd->opcode, data->blocks, read);
1044 struct mmc_command *cmd)
1046 u32 *rsp = cmd->resp;
1051 cmd->error = 0;
1055 cmd->error = -EILSEQ;
1058 cmd->error = -ETIMEDOUT;
1063 __func__, cmd->opcode, cmd->arg, rsp[0], cmd->error);
1065 return cmd->error;
1095 struct mmc_command *cmd, struct mmc_data *data)
1098 dev_dbg(host->dev, "%s: cmd=%d arg=%08X; host->error=0x%08X\n",
1099 __func__, cmd->opcode, cmd->arg, host->error);
1116 msdc_track_cmd_data(host, mrq->cmd, mrq->data);
1128 struct mmc_request *mrq, struct mmc_command *cmd)
1135 if (mrq->sbc && cmd == mrq->cmd &&
1148 done = !host->cmd;
1149 host->cmd = NULL;
1154 rsp = cmd->resp;
1158 if (cmd->flags & MMC_RSP_PRESENT) {
1159 if (cmd->flags & MMC_RSP_136) {
1171 (cmd->opcode != MMC_SEND_TUNING_BLOCK &&
1172 cmd->opcode != MMC_SEND_TUNING_BLOCK_HS200))
1180 cmd->error = -EILSEQ;
1183 cmd->error = -ETIMEDOUT;
1187 if (cmd->error)
1189 "%s: cmd=%d arg=%08X; rsp %08X; cmd_error=%d\n",
1190 __func__, cmd->opcode, cmd->arg, rsp[0],
1191 cmd->error);
1193 msdc_cmd_next(host, mrq, cmd);
1202 struct mmc_request *mrq, struct mmc_command *cmd)
1213 msdc_cmd_done(host, MSDC_INT_CMDTMO, mrq, cmd);
1217 if (mmc_resp_type(cmd) == MMC_RSP_R1B || cmd->data) {
1226 msdc_cmd_done(host, MSDC_INT_CMDTMO, mrq, cmd);
1234 struct mmc_request *mrq, struct mmc_command *cmd)
1239 WARN_ON(host->cmd);
1240 host->cmd = cmd;
1243 if (!msdc_cmd_is_ready(host, mrq, cmd))
1252 cmd->error = 0;
1253 rawcmd = msdc_cmd_prepare_raw_cmd(host, mrq, cmd);
1259 writel(cmd->arg, host->base + SDC_ARG);
1264 struct mmc_request *mrq, struct mmc_command *cmd)
1266 if ((cmd->error &&
1267 !(cmd->error == -EILSEQ &&
1268 (cmd->opcode == MMC_SEND_TUNING_BLOCK ||
1269 cmd->opcode == MMC_SEND_TUNING_BLOCK_HS200))) ||
1272 else if (cmd == mrq->sbc)
1273 msdc_start_command(host, mrq, mrq->cmd);
1274 else if (!cmd->data)
1277 msdc_start_data(host, mrq, cmd, cmd->data);
1299 msdc_start_command(host, mrq, mrq->cmd);
1332 if (mmc_op_multi(mrq->cmd->opcode) && mrq->stop && !mrq->stop->error &&
1383 dev_dbg(host->dev, "%s: cmd=%d; blocks=%d",
1384 __func__, mrq->cmd->opcode, data->blocks);
1461 dev_err(host->dev, "%s: aborting cmd/data/mrq\n", __func__);
1463 dev_err(host->dev, "%s: aborting mrq=%p cmd=%d\n", __func__,
1464 host->mrq, host->mrq->cmd->opcode);
1465 if (host->cmd) {
1466 dev_err(host->dev, "%s: aborting cmd=%d\n",
1467 __func__, host->cmd->opcode);
1469 host->cmd);
1471 dev_err(host->dev, "%s: abort data: cmd%d; %d blocks\n",
1472 __func__, host->mrq->cmd->opcode,
1545 struct mmc_command *cmd;
1558 cmd = host->cmd;
1592 if (cmd)
1593 msdc_cmd_done(host, events, mrq, cmd);
2005 dev_dbg(host->dev, "Final cmd pad delay: %x\n", final_delay);
2055 dev_dbg(host->dev, "Final cmd pad delay: %x\n", final_delay);
2361 of_property_read_u32(pdev->dev.of_node, "mediatek,hs200-cmd-int-delay",
2364 of_property_read_u32(pdev->dev.of_node, "mediatek,hs400-cmd-int-delay",
2368 "mediatek,hs400-cmd-resp-sel-rising"))