Lines Matching refs:cmd

72 mmc_wait_for_cmd(device_t busdev, device_t dev, struct mmc_command *cmd,  in mmc_wait_for_cmd()  argument
81 memset(cmd->resp, 0, sizeof(cmd->resp)); in mmc_wait_for_cmd()
82 cmd->retries = 0; /* Retries done here, not in hardware. */ in mmc_wait_for_cmd()
83 cmd->mrq = &mreq; in mmc_wait_for_cmd()
84 if (cmd->data != NULL) in mmc_wait_for_cmd()
85 cmd->data->mrq = &mreq; in mmc_wait_for_cmd()
86 mreq.cmd = cmd; in mmc_wait_for_cmd()
90 err = cmd->error; in mmc_wait_for_cmd()
98 cmd->opcode, err); in mmc_wait_for_cmd()
107 struct mmc_command *cmd, int retries) in mmc_wait_for_app_cmd() argument
129 else if (mmc_wait_for_cmd(busdev, dev, cmd, 0) != 0) in mmc_wait_for_app_cmd()
132 err = cmd->error; in mmc_wait_for_app_cmd()
141 cmd->opcode, err); in mmc_wait_for_app_cmd()
152 struct mmc_command cmd; in mmc_switch() local
160 memset(&cmd, 0, sizeof(cmd)); in mmc_switch()
161 cmd.opcode = MMC_SWITCH_FUNC; in mmc_switch()
162 cmd.arg = (MMC_SWITCH_FUNC_WR << 24) | (index << 16) | (value << 8) | in mmc_switch()
171 cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; in mmc_switch()
173 cmd.flags = MMC_RSP_R1B | MMC_CMD_AC; in mmc_switch()
180 err = mmc_wait_for_cmd(busdev, dev, &cmd, CMD_RETRIES); in mmc_switch()
240 struct mmc_command cmd; in mmc_send_ext_csd() local
244 memset(&cmd, 0, sizeof(cmd)); in mmc_send_ext_csd()
248 cmd.opcode = MMC_SEND_EXT_CSD; in mmc_send_ext_csd()
249 cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; in mmc_send_ext_csd()
250 cmd.data = &data; in mmc_send_ext_csd()
256 err = mmc_wait_for_cmd(busdev, dev, &cmd, CMD_RETRIES); in mmc_send_ext_csd()
263 struct mmc_command cmd; in mmc_send_status() local
266 memset(&cmd, 0, sizeof(cmd)); in mmc_send_status()
267 cmd.opcode = MMC_SEND_STATUS; in mmc_send_status()
268 cmd.arg = (uint32_t)rca << 16; in mmc_send_status()
269 cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; in mmc_send_status()
270 err = mmc_wait_for_cmd(busdev, dev, &cmd, CMD_RETRIES); in mmc_send_status()
271 *status = cmd.resp[0]; in mmc_send_status()