mmc: cqhci: allow hosts to update dcmd cmd desc
authorSowjanya Komatineni <skomatineni@nvidia.com>
Sun, 24 Mar 2019 04:45:23 +0000 (21:45 -0700)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 15 Apr 2019 09:55:54 +0000 (11:55 +0200)
This patch adds update_dcmd_desc interface to cqhci_host_ops to
allow hosts to update any of the DCMD task descriptor attributes
and parameters.

Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Ritesh Harjani <riteshh@codeaurora.org>
Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/cqhci.c
drivers/mmc/host/cqhci.h

index a8af682a9182160e1e9074f1714dd33f5ee39cdd..d59cb0a5196481f1aa93cf5c9dc5f75fe7b9e952 100644 (file)
@@ -537,6 +537,8 @@ static void cqhci_prep_dcmd_desc(struct mmc_host *mmc,
                 CQHCI_ACT(0x5) |
                 CQHCI_CMD_INDEX(mrq->cmd->opcode) |
                 CQHCI_CMD_TIMING(timing) | CQHCI_RESP_TYPE(resp_type));
+       if (cq_host->ops->update_dcmd_desc)
+               cq_host->ops->update_dcmd_desc(mmc, mrq, &data);
        *task_desc |= data;
        desc = (u8 *)task_desc;
        pr_debug("%s: cqhci: dcmd: cmd: %d timing: %d resp: %d\n",
index 9e68286a07b4a14c9a593b23fa41c0f718994136..928ec491eecf75c44a8b30a011fbafa8be0f9357 100644 (file)
 
 struct cqhci_host_ops;
 struct mmc_host;
+struct mmc_request;
 struct cqhci_slot;
 
 struct cqhci_host {
@@ -210,6 +211,8 @@ struct cqhci_host_ops {
        u32 (*read_l)(struct cqhci_host *host, int reg);
        void (*enable)(struct mmc_host *mmc);
        void (*disable)(struct mmc_host *mmc, bool recovery);
+       void (*update_dcmd_desc)(struct mmc_host *mmc, struct mmc_request *mrq,
+                                u64 *data);
 };
 
 static inline void cqhci_writel(struct cqhci_host *host, u32 val, int reg)