Lines Matching refs:ra_cmd
141 static int sdhc_ra_send_cmd(struct sdhc_ra_priv *priv, struct sdmmc_ra_command *ra_cmd, int retries) in sdhc_ra_send_cmd() argument
146 fsp_err = sdhi_command_send_wait(&priv->sdmmc_ctrl, ra_cmd->opcode, ra_cmd->arg, in sdhc_ra_send_cmd()
147 ra_cmd->timeout_ms); in sdhc_ra_send_cmd()
170 struct sdmmc_ra_command ra_cmd = { in sdhc_ra_request() local
176 ra_cmd.data = (uint8_t *)data->data; in sdhc_ra_request()
177 ra_cmd.sector_count = data->blocks; in sdhc_ra_request()
178 ra_cmd.sector_size = data->block_size; in sdhc_ra_request()
185 ra_cmd.timeout_ms = SDHI_TIME_OUT_MAX; in sdhc_ra_request()
187 ra_cmd.timeout_ms = timeout_cfg; in sdhc_ra_request()
214 ret = sdhc_ra_send_cmd(priv, &ra_cmd, retries); in sdhc_ra_request()
221 ret = sdhc_ra_send_cmd(priv, &ra_cmd, retries); in sdhc_ra_request()
283 ra_cmd.opcode |= SDHI_PRV_CMD_C_ACMD; in sdhc_ra_request()
284 ret = sdhc_ra_send_cmd(priv, &ra_cmd, retries); in sdhc_ra_request()
305 ra_cmd.opcode |= SDHI_PRV_CMD_C_ACMD; in sdhc_ra_request()
306 ret = sdhc_ra_send_cmd(priv, &ra_cmd, retries); in sdhc_ra_request()
312 fsp_err = r_sdhi_read_and_block(&priv->sdmmc_ctrl, ra_cmd.opcode, in sdhc_ra_request()
313 ra_cmd.arg, ra_cmd.sector_size); in sdhc_ra_request()
318 memcpy(ra_cmd.data, priv->sdmmc_ctrl.aligned_buff, 8); in sdhc_ra_request()
326 ra_cmd.opcode = cmd->opcode | SDHI_PRV_CMD_C_ACMD; in sdhc_ra_request()
327 fsp_err = r_sdhi_read_and_block(&priv->sdmmc_ctrl, ra_cmd.opcode, ra_cmd.arg, in sdhc_ra_request()
328 ra_cmd.sector_size); in sdhc_ra_request()
334 memcpy(ra_cmd.data, priv->sdmmc_ctrl.aligned_buff, 8); in sdhc_ra_request()
340 fsp_err = r_sdhi_transfer_read(&priv->sdmmc_ctrl, ra_cmd.sector_count, in sdhc_ra_request()
341 ra_cmd.sector_size, ra_cmd.data); in sdhc_ra_request()
347 r_sdhi_read_write_common(&priv->sdmmc_ctrl, ra_cmd.sector_count, ra_cmd.sector_size, in sdhc_ra_request()
348 ra_cmd.opcode, ra_cmd.arg); in sdhc_ra_request()
351 ret = k_sem_take(&priv->sdmmc_event.transfer_sem, K_MSEC(ra_cmd.timeout_ms)); in sdhc_ra_request()
368 fsp_err = r_sdhi_transfer_write(&priv->sdmmc_ctrl, ra_cmd.sector_count, in sdhc_ra_request()
369 ra_cmd.sector_size, ra_cmd.data); in sdhc_ra_request()
375 r_sdhi_read_write_common(&priv->sdmmc_ctrl, ra_cmd.sector_count, ra_cmd.sector_size, in sdhc_ra_request()
376 ra_cmd.opcode, ra_cmd.arg); in sdhc_ra_request()
379 ret = k_sem_take(&priv->sdmmc_event.transfer_sem, K_MSEC(ra_cmd.timeout_ms)); in sdhc_ra_request()
398 if (ra_cmd.opcode == SD_ALL_SEND_CID || ra_cmd.opcode == SD_SEND_CSD) { in sdhc_ra_request()