Lines Matching refs:cmd
98 static int tmio_sd_check_error(struct udevice *dev, struct mmc_cmd *cmd) in tmio_sd_check_error() argument
119 if ((cmd->cmdidx != MMC_CMD_SEND_TUNING_BLOCK) && in tmio_sd_check_error()
120 (cmd->cmdidx != MMC_CMD_SEND_TUNING_BLOCK_HS200)) in tmio_sd_check_error()
134 static int tmio_sd_wait_for_irq(struct udevice *dev, struct mmc_cmd *cmd, in tmio_sd_wait_for_irq() argument
147 ret = tmio_sd_check_error(dev, cmd); in tmio_sd_wait_for_irq()
183 static int tmio_sd_pio_read_one_block(struct udevice *dev, struct mmc_cmd *cmd, in tmio_sd_pio_read_one_block() argument
190 ret = tmio_sd_wait_for_irq(dev, cmd, TMIO_SD_INFO2, in tmio_sd_pio_read_one_block()
236 static int tmio_sd_pio_write_one_block(struct udevice *dev, struct mmc_cmd *cmd, in tmio_sd_pio_write_one_block() argument
243 ret = tmio_sd_wait_for_irq(dev, cmd, TMIO_SD_INFO2, in tmio_sd_pio_write_one_block()
260 static int tmio_sd_pio_xfer(struct udevice *dev, struct mmc_cmd *cmd, in tmio_sd_pio_xfer() argument
269 ret = tmio_sd_pio_read_one_block(dev, cmd, dest, in tmio_sd_pio_xfer()
272 ret = tmio_sd_pio_write_one_block(dev, cmd, src, in tmio_sd_pio_xfer()
405 int tmio_sd_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, in tmio_sd_send_cmd() argument
426 tmio_sd_writel(priv, cmd->cmdarg, TMIO_SD_ARG); in tmio_sd_send_cmd()
428 tmp = cmd->cmdidx; in tmio_sd_send_cmd()
450 switch (cmd->resp_type) { in tmio_sd_send_cmd()
472 cmd->cmdidx, tmp, cmd->cmdarg); in tmio_sd_send_cmd()
475 ret = tmio_sd_wait_for_irq(dev, cmd, TMIO_SD_INFO1, in tmio_sd_send_cmd()
480 if (cmd->resp_type & MMC_RSP_136) { in tmio_sd_send_cmd()
486 cmd->response[0] = ((rsp_127_104 & 0x00ffffff) << 8) | in tmio_sd_send_cmd()
488 cmd->response[1] = ((rsp_103_72 & 0x00ffffff) << 8) | in tmio_sd_send_cmd()
490 cmd->response[2] = ((rsp_71_40 & 0x00ffffff) << 8) | in tmio_sd_send_cmd()
492 cmd->response[3] = (rsp_39_8 & 0xffffff) << 8; in tmio_sd_send_cmd()
495 cmd->response[0] = tmio_sd_readl(priv, TMIO_SD_RSP10); in tmio_sd_send_cmd()
504 ret = tmio_sd_pio_xfer(dev, cmd, data); in tmio_sd_send_cmd()
508 ret = tmio_sd_wait_for_irq(dev, cmd, TMIO_SD_INFO1, in tmio_sd_send_cmd()
514 return tmio_sd_wait_for_irq(dev, cmd, TMIO_SD_INFO2, in tmio_sd_send_cmd()