Lines Matching refs:cmd
127 struct mmc_cmd *cmd, in tegra_mmc_wait_inhibit() argument
142 if ((data == NULL) && (cmd->resp_type & MMC_RSP_BUSY)) in tegra_mmc_wait_inhibit()
157 static int tegra_mmc_send_cmd_bounced(struct udevice *dev, struct mmc_cmd *cmd, in tegra_mmc_send_cmd_bounced() argument
168 result = tegra_mmc_wait_inhibit(priv, cmd, data, 10 /* ms */); in tegra_mmc_send_cmd_bounced()
176 debug("cmd->arg: %08x\n", cmd->cmdarg); in tegra_mmc_send_cmd_bounced()
177 writel(cmd->cmdarg, &priv->reg->argument); in tegra_mmc_send_cmd_bounced()
182 if ((cmd->resp_type & MMC_RSP_136) && (cmd->resp_type & MMC_RSP_BUSY)) in tegra_mmc_send_cmd_bounced()
197 if (!(cmd->resp_type & MMC_RSP_PRESENT)) in tegra_mmc_send_cmd_bounced()
199 else if (cmd->resp_type & MMC_RSP_136) in tegra_mmc_send_cmd_bounced()
201 else if (cmd->resp_type & MMC_RSP_BUSY) in tegra_mmc_send_cmd_bounced()
206 if (cmd->resp_type & MMC_RSP_CRC) in tegra_mmc_send_cmd_bounced()
208 if (cmd->resp_type & MMC_RSP_OPCODE) in tegra_mmc_send_cmd_bounced()
213 debug("cmd: %d\n", cmd->cmdidx); in tegra_mmc_send_cmd_bounced()
215 writew((cmd->cmdidx << 8) | flags, &priv->reg->cmdreg); in tegra_mmc_send_cmd_bounced()
235 debug("timeout: %08x cmd %d\n", mask, cmd->cmdidx); in tegra_mmc_send_cmd_bounced()
240 debug("error: %08x cmd %d\n", mask, cmd->cmdidx); in tegra_mmc_send_cmd_bounced()
245 if (cmd->resp_type & MMC_RSP_PRESENT) { in tegra_mmc_send_cmd_bounced()
246 if (cmd->resp_type & MMC_RSP_136) { in tegra_mmc_send_cmd_bounced()
251 cmd->response[i] = readl(offset) << 8; in tegra_mmc_send_cmd_bounced()
254 cmd->response[i] |= in tegra_mmc_send_cmd_bounced()
258 i, cmd->response[i]); in tegra_mmc_send_cmd_bounced()
260 } else if (cmd->resp_type & MMC_RSP_BUSY) { in tegra_mmc_send_cmd_bounced()
274 cmd->response[0] = readl(&priv->reg->rspreg0); in tegra_mmc_send_cmd_bounced()
275 debug("cmd->resp[0]: %08x\n", cmd->response[0]); in tegra_mmc_send_cmd_bounced()
277 cmd->response[0] = readl(&priv->reg->rspreg0); in tegra_mmc_send_cmd_bounced()
278 debug("cmd->resp[0]: %08x\n", cmd->response[0]); in tegra_mmc_send_cmd_bounced()
330 static int tegra_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, in tegra_mmc_send_cmd() argument
352 ret = tegra_mmc_send_cmd_bounced(dev, cmd, data, &bbstate); in tegra_mmc_send_cmd()