Lines Matching refs:cmd

36 static int wait_for_command_end(struct mmc *dev, struct mmc_cmd *cmd)  in wait_for_command_end()  argument
42 if ((cmd->resp_type & MMC_RSP_PRESENT)) in wait_for_command_end()
53 debug("CMD%d time out\n", cmd->cmdidx); in wait_for_command_end()
56 (cmd->resp_type & MMC_RSP_CRC)) { in wait_for_command_end()
57 printf("CMD%d CRC error\n", cmd->cmdidx); in wait_for_command_end()
61 if (cmd->resp_type & MMC_RSP_PRESENT) { in wait_for_command_end()
62 cmd->response[0] = readl(&host->base->response0); in wait_for_command_end()
63 cmd->response[1] = readl(&host->base->response1); in wait_for_command_end()
64 cmd->response[2] = readl(&host->base->response2); in wait_for_command_end()
65 cmd->response[3] = readl(&host->base->response3); in wait_for_command_end()
68 cmd->cmdidx, cmd->response[0], cmd->response[1], in wait_for_command_end()
69 cmd->response[2], cmd->response[3]); in wait_for_command_end()
76 static int do_command(struct mmc *dev, struct mmc_cmd *cmd) in do_command() argument
82 sdi_cmd = ((cmd->cmdidx & SDI_CMD_CMDINDEX_MASK) | SDI_CMD_CPSMEN); in do_command()
84 if (cmd->resp_type) { in do_command()
86 if (cmd->resp_type & MMC_RSP_136) in do_command()
90 writel((u32)cmd->cmdarg, &host->base->argument); in do_command()
93 result = wait_for_command_end(dev, cmd); in do_command()
96 if ((result == 0) && (cmd->cmdidx == MMC_CMD_ALL_SEND_CID)) in do_command()
100 if ((result == 0) && (cmd->cmdidx == MMC_CMD_SET_RELATIVE_ADDR)) { in do_command()
223 struct mmc_cmd *cmd, in do_data_transfer() argument
249 error = do_command(dev, cmd); in do_data_transfer()
256 error = do_command(dev, cmd); in do_data_transfer()
269 struct mmc_cmd *cmd, in host_request() argument
275 result = do_data_transfer(dev, cmd, data); in host_request()
277 result = do_command(dev, cmd); in host_request()
482 static int dm_host_request(struct udevice *dev, struct mmc_cmd *cmd, in dm_host_request() argument
487 return host_request(mmc, cmd, data); in dm_host_request()