des_cmd_cur->owner = 1;
des_cmd_cur->end_of_chain = 0;
- desc_cur->cmd_arg = mrq->cmd->data->blocks;
+ desc_cur->cmd_arg = mrq->sbc->arg;
/* response save into resp_addr itself */
des_cmd_cur->resp_num = 1;
desc_cur->resp_addr = 0;
#ifdef SD_EMMC_MANUAL_CMD23
if (((mrq->cmd->opcode == MMC_WRITE_MULTIPLE_BLOCK)
|| (mrq->cmd->opcode == MMC_READ_MULTIPLE_BLOCK))
- && (!host->cmd_is_stop) && (!mrq->sbc)
- && !(mrq->cmd->flags & (1 << 30))) {
+ && (!host->cmd_is_stop) && (!mrq->sbc)) {
/* pr_info("Send stop command here\n"); */
return err;
}
+#ifdef CONFIG_AMLOGIC_MMC
+static void aml_mmc_set_blockcount(struct mmc_request *p_mrq,
+ struct mmc_command *p_sbc)
+{
+ p_sbc->opcode = MMC_SET_BLOCK_COUNT;
+ p_sbc->arg = p_mrq->data->blocks | (1 << 31);
+ p_sbc->flags = MMC_RSP_R1 | MMC_CMD_AC;
+ p_mrq->sbc = p_sbc;
+}
+#endif
+
static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md,
struct mmc_blk_ioc_data *idata)
{
struct mmc_command cmd = {0};
struct mmc_data data = {0};
+#ifdef CONFIG_AMLOGIC_MMC
+ struct mmc_command sbc = {0};
+#endif
struct mmc_request mrq = {NULL};
struct scatterlist sg;
int err;
}
if (is_rpmb) {
+#ifdef CONFIG_AMLOGIC_MMC
+ aml_mmc_set_blockcount(&mrq, &sbc);
+#else
err = mmc_set_blockcount(card, data.blocks,
idata->ic.write_flag & (1 << 31));
if (err)
return err;
+#endif
}
if ((MMC_EXTRACT_INDEX_FROM_ARG(cmd.arg) == EXT_CSD_SANITIZE_START) &&