Lines Matching refs:cmd

251 				   struct mmc_cmd *cmd, u32 cmd_param,  in stm32_sdmmc2_start_cmd()  argument
260 cmd_param |= cmd->cmdidx | SDMMC_CMD_CPSMEN; in stm32_sdmmc2_start_cmd()
261 if (cmd->resp_type & MMC_RSP_PRESENT) { in stm32_sdmmc2_start_cmd()
262 if (cmd->resp_type & MMC_RSP_136) in stm32_sdmmc2_start_cmd()
264 else if (cmd->resp_type & MMC_RSP_CRC) in stm32_sdmmc2_start_cmd()
283 if (cmd->resp_type & MMC_RSP_BUSY) in stm32_sdmmc2_start_cmd()
294 writel(cmd->cmdarg, plat->base + SDMMC_ARG); in stm32_sdmmc2_start_cmd()
301 struct mmc_cmd *cmd, in stm32_sdmmc2_end_cmd() argument
309 if (cmd->resp_type & MMC_RSP_PRESENT) { in stm32_sdmmc2_end_cmd()
311 if (cmd->resp_type & MMC_RSP_CRC) in stm32_sdmmc2_end_cmd()
330 status, cmd->cmdidx); in stm32_sdmmc2_end_cmd()
335 if (status & SDMMC_STA_CCRCFAIL && cmd->resp_type & MMC_RSP_CRC) { in stm32_sdmmc2_end_cmd()
337 status, cmd->cmdidx); in stm32_sdmmc2_end_cmd()
342 if (status & SDMMC_STA_CMDREND && cmd->resp_type & MMC_RSP_PRESENT) { in stm32_sdmmc2_end_cmd()
343 cmd->response[0] = readl(plat->base + SDMMC_RESP1); in stm32_sdmmc2_end_cmd()
344 if (cmd->resp_type & MMC_RSP_136) { in stm32_sdmmc2_end_cmd()
345 cmd->response[1] = readl(plat->base + SDMMC_RESP2); in stm32_sdmmc2_end_cmd()
346 cmd->response[2] = readl(plat->base + SDMMC_RESP3); in stm32_sdmmc2_end_cmd()
347 cmd->response[3] = readl(plat->base + SDMMC_RESP4); in stm32_sdmmc2_end_cmd()
351 if (cmd->resp_type & MMC_RSP_BUSY && in stm32_sdmmc2_end_cmd()
380 struct mmc_cmd *cmd, in stm32_sdmmc2_end_data() argument
407 status, cmd->cmdidx); in stm32_sdmmc2_end_data()
415 status, cmd->cmdidx); in stm32_sdmmc2_end_data()
422 status, cmd->cmdidx); in stm32_sdmmc2_end_data()
429 status, cmd->cmdidx); in stm32_sdmmc2_end_data()
436 status, cmd->cmdidx); in stm32_sdmmc2_end_data()
444 static int stm32_sdmmc2_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, in stm32_sdmmc2_send_cmd() argument
463 stm32_sdmmc2_start_cmd(dev, cmd, cmdat, &ctx); in stm32_sdmmc2_send_cmd()
466 cmd->cmdidx, data ? ctx.data_length : 0, data); in stm32_sdmmc2_send_cmd()
468 ret = stm32_sdmmc2_end_cmd(dev, cmd, &ctx); in stm32_sdmmc2_send_cmd()
471 ret = stm32_sdmmc2_end_data(dev, cmd, data, &ctx); in stm32_sdmmc2_send_cmd()
482 if (ctx.dpsm_abort && (cmd->cmdidx != MMC_CMD_STOP_TRANSMISSION)) { in stm32_sdmmc2_send_cmd()
501 dev_err(dev, "cmd %d failed, retrying ...\n", cmd->cmdidx); in stm32_sdmmc2_send_cmd()
506 dev_dbg(dev, "end for CMD %d, ret = %d\n", cmd->cmdidx, ret); in stm32_sdmmc2_send_cmd()