diff options
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
| -rw-r--r-- | drivers/mmc/host/sdhci.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 3fd564388720..43853306a6bb 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3632,14 +3632,35 @@ static void sdhci_cmdq_clear_set_dumpregs(struct mmc_host *mmc, bool set) host->ops->clear_set_dumpregs(host, set); } static int sdhci_cmdq_crypto_cfg(struct mmc_host *mmc, - struct mmc_request *mrq, u32 slot) + struct mmc_request *mrq, u32 slot, u64 *ice_ctx) { struct sdhci_host *host = mmc_priv(mmc); + int err = 0; if (!host->is_crypto_en) return 0; - return sdhci_crypto_cfg(host, mrq, slot); + if (host->crypto_reset_reqd && host->ops->crypto_engine_reset) { + err = host->ops->crypto_engine_reset(host); + if (err) { + pr_err("%s: crypto reset failed\n", + mmc_hostname(host->mmc)); + goto out; + } + host->crypto_reset_reqd = false; + } + + if (host->ops->crypto_engine_cmdq_cfg) { + err = host->ops->crypto_engine_cmdq_cfg(host, mrq, + slot, ice_ctx); + if (err) { + pr_err("%s: failed to configure crypto\n", + mmc_hostname(host->mmc)); + goto out; + } + } +out: + return err; } static void sdhci_cmdq_crypto_cfg_reset(struct mmc_host *mmc, unsigned int slot) @@ -3702,7 +3723,7 @@ static void sdhci_cmdq_clear_set_dumpregs(struct mmc_host *mmc, bool set) } static int sdhci_cmdq_crypto_cfg(struct mmc_host *mmc, - struct mmc_request *mrq, u32 slot) + struct mmc_request *mrq, u32 slot, u64 *ice_ctx) { return 0; } |
