Lines Matching refs:cmd
22 static int wait_for_command_end(struct mmc *dev, struct mmc_cmd *cmd) in wait_for_command_end() argument
28 if ((cmd->resp_type & MMC_RSP_PRESENT)) in wait_for_command_end()
39 debug("CMD%d time out\n", cmd->cmdidx); in wait_for_command_end()
42 (cmd->resp_type & MMC_RSP_CRC)) { in wait_for_command_end()
43 printf("CMD%d CRC error\n", cmd->cmdidx); in wait_for_command_end()
47 if (cmd->resp_type & MMC_RSP_PRESENT) { in wait_for_command_end()
48 cmd->response[0] = readl(&host->base->response0); in wait_for_command_end()
49 cmd->response[1] = readl(&host->base->response1); in wait_for_command_end()
50 cmd->response[2] = readl(&host->base->response2); in wait_for_command_end()
51 cmd->response[3] = readl(&host->base->response3); in wait_for_command_end()
54 cmd->cmdidx, cmd->response[0], cmd->response[1], in wait_for_command_end()
55 cmd->response[2], cmd->response[3]); in wait_for_command_end()
62 static int do_command(struct mmc *dev, struct mmc_cmd *cmd) in do_command() argument
68 sdi_cmd = ((cmd->cmdidx & SDI_CMD_CMDINDEX_MASK) | SDI_CMD_CPSMEN); in do_command()
70 if (cmd->resp_type) { in do_command()
72 if (cmd->resp_type & MMC_RSP_136) in do_command()
76 writel((u32)cmd->cmdarg, &host->base->argument); in do_command()
79 result = wait_for_command_end(dev, cmd); in do_command()
82 if ((result == 0) && (cmd->cmdidx == MMC_CMD_ALL_SEND_CID)) in do_command()
86 if ((result == 0) && (cmd->cmdidx == MMC_CMD_SET_RELATIVE_ADDR)) { in do_command()
209 struct mmc_cmd *cmd, in do_data_transfer() argument
235 error = do_command(dev, cmd); in do_data_transfer()
242 error = do_command(dev, cmd); in do_data_transfer()
255 struct mmc_cmd *cmd, in host_request() argument
261 result = do_data_transfer(dev, cmd, data); in host_request()
263 result = do_command(dev, cmd); in host_request()