Lines Matching refs:cmd

125 struct cmd {
206 static sdhc_cmd_xfr_typ_t xfr_typ_for_cmd(struct cmd *cmd){
209 if(cmd->cmdidx == MMC_CMD_READ_SINGLE_BLOCK ||
210 cmd->cmdidx == MMC_CMD_WRITE_SINGLE_BLOCK)
215 c = sdhc_cmd_xfr_typ_cmdinx_insert(c, cmd->cmdidx);
216 if (cmd->resp_type & MMC_RSP_CRC)
218 if (cmd->resp_type & MMC_RSP_OPCODE)
223 if (cmd->resp_type & MMC_RSP_136)
225 else if (cmd->resp_type & MMC_RSP_BUSY)
227 else if (cmd->resp_type & MMC_RSP_PRESENT)
231 if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
238 static errval_t sdhc_send_cmd(struct sdhc * sd, struct cmd * cmd) {
239 DEBUG("sdhc_send_cmd: cmdidx=%d,cmdarg=%d\n", cmd->cmdidx, cmd->cmdarg);
242 if(cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION) {
250 DEBUG("Card ready (data & cmd inhibit are clear)!\n");
260 sdhc_cmd_arg_wr(&sd->dev, cmd->cmdarg);
263 int is_read = cmd->cmdidx == MMC_CMD_READ_SINGLE_BLOCK;
264 int is_write = cmd->cmdidx == MMC_CMD_WRITE_SINGLE_BLOCK;
271 assert((cmd->dma_base >> 32) == 0);
273 sdhc_ds_addr_wr(&sd->dev, cmd->dma_base);
280 sdhc_cmd_xfr_typ_t c = xfr_typ_for_cmd(cmd);
294 DEBUG("%s:%d: ctoe = 1 ccrc = 1: Conflict on cmd line.\n",
314 if(cmd->resp_type & MMC_RSP_136){
319 cmd->response[0] = (r3 << 8) | (r2 >> 24);
320 cmd->response[1] = (r2 << 8) | (r1 >> 24);
321 cmd->response[2] = (r1 << 8) | (r0 >> 24);
322 cmd->response[3] = (r0 << 8);
324 cmd->response[0] = sdhc_cmd_rsp0_rd(&sd->dev);
331 struct cmd init = {
347 struct cmd cmd = {
353 err = sdhc_send_cmd(sd, &cmd);
355 if(cmd.response[0] == (0x100 | pattern)){
375 struct cmd app_cmd = {
387 struct cmd op_cond_cmd = {
427 struct cmd cid = {
438 struct cmd send_addr = {
451 struct cmd send_csd = {
479 struct cmd select_card = {
486 DEBUG_ERR(err, "select_card cmd");
515 struct cmd set_blocklen = {
526 struct cmd read_block = {
563 struct cmd set_blocklen = {
574 struct cmd write_block = {