Lines Matching refs:cmd
124 struct mmc_command * cmd; member
345 mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd) in mmc_omap_start_command() argument
352 host->cmd = cmd; in mmc_omap_start_command()
358 switch (mmc_resp_type(cmd)) { in mmc_omap_start_command()
373 dev_err(mmc_dev(host->mmc), "Invalid response type: %04x\n", mmc_resp_type(cmd)); in mmc_omap_start_command()
377 if (mmc_cmd_type(cmd) == MMC_CMD_ADTC) { in mmc_omap_start_command()
379 } else if (mmc_cmd_type(cmd) == MMC_CMD_BC) { in mmc_omap_start_command()
381 } else if (mmc_cmd_type(cmd) == MMC_CMD_BCR) { in mmc_omap_start_command()
387 cmdreg = cmd->opcode | (resptype << 8) | (cmdtype << 12); in mmc_omap_start_command()
392 if (cmd->flags & MMC_RSP_BUSY) in mmc_omap_start_command()
401 OMAP_MMC_WRITE(host, ARGL, cmd->arg & 0xffff); in mmc_omap_start_command()
402 OMAP_MMC_WRITE(host, ARGH, cmd->arg >> 16); in mmc_omap_start_command()
408 if (cmd->opcode == MMC_ERASE) in mmc_omap_start_command()
562 mmc_omap_cmd_done(struct mmc_omap_host *host, struct mmc_command *cmd) in mmc_omap_cmd_done() argument
564 host->cmd = NULL; in mmc_omap_cmd_done()
568 if (cmd->flags & MMC_RSP_PRESENT) { in mmc_omap_cmd_done()
569 if (cmd->flags & MMC_RSP_136) { in mmc_omap_cmd_done()
571 cmd->resp[3] = in mmc_omap_cmd_done()
574 cmd->resp[2] = in mmc_omap_cmd_done()
577 cmd->resp[1] = in mmc_omap_cmd_done()
580 cmd->resp[0] = in mmc_omap_cmd_done()
585 cmd->resp[0] = in mmc_omap_cmd_done()
591 if (host->data == NULL || cmd->error) { in mmc_omap_cmd_done()
599 mmc_request_done(mmc, cmd->mrq); in mmc_omap_cmd_done()
611 BUG_ON(!host->cmd); in mmc_omap_abort_command()
614 host->cmd->opcode); in mmc_omap_abort_command()
616 if (host->cmd->error == 0) in mmc_omap_abort_command()
617 host->cmd->error = -ETIMEDOUT; in mmc_omap_abort_command()
620 struct mmc_command *cmd; in mmc_omap_abort_command() local
623 cmd = host->cmd; in mmc_omap_abort_command()
624 host->cmd = NULL; in mmc_omap_abort_command()
630 mmc_request_done(mmc, cmd->mrq); in mmc_omap_abort_command()
632 mmc_omap_cmd_done(host, host->cmd); in mmc_omap_abort_command()
645 if (host->cmd != NULL && !host->abort) { in mmc_omap_cmd_timer()
740 if (host->cmd == NULL && host->data == NULL) { in mmc_omap_irq()
757 int cmd; in mmc_omap_irq() local
760 if (host->cmd != NULL) in mmc_omap_irq()
761 cmd = host->cmd->opcode; in mmc_omap_irq()
763 cmd = -1; in mmc_omap_irq()
765 status, cmd); in mmc_omap_irq()
781 cmd); in mmc_omap_irq()
802 if (host->cmd) { in mmc_omap_irq()
809 cmd); in mmc_omap_irq()
810 host->cmd->error = -ETIMEDOUT; in mmc_omap_irq()
817 if (host->cmd) { in mmc_omap_irq()
820 cmd, host->cmd->arg); in mmc_omap_irq()
821 host->cmd->error = -EILSEQ; in mmc_omap_irq()
832 cmd); in mmc_omap_irq()
855 if (end_command && host->cmd) in mmc_omap_irq()
856 mmc_omap_cmd_done(host, host->cmd); in mmc_omap_irq()
1087 mmc_omap_start_command(host, req->cmd); in mmc_omap_start_request()