Lines Matching refs:cmd

167 	struct mmc_data *r_data = host->req->cmd->data;  in tifm_sd_transfer_data()
323 static unsigned int tifm_sd_op_flags(struct mmc_command *cmd) in tifm_sd_op_flags() argument
327 switch (mmc_resp_type(cmd)) { in tifm_sd_op_flags()
347 switch (mmc_cmd_type(cmd)) { in tifm_sd_op_flags()
366 static void tifm_sd_exec(struct tifm_sd *host, struct mmc_command *cmd) in tifm_sd_exec() argument
369 unsigned int cmd_mask = tifm_sd_op_flags(cmd); in tifm_sd_exec()
374 if (cmd->data && (cmd->data->flags & MMC_DATA_READ)) in tifm_sd_exec()
378 cmd->opcode, cmd->arg, cmd_mask); in tifm_sd_exec()
380 writel((cmd->arg >> 16) & 0xffff, sock->addr + SOCK_MMCSD_ARG_HIGH); in tifm_sd_exec()
381 writel(cmd->arg & 0xffff, sock->addr + SOCK_MMCSD_ARG_LOW); in tifm_sd_exec()
382 writel(cmd->opcode | cmd_mask, sock->addr + SOCK_MMCSD_COMMAND); in tifm_sd_exec()
385 static void tifm_sd_fetch_resp(struct mmc_command *cmd, struct tifm_dev *sock) in tifm_sd_fetch_resp() argument
387 cmd->resp[0] = (readl(sock->addr + SOCK_MMCSD_RESPONSE + 0x1c) << 16) in tifm_sd_fetch_resp()
389 cmd->resp[1] = (readl(sock->addr + SOCK_MMCSD_RESPONSE + 0x14) << 16) in tifm_sd_fetch_resp()
391 cmd->resp[2] = (readl(sock->addr + SOCK_MMCSD_RESPONSE + 0x0c) << 16) in tifm_sd_fetch_resp()
393 cmd->resp[3] = (readl(sock->addr + SOCK_MMCSD_RESPONSE + 0x04) << 16) in tifm_sd_fetch_resp()
400 struct mmc_command *cmd = host->req->cmd; in tifm_sd_check_status() local
402 if (cmd->error) in tifm_sd_check_status()
408 if (cmd->data) { in tifm_sd_check_status()
409 if (cmd->data->error) { in tifm_sd_check_status()
423 if (cmd->data->flags & MMC_DATA_WRITE) { in tifm_sd_check_status()
483 r_data = host->req->cmd->data; in tifm_sd_data_event()
503 struct mmc_command *cmd = NULL; in tifm_sd_card_event() local
512 cmd = host->req->cmd; in tifm_sd_card_event()
522 if (cmd->data) { in tifm_sd_card_event()
524 cmd->data->error = -ETIMEDOUT; in tifm_sd_card_event()
526 cmd->data->error = -EILSEQ; in tifm_sd_card_event()
538 cmd->error = cmd_error; in tifm_sd_card_event()
544 cmd->error = cmd_error; in tifm_sd_card_event()
549 tifm_sd_fetch_resp(cmd, sock); in tifm_sd_card_event()
560 if (host->no_dma && cmd->data) { in tifm_sd_card_event()
617 struct mmc_data *r_data = mrq->cmd->data; in tifm_sd_request()
621 mrq->cmd->error = -ENOMEDIUM; in tifm_sd_request()
628 mrq->cmd->error = -ETIMEDOUT; in tifm_sd_request()
668 mrq->cmd->error = -ENOMEM; in tifm_sd_request()
684 mrq->cmd->error = -ENOMEM; in tifm_sd_request()
717 tifm_sd_exec(host, mrq->cmd); in tifm_sd_request()
748 r_data = mrq->cmd->data; in tifm_sd_end_cmd()
783 dev_name(&host->dev->dev), host->req->cmd->opcode, host->cmd_flags); in tifm_sd_abort()
1009 host->req->cmd->error = -ENOMEDIUM; in tifm_sd_remove()