Lines Matching refs:cmd
298 struct mmc_command *cmd) in wbsd_get_short_reply() argument
304 cmd->error = -EILSEQ; in wbsd_get_short_reply()
308 cmd->resp[0] = wbsd_read_index(host, WBSD_IDX_RESP12) << 24; in wbsd_get_short_reply()
309 cmd->resp[0] |= wbsd_read_index(host, WBSD_IDX_RESP13) << 16; in wbsd_get_short_reply()
310 cmd->resp[0] |= wbsd_read_index(host, WBSD_IDX_RESP14) << 8; in wbsd_get_short_reply()
311 cmd->resp[0] |= wbsd_read_index(host, WBSD_IDX_RESP15) << 0; in wbsd_get_short_reply()
312 cmd->resp[1] = wbsd_read_index(host, WBSD_IDX_RESP16) << 24; in wbsd_get_short_reply()
316 struct mmc_command *cmd) in wbsd_get_long_reply() argument
324 cmd->error = -EILSEQ; in wbsd_get_long_reply()
329 cmd->resp[i] = in wbsd_get_long_reply()
331 cmd->resp[i] |= in wbsd_get_long_reply()
333 cmd->resp[i] |= in wbsd_get_long_reply()
335 cmd->resp[i] |= in wbsd_get_long_reply()
340 static void wbsd_send_command(struct wbsd_host *host, struct mmc_command *cmd) in wbsd_send_command() argument
355 outb(cmd->opcode, host->base + WBSD_CMDR); in wbsd_send_command()
357 outb((cmd->arg >> (i * 8)) & 0xff, host->base + WBSD_CMDR); in wbsd_send_command()
359 cmd->error = 0; in wbsd_send_command()
371 if (cmd->flags & MMC_RSP_PRESENT) { in wbsd_send_command()
379 cmd->error = -ENOMEDIUM; in wbsd_send_command()
382 cmd->error = -ETIMEDOUT; in wbsd_send_command()
384 else if ((cmd->flags & MMC_RSP_CRC) && (isr & WBSD_INT_CRC)) in wbsd_send_command()
385 cmd->error = -EILSEQ; in wbsd_send_command()
388 if (cmd->flags & MMC_RSP_136) in wbsd_send_command()
389 wbsd_get_long_reply(host, cmd); in wbsd_send_command()
391 wbsd_get_short_reply(host, cmd); in wbsd_send_command()
402 struct mmc_data *data = host->mrq->cmd->data; in wbsd_empty_fifo()
467 struct mmc_data *data = host->mrq->cmd->data; in wbsd_fill_fifo()
746 struct mmc_command *cmd; in wbsd_request() local
755 cmd = mrq->cmd; in wbsd_request()
763 cmd->error = -ENOMEDIUM; in wbsd_request()
767 if (cmd->data) { in wbsd_request()
774 switch (cmd->opcode) { in wbsd_request()
795 mmc_hostname(host->mmc), cmd->opcode); in wbsd_request()
796 cmd->error = -EINVAL; in wbsd_request()
805 if (cmd->data) { in wbsd_request()
806 wbsd_prepare_data(host, cmd->data); in wbsd_request()
808 if (cmd->data->error) in wbsd_request()
812 wbsd_send_command(host, cmd); in wbsd_request()
819 if (cmd->data && !cmd->error) { in wbsd_request()
979 WARN_ON(!host->mrq->cmd); in wbsd_get_data()
980 if (!host->mrq->cmd) in wbsd_get_data()
983 WARN_ON(!host->mrq->cmd->data); in wbsd_get_data()
984 if (!host->mrq->cmd->data) in wbsd_get_data()
987 return host->mrq->cmd->data; in wbsd_get_data()
1022 host->mrq->cmd->error = -ENOMEDIUM; in wbsd_tasklet_card()