diff options
| author | Veerabhadrarao Badiganti <vbadigan@codeaurora.org> | 2017-03-08 06:35:21 +0530 |
|---|---|---|
| committer | Veerabhadrarao Badiganti <vbadigan@codeaurora.org> | 2017-03-08 07:33:59 +0530 |
| commit | a7291efc55bf33064c02fdc5394093f293059d82 (patch) | |
| tree | 24e1c5c24ccb5f3be2c85690cb005ec813e94701 | |
| parent | 35731dbb9352cd912ffaebd273d203456f37d1da (diff) | |
mmc: host: sdhci: Add new host_op for clearing ice configuration
Add new host op for clearing ice configuration.
This config_end host op need to invoked for clearing ice configuration,
once mmc request processing is completed.
Change-Id: Ifc5569ae88748599b75ef5b3e625249ecd667762
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
| -rw-r--r-- | drivers/mmc/host/sdhci.c | 17 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 1fdc23365c8f..d5dd854cc2be 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1668,6 +1668,22 @@ out: return err; } +static int sdhci_crypto_cfg_end(struct sdhci_host *host, + struct mmc_request *mrq) +{ + int err = 0; + + if (host->ops->crypto_engine_cfg_end) { + err = host->ops->crypto_engine_cfg_end(host, mrq); + if (err) { + pr_err("%s: failed to configure crypto\n", + mmc_hostname(host->mmc)); + return err; + } + } + return 0; +} + static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) { struct sdhci_host *host; @@ -2787,6 +2803,7 @@ static void sdhci_tasklet_finish(unsigned long param) mmiowb(); spin_unlock_irqrestore(&host->lock, flags); + sdhci_crypto_cfg_end(host, mrq); mmc_request_done(host->mmc, mrq); sdhci_runtime_pm_put(host); } diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index c4bbdd80f29c..93129b26dc5e 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -659,6 +659,8 @@ struct sdhci_ops { struct mmc_request *mrq, u32 slot); int (*crypto_engine_cmdq_cfg)(struct sdhci_host *host, struct mmc_request *mrq, u32 slot, u64 *ice_ctx); + int (*crypto_engine_cfg_end)(struct sdhci_host *host, + struct mmc_request *mrq); int (*crypto_engine_reset)(struct sdhci_host *host); void (*crypto_cfg_reset)(struct sdhci_host *host, unsigned int slot); void (*set_uhs_signaling)(struct sdhci_host *host, unsigned int uhs); |
